Skip to main content

Crate converge_tool

Crate converge_tool 

Source
Expand description

Development tools for Converge.

This crate provides tooling for developing Converge applications:

  • gherkin: Converge Truths validation (business sense, compilability, conventions)

§Converge Truths Validation

Converge uses .truth files (or .feature) containing business specifications. The validator uses LLMs to check specs for:

  1. Business Sense: Does the spec describe a meaningful invariant?
  2. Compilability: Can this be translated to a Rust invariant?
  3. Conventions: Does it follow Converge’s patterns?

§Example

use converge_tool::gherkin::{GherkinValidator, ValidationConfig};
use converge_core::llm::MockProvider;
use std::sync::Arc;

let provider = Arc::new(MockProvider::constant("Valid spec", 0.9));
let validator = GherkinValidator::new(provider, ValidationConfig::default());

let result = validator.validate_file("specs/money.truth")?;
println!("Valid: {}", result.is_valid);

Re-exports§

pub use gherkin::GherkinValidator;
pub use gherkin::SpecGenerator;
pub use gherkin::SpecValidation;
pub use gherkin::ValidationConfig;
pub use gherkin::ValidationIssue;

Modules§

gherkin
Gherkin spec validation for Converge.