ADR-002: Use YAML for Declarative Configuration¶
Status: Accepted Date: 2025-06
Context¶
Harombe needs a configuration format for cluster definitions, agent settings, tool declarations, and other structured data. The options considered were:
- YAML — human-readable data serialization, widely used in infrastructure tooling.
- TOML — simpler syntax, popular in Python tooling (
pyproject.toml). - JSON — ubiquitous but lacks comments and is verbose for hand-editing.
- Python code — maximum flexibility but no separation between config and logic.
Cluster configurations in particular involve deeply nested structures (agents containing tools containing permission sets), which influenced the decision.
Decision¶
Use YAML as the primary configuration format for all declarative configuration files.
Consequences¶
Positive:
- Better suited for deeply nested structures such as cluster configs with multiple agents and tool definitions.
- Supports comments, allowing inline documentation of configuration choices.
- Familiar to infrastructure engineers and DevOps practitioners.
- Widely supported by editors and linters.
Negative:
- Whitespace-sensitive syntax can lead to subtle indentation errors.
- Slightly more complex parsing than TOML (requires
PyYAMLorruamel.yamldependency). - Known gotchas with implicit type coercion (e.g.,
yes/noas booleans, Norway problem withNOas country code).