| Crates.io | fsm_governance_engine_lib |
| lib.rs | fsm_governance_engine_lib |
| version | 0.1.0 |
| created_at | 2026-01-15 11:22:36.562605+00 |
| updated_at | 2026-01-15 11:22:36.562605+00 |
| description | Declarative, validation-only FSM library with invariants and deterministic auditability |
| homepage | |
| repository | https://github.com/IndrasNet108/fsm_governance_engine_lib |
| max_upload_size | |
| id | 2045358 |
| size | 426,137 |
Before making any changes, read CODEX_INSTRUCTIONS.md and follow it strictly.
Standalone Rust library for deterministic validation of integrity-critical, human-driven and system-driven processes. This project implements a validation-only FSM core. It does not execute actions, automate decisions, or enforce outcomes.
Declarative, validation-only FSM for integrity-critical processes, with formally defined invariants and deterministic auditability.
AuditEntry, AuditTrail) with serialization/export guidance.Grant, IdeaStatus) to show integration patterns.cargo test
cargo run --example fsm_definition_loader
Run the full test suite:
cargo test
Validate a declarative FSM definition against the schema (strict mode):
cargo run --bin fsm_validate -- docs/example_fsm_definition.json --schema docs/FSM_schema.json --strict
Expected: OK (strict validation).
Load and parse the example definition (definition loader example):
cargo run --example fsm_definition_loader
# Expected: "Loaded 4 states and 4 transitions."
docs/FSM_schema.jsondocs/FSM_schema.mddocs/example_fsm_definition.jsondocs/Invariants.mddocs/API.mddocs/AuditTrail.mddocs/AuditModel.mdCONTRIBUTING.mdGOVERNANCE.mdCODE_OF_CONDUCT.mdGrant::new(...), record AuditEntry::new(...) each time approve, activate, or disburse is called.serde_json::to_string(&trail.entries()) and attach to governance report.GrantStatus with domain-specific enums while reusing AuditTrail.ComplianceReport - like struct , derive Borsh/Serde.AuditTrail helpers to validate process state before transitioning phases.cargo run --example dao_grant_flow — walkthrough: create grant, log audit entries, simulate vote, disburse and verify audit trail. Expected: Audit JSONL and Audit trail entries: 2.cargo run --example fsm_definition_loader — load and validate docs/example_fsm_definition.json. Expected: Loaded 4 states and 4 transitions..cargo run --example governance_lifecycle — proposal lifecycle (draft → executed). Expected: Proposal lifecycle complete: Executed.cargo run --example voting — governance voting metadata initialization. Expected: Voting initialized for proposal 200.cargo run --example treasury_flow — treasury operation validation. Expected: Treasury operation validated: Transfer.cargo run --example audit_only_validation — audit trail validation without execution. Expected: Audit JSONL and Audit-only validation complete: 1 entries.GitHub Actions runs fmt, clippy, and tests on stable and nightly.
For CI validation steps, see docs/CI_validation.md.
Use the built-in validator to check JSON definitions:
cargo run --bin fsm_validate -- docs/example_fsm_definition.json
docs/API.md for usage.docs/AuditTrail.md when integrating compliance logging.docs/FSM_schema.json.docs/Invariants.md.docs/RELEASE.md to publish a crate release once testing/test coverage is complete.The following document provides broader conceptual background and is not required to use or understand the FSM Governance Engine.
The civilization model that guides IndrasNet—its MVP → Audit → Post-grant evolution, the deprecated PDA memory layer, and the cryptographic constitution—is laid out in INDRASNET_CIVILIZATION_FOUNDATION.md. That document makes explicit how an ontology-driven constitution, AI jurisdiction, PDA reality, and CI-based constitutional control form a single self-correcting civilization.
Security note: This library validates process correctness but does not execute actions, manage assets, or replace human decision-making.