Expand description
The Axiom truth layer for the Reflective stack.
This crate turns human jobs and .truths specifications into typed,
reviewable contracts that downstream runtime layers can execute and Axiom
can verify afterward.
Release-surface modules:
truth_package: deterministic JTBD decoding, Truth Packages, verifier specs, run observations, run reports, observation adapter receipts, and decoder calibration.intent: compile a parsed Truth into the runtime contract Organism consumes.gherkin,truths,simulation,policy_lens,predicate,codegen, andcompile: validate, simulate, analyze, generate, and compile.truthsprojections and WASM invariant artifacts.
§Converge Truths Validation
Converge uses .truths files as the canonical format, with .truth and
.feature accepted for compatibility.
The validator uses LLMs to check specs for:
- Business Sense: Does the spec describe a meaningful invariant?
- Compilability: Can this be translated to a Rust invariant?
- Conventions: Does it follow Converge’s patterns?
§Validation example
use axiom_truth::gherkin::{GherkinValidator, ValidationConfig};
use axiom_truth::mock_llm::StaticChatBackend;
use std::sync::Arc;
let backend = Arc::new(StaticChatBackend::constant("Valid spec"));
let validator = GherkinValidator::new(backend, ValidationConfig::default());
let result = validator.validate_file("specs/money.truths").await?;
println!("Valid: {}", result.is_valid);§Compiling to runtime intent
Truth lives here. Organism’s runtime consumes a typed IntentPacket and
knows nothing about Truth-shaped sources. Callers compile a parsed
TruthDocument into an organism_pack::IntentPacket via
intent::compile_intent, then hand the packet to organism’s runtime for
admission.
let truth = axiom_truth::parse_truth_document(source)?;
let intent = axiom_truth::compile_intent(&truth)?;
let receipt = runtime.admit_intent(&intent, actor, src, &mut ctx)?;See intent for the full field mapping (Authority, Constraint, Exception,
reversibility overrides, expiry parsing, etc.).
§Truth Packages and run verification
JtbdInput is the preferred human-intent entrypoint for the release
surface. truth_package::decode_jtbd produces a deterministic
truth_package::TruthPackage with stable clause IDs, generated .truths,
proof obligations, a verifier spec, an IntentPacket, replay metadata, and
lineage.
After Organism, Mosaic, Converge, Helm, or an app produces run output, callers
normalize it into truth_package::AxiomRunObservation and call
truth_package::AxiomRunReport::verify. Axiom judges whether the package
was satisfied, blocked, exhausted, or invalid without selecting formations,
recomputing authority, hosting specialists, or mutating app state.
Re-exports§
pub use applet_manifest::APPLET_MANIFEST_JSON_SCHEMA;pub use applet_manifest::APPLET_MANIFEST_TYPESCRIPT_DECLARATIONS;pub use applet_manifest::APPLET_MANIFEST_VERSION;pub use applet_manifest::AppletManifest;pub use applet_manifest::AppletManifestError;pub use applet_manifest::AppletProjection;pub use applet_manifest::AppletStatus;pub use applet_manifest::AuthorityEnvelope;pub use applet_manifest::ConflictPolicy;pub use applet_manifest::EmotionalNeed;pub use applet_manifest::EvidenceAuthority;pub use applet_manifest::EvidenceContract;pub use applet_manifest::EvidenceSource;pub use applet_manifest::FunctionalNeed;pub use applet_manifest::RelationalNeed;pub use applet_manifest::Reversibility;pub use applet_manifest::applet_manifest_json_schema;pub use applet_manifest::parse_applet_manifest_json;pub use applet_manifest::parse_applet_manifest_value;pub use gherkin::GherkinValidator;pub use gherkin::InvariantClassTag;pub use gherkin::IssueCategory;pub use gherkin::ScenarioKind;pub use gherkin::ScenarioMeta;pub use gherkin::Severity;pub use gherkin::SpecGenerator;pub use gherkin::SpecValidation;pub use gherkin::ValidationConfig;pub use gherkin::ValidationIssue;pub use gherkin::extract_all_metas;pub use gherkin::extract_scenario_meta;pub use intent::CompileError;pub use intent::CompileFromSourceError;pub use intent::compile_intent;pub use intent::compile_intent_from_source;pub use mock_llm::StaticChatBackend;pub use policy_lens::PolicyCoverageReport;pub use policy_lens::PolicyRequirements;pub use policy_lens::PolicyRule;pub use policy_lens::SpendingThreshold;pub use policy_lens::check_coverage;pub use provenance::AXIOM_PROVENANCE;pub use provenance::AxiomTruth;pub use provenance::TruthPackageSeedPayload;pub use provenance::truth_package_seed_fact;pub use provenance::truth_package_seed_facts;pub use simulation::DeterministicTrace;pub use simulation::DomainProfile;pub use simulation::DomainProfileCoverage;pub use simulation::DomainProfileReport;pub use simulation::SimulationConfig;pub use simulation::SimulationReport;pub use simulation::TraceStep;pub use simulation::VendorSelectionCoverage;pub use simulation::Verdict;pub use simulation::simulate;pub use simulation::simulate_spec;pub use truth_package::ArtifactId;pub use truth_package::ArtifactKind;pub use truth_package::ArtifactLineage;pub use truth_package::AxiomRunObservation;pub use truth_package::AxiomRunReport;pub use truth_package::AxiomRunStageRecord;pub use truth_package::AxiomRunVerdict;pub use truth_package::CalibrationError;pub use truth_package::CalibrationKey;pub use truth_package::CalibrationPersistenceError;pub use truth_package::CalibrationRecord;pub use truth_package::CalibrationReviewError;pub use truth_package::CalibrationSignalKind;pub use truth_package::CalibrationStatus;pub use truth_package::CalibrationTable;pub use truth_package::CalibrationValue;pub use truth_package::ClauseCoverageStatus;pub use truth_package::ClauseDisposition;pub use truth_package::ClauseFingerprint;pub use truth_package::ClauseId;pub use truth_package::ClauseInput;pub use truth_package::DecodeJtbdError;pub use truth_package::EvidenceRefRecord;pub use truth_package::ExpectedStopReason;pub use truth_package::FactLineageAudit;pub use truth_package::FactLineageAuditError;pub use truth_package::GeneratedArtifact;pub use truth_package::JtbdClause;pub use truth_package::JtbdClauseKind;pub use truth_package::JtbdDocument;pub use truth_package::JtbdInput;pub use truth_package::LearningClauseSignal;pub use truth_package::LearningEpisode;pub use truth_package::LineageError;pub use truth_package::LineageMap;pub use truth_package::ObservationAdapterReceipt;pub use truth_package::ObservationAdapterReceiptInput;pub use truth_package::ObservationAdapterStatus;pub use truth_package::ObservedStopReason;pub use truth_package::PromotedFactRecord;pub use truth_package::PromotionAuthorityRecord;pub use truth_package::ProofObligation;pub use truth_package::ProofObligationKind;pub use truth_package::ReplayProfile;pub use truth_package::RunIntegrityProof;pub use truth_package::TimeBudget;pub use truth_package::TraceLinkRecord;pub use truth_package::TruthOverlayError;pub use truth_package::TruthPackage;pub use truth_package::TruthPackageArtifacts;pub use truth_package::TruthPackageError;pub use truth_package::TruthPackageId;pub use truth_package::TruthProjectionOverlay;pub use truth_package::TruthProjectionSource;pub use truth_package::TruthProjectionVersion;pub use truth_package::VerifierSpec;pub use truth_package::apply_decoder_calibration;pub use truth_package::apply_truth_projection_overlay;pub use truth_package::calibration_records_from_learning_episode;pub use truth_package::canonicalize_clause_text;pub use truth_package::decode_jtbd;pub use truths::AuthorityBlock;pub use truths::ConstraintBlock;pub use truths::EvidenceBlock;pub use truths::ExceptionBlock;pub use truths::IntentBlock;pub use truths::TruthDocument;pub use truths::TruthGovernance;pub use truths::parse_truth_document;
Modules§
- applet_
manifest - Applet manifest validation.
- codegen
- Code generation for WASM invariant modules from Gherkin predicates.
- compile
- WASM compilation pipeline for Converge truth files.
- editor
- Editor infrastructure for Gherkin/Truths files.
- gherkin
- Converge Truths validation for Converge.
- guidance
- Truth heading guidance — LLM-powered and local heuristic rewriting.
- intent
- TruthDocument → IntentPacket compilation.
- jtbd
- Jobs To Be Done (JTBD) parsing for Converge Truths.
- mock_
llm - Minimal local LLM mocks used by axiom-truth tests and CLI fallback paths.
- policy_
lens - Cedar policy lens for Converge Truths.
- predicate
- Semantic predicate parser for Gherkin steps.
- provenance
- Axiom provenance for Truth-Package-seeded Converge proposals.
- simulation
- Pre-flight simulation for Converge Truths.
- truth_
package - Truth Package spine types.
- truths
- Converge Truths document parsing.
- validation_
view - Validation response building for Converge Truth specs.