Skip to main content

Crate ainl_improvement_proposals

Crate ainl_improvement_proposals 

Source
Expand description

Improvement proposal ledger (Phase 4 — SELF_LEARNING_INTEGRATION_MAP.md §8).

Persists ProposalEnvelope + proposed AINL text, verifies proposed_hash against sha256(proposed_ainl_text), and runs a caller-supplied strict validator before marking a row accepted. Hosts wire validator to mcp_ainl_ainl_validate / compile / or ainl-runtime as appropriate; this crate stays free of openfang_* and ainl-runtime (no dependency cycles).

Modules§

proposal_kind

Structs§

AdoptGraphPayload
Data needed to materialize an accepted proposal into the AINL graph.
AdoptResult
ImprovementProposalListItem
Summary row for ProposalLedger::list_recent (no large text columns).
ImprovementProposalRow
ProposalLedger
Append-only + update-for-validation proposal store.

Enums§

ProposalLedgerError

Functions§

is_known_proposal_kind
proposed_hash_matches
true when the proposal text matches the envelope’s proposed_hash (both compared lowercase).
sha256_hex_lower
Lowercase hex SHA-256 of UTF-8 bytes (for comparing to ProposalEnvelope::proposed_hash).

Type Aliases§

ImprovementProposalId
Row identifier in the ledger.