From b215b2c774f0c2e782f3da4f2448b1def756b36f Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Sun, 4 Oct 2026 14:16:21 -0700 Subject: [PATCH] docs(config): move CONFIG.md to docs/config.md Keeps the configuration reference next to the setup guides. Updates the README, CLAUDE.md, the doc comment in crates/config and the update-config-docs skill to match. --- .claude/skills/update-config-docs/SKILL.md | 16 ++++++++-------- CLAUDE.md | 4 ++-- README.md | 4 ++-- crates/config/src/lib.rs | 2 +- CONFIG.md => docs/config.md | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) rename CONFIG.md => docs/config.md (99%) diff --git a/.claude/skills/update-config-docs/SKILL.md b/.claude/skills/update-config-docs/SKILL.md index a961d79..f543c0a 100644 --- a/.claude/skills/update-config-docs/SKILL.md +++ b/.claude/skills/update-config-docs/SKILL.md @@ -1,12 +1,12 @@ --- name: update-config-docs -description: Bring CONFIG.md back in line with the code. Use after changing anything in crates/config, the command line options, loader.conf handling, strict mode, or autoconfiguration, or when asked to check that CONFIG.md is accurate. +description: Bring docs/config.md back in line with the code. Use after changing anything in crates/config, the command line options, loader.conf handling, strict mode, or autoconfiguration, or when asked to check that docs/config.md is accurate. --- -# Update CONFIG.md +# Update docs/config.md -`CONFIG.md` is the reference for `sprout.toml`, the command line options, BLS support and strict mode. -The README only links to it, so a setting that is missing from CONFIG.md is undocumented. +`docs/config.md` is the reference for `sprout.toml`, the command line options, BLS support and strict mode. +The README only links to it, so a setting that is missing from docs/config.md is undocumented. ## 1. Find what changed @@ -16,7 +16,7 @@ Start from the diff, or from the whole config surface if there is none: git diff main -- crates/config crates/boot/src/options.rs crates/boot/src/config crates/boot/src/autoconfigure crates/bls ``` -The sources of truth, and the section of CONFIG.md each one feeds: +The sources of truth, and the section of docs/config.md each one feeds: | Source | Section | |-----------------------------------------------------------|-------------------------------------------| @@ -34,7 +34,7 @@ The sources of truth, and the section of CONFIG.md each one feeds: ## 2. Check each key -For every struct field in `crates/config`, CONFIG.md needs its TOML name (look at `#[serde(rename)]`, as +For every struct field in `crates/config`, docs/config.md needs its TOML name (look at `#[serde(rename)]`, as most multi-word keys use dashes), its type, its default, and what it does. Read the code that uses it in `crates/boot`, not only the doc comment, because the behavior is what the reader depends on. @@ -56,7 +56,7 @@ implements it. - Keep each section's shape: a short explanation, a TOML example, then a table of keys. - Examples must parse. Check that every key in one exists and is spelled the way serde expects. - Update the table of contents if you add or rename a heading. -- Keep README.md short. It gets the feature list and the minimal examples, and CONFIG.md gets everything else. +- Keep README.md short. It gets the feature list and the minimal examples, and docs/config.md gets everything else. - Don't duplicate the strict mode table or the default entry order anywhere else. ## 4. Write like a person @@ -79,5 +79,5 @@ cargo build --target aarch64-unknown-uefi cargo fmt --all --check ``` -Then re-read the diff of CONFIG.md against the code once more for any key whose name or default you +Then re-read the diff of docs/config.md against the code once more for any key whose name or default you touched. If the change was only to docs, skip the builds. diff --git a/CLAUDE.md b/CLAUDE.md index 353ad37..b90ff53 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,8 +2,8 @@ Sprout is a programmable UEFI bootloader written in Rust, for `x86_64` and `aarch64`. It is a `no_std` workspace built for the `*-unknown-uefi` targets, so it cannot be run or tested like a normal binary. -See [README.md](README.md) for features and [CONFIG.md](CONFIG.md) for the configuration format. -After changing configuration, run the `update-config-docs` skill to keep CONFIG.md accurate. +See [README.md](README.md) for features and [docs/config.md](docs/config.md) for the configuration format. +After changing configuration, run the `update-config-docs` skill to keep docs/config.md accurate. ## Layout diff --git a/README.md b/README.md index e3cd2ee..8cccb61 100644 --- a/README.md +++ b/README.md @@ -149,10 +149,10 @@ autoconfigure = true ``` The full list of settings, the command line options, generators, and how Sprout treats BLS entries, -`loader.conf` and strict mode are in [CONFIG.md](./CONFIG.md). +`loader.conf` and strict mode are in [the configuration reference](./docs/config.md). [Edera]: https://edera.dev -[Configuration Reference]: ./CONFIG.md +[Configuration Reference]: ./docs/config.md [Development Guide]: ./DEVELOPMENT.md [Contributing Guide]: ./CONTRIBUTING.md [Sprout License]: ./LICENSE diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 4dc92b2..d8f9f3d 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -97,7 +97,7 @@ pub struct OptionsConfiguration { /// Makes Sprout follow the Boot Loader Specification and systemd-boot exactly where it /// otherwise differs for convenience or safety. For example, the extended boot loader /// partition is always read, a one-shot entry only sets the default entry, and entries with - /// missing files are hidden. See CONFIG.md for everything it changes. + /// missing files are hidden. See docs/config.md for everything it changes. #[serde(rename = "bls-strict-mode", default)] pub bls_strict_mode: bool, } diff --git a/CONFIG.md b/docs/config.md similarity index 99% rename from CONFIG.md rename to docs/config.md index 722ed55..5ab7485 100644 --- a/CONFIG.md +++ b/docs/config.md @@ -2,7 +2,7 @@ Sprout reads a TOML file, `\sprout.toml`, from the root of the EFI partition it was loaded from. This page covers everything that file can hold, the command line options that override it, and the BLS behavior that -sits next to it. For installing Sprout, see the [setup guides](./docs/setup). +sits next to it. For installing Sprout, see the [setup guides](./setup). - [Command line options](#command-line-options) - [The file at a glance](#the-file-at-a-glance)