Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .claude/skills/update-config-docs/SKILL.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 |
|-----------------------------------------------------------|-------------------------------------------|
Expand All @@ -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.

Expand All @@ -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
Expand All @@ -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.
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion CONFIG.md → docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading