converge_tool/lib.rs
1// Copyright 2024-2025 Aprio One AB, Sweden
2// Author: Kenneth Pernyer, kenneth@aprio.one
3// SPDX-License-Identifier: MIT
4// See LICENSE file in the project root for full license information.
5
6//! Development tools for Converge.
7//!
8//! This crate provides tooling for developing Converge applications:
9//!
10//! - [`gherkin`]: Gherkin spec validation (business sense, compilability, conventions)
11//!
12//! # Gherkin Validation
13//!
14//! The Gherkin validator uses LLMs to check specs for:
15//!
16//! 1. **Business Sense**: Does the spec describe a meaningful invariant?
17//! 2. **Compilability**: Can this be translated to a Rust invariant?
18//! 3. **Conventions**: Does it follow Converge's Gherkin patterns?
19//!
20//! # Example
21//!
22//! ```ignore
23//! use converge_tool::gherkin::{GherkinValidator, ValidationConfig};
24//! use converge_core::llm::MockProvider;
25//! use std::sync::Arc;
26//!
27//! let provider = Arc::new(MockProvider::constant("Valid spec", 0.9));
28//! let validator = GherkinValidator::new(provider, ValidationConfig::default());
29//!
30//! let result = validator.validate_file("specs/growth_strategy.feature")?;
31//! println!("Valid: {}", result.is_valid);
32//! ```
33
34pub mod gherkin;
35
36pub use gherkin::{GherkinValidator, SpecValidation, ValidationConfig, ValidationIssue};