Skip to main content

Crate loopsmith_core

Crate loopsmith_core 

Source
Expand description

Config model and validation for loopsmith.

A loop config is four bundles, each answering one question:

  • intent — what is this loop for, and how would we know it worked?
  • execution — how does the work get done?
  • safety — what must not happen, and when does this stop?
  • evolution — how is this allowed to change itself?

Until 1.0 these were fourteen flat keys, ten of them known by a letter. Every one of those spellings still loads: parse_str runs the document through config::legacy before typing it, and reports what moved. See config::bundles for why the grouping is what it is.

Validation exists to make the corpus rule enforceable: a goal without a machine-checkable validation is the single most common way loops fail, so the config is rejected rather than run.

Re-exports§

pub use md::parse_md;
pub use md::parse_md_reporting;
pub use md::render_md;
pub use validate::validate;
pub use validate::Issue;
pub use validate::Severity;
pub use validate::ValidationReport;
pub use config::*;

Modules§

config
The config model, one module per named section.
md
Markdown-native config: the same A–J model, written as a document.
permissions
Permission preflight.
validate
Validation of the four-bundle model.

Enums§

CoreError

Functions§

is_markdown
Whether a path should be read as a markdown config.
json_schema
The JSON Schema for a loop config, derived from the Rust model.
load
Load a config from Markdown, YAML, or JSON.
load_validated
Load and validate in one step, treating any error-severity issue as fatal.
parse_str
Parse config text, trying YAML first (a superset of JSON in practice) and falling back to strict JSON so both error messages survive to the caller.
parse_str_reporting
parse_str, additionally reporting which 0.3 keys were relocated.