Skip to content

hyperpolymath/a2ml-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

a2ml-rs

Rust parser and renderer for A2ML (Attested Markup Language) — the structured markup format used across the hyperpolymath estate for AI-agent communication, machine state files, and provenance-tracked documentation.

Overview

A2ML extends a Markdown-like surface syntax with two first-class constructs:

  • @directives — single-line machine-readable metadata prefixed with @

  • !attest blocks — record identity, role, and trust-level on any piece of content, enabling provenance tracking across AI-agent and human review chains

a2ml-rs implements:

  • src/parser.rs — line-oriented state machine: headings, directives, attestation blocks, fenced code, block quotes, ordered/unordered lists. Entry points: parse() and parse_file().

  • src/renderer.rs — serialises a Document AST back to canonical A2ML, making round-trips deterministic.

  • src/types.rs — core types: Document, Block, Inline, Directive, Attestation, TrustLevel (Unverified → Automated → Reviewed → Verified), Manifest.

  • src/error.rsA2mlError: ParseError, Io, RenderError.

The crate root is #![forbid(unsafe_code)]. Dependencies: serde/serde_derive for serialisation, thiserror for error types, criterion for benchmarks only.

Usage

use a2ml::{parse, render};

let doc = parse(input_str)?;
let output = render(&doc)?;

Attestation Trust Levels

Level Meaning

Unverified

No review — raw agent or tool output

Automated

Processed by a pipeline without human review

Reviewed

Human-reviewed (claimed, not cryptographically proved)

Verified

Formally verified or cryptographically attested

Attestations are syntactic declarations, not cryptographic signatures. Signature verification belongs in the Groove protocol stack.

License

PMPL-1.0-or-later. See LICENSE.

About

Parser and renderer for A2ML (Attested Markup Language) — Rust library crate

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors