Skip to main content

Module config

Module config 

Source
Expand description

Lightweight harn.toml loader for harn fmt, harn lint, and harn eval prompt --fleet-name <name>.

This module is intentionally separate from crate::package (which owns the richer [check] + [dependencies] manifest model used by harn check, harn install, etc.). harn.toml can carry both sets of keys; this loader focuses on the [fmt], [lint], and [eval.fleets] sections and walks up from an input file looking for the nearest manifest.

Recognized keys (snake_case, Cargo-style):

[fmt]
line_width = 100
# By default, section-header separators follow line_width.
# Set separator_width to force a fixed width.

[lint]
disabled = ["unused-import"]
require_file_header = false
complexity_threshold = 25
persona_step_allowlist = ["legacy_helper"]
template_variant_branch_threshold = 3

# Reusable fleets consumed by `harn eval prompt --fleet-name <name>`.
[eval.fleets.frontier]
models = ["claude-opus-4-7", "gpt-5", "gemini-2.5-pro"]

[eval.fleets.local]
models = ["ollama:qwen3.5", "ollama:llama4"]

Structs§

EvalConfig
[eval] section of harn.toml. Reserves a [eval.fleets.<name>] table keyed by fleet name; each entry lists the model selectors (alias or provider:model) consumed by harn eval prompt --fleet-name <name>.
EvalFleet
FmtConfig
HarnConfig
Combined harn.toml view used by harn fmt, harn lint, and harn eval prompt.
LintConfig

Enums§

ConfigError

Functions§

load_for_path
Walks up from start to find the nearest harn.toml. Returns Ok(HarnConfig::default()) if none is found. Returns Err on parse failure so callers can surface the problem rather than silently ignore malformed config.