Expand description
Configuration, and the agent presets that make a new CLI a data change rather than a code change.
Presets are compiled into the binary. That is not an optimisation: a
cargo installed binary has no source tree beside it, so a preset read from
a relative path would work for the author and fail for everyone else. Files
on disk still win over the built in copies, so a preset can be overridden or
a new one added without rebuilding.
Structs§
- Agent
Spec - Everything needed to drive one CLI. An agent is data, not a class: supporting a new tool is a preset file.
- Config
- Effort
Schedule - LoopCfg
- Option
Info - One option the parser accepts, with the value it takes when unset.
- Style
Cfg
Enums§
- Command
Part - One element of a command template: a bare argument, or a group that is dropped whole when its placeholder is unset.
- Followups
- Where an out of scope finding goes. On your own repository an issue is the right home. On a large repository that is not yours it is somebody else’s notification and somebody else’s triage queue.
- Output
Mode - How to read the answer out of what a CLI printed.
- PrComments
- How much of its own working spar narrates into a pull request thread.
- State
Store - Where resume state lives. Local keeps the PR clean and costs no API calls; writing to the PR only buys anything if a run might be resumed from a different checkout.
- System
Via - Where the style rules go when a CLI has a system prompt flag.
Constants§
- BUILTIN_
PRESETS - Presets that ship inside the binary.
- CONFIG_
NAMES
Functions§
- available_
presets - Every preset name available, built in and on disk, sorted.
- find_
config - Find a config: an explicit path, then the working directory, then
~/.config/spar/spar.toml. - known_
options - Every option a config file may set, with its default.
- load
- load_
preset - Load a preset. A file on disk wins over the built in copy of the same name, so a drifting CLI can be corrected without waiting for a release.
- mentions
- Whether a config file mentions an option at all, set or commented out.
- parse
- preset_
dirs - Directories searched for preset overrides, nearest first.
- resolve_
search_ path - Resolve a configured search path, expanding a leading
~. - unmentioned_
options - Options this config file has never heard of, which is what somebody who upgraded wants to know.