Skip to content

Commit e8273ca

Browse files
committed
docs: add TOPOLOGY.md
1 parent ccb6df5 commit e8273ca

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

TOPOLOGY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- SPDX-License-Identifier: MPL-2.0 -->
2+
<!-- (PMPL-1.0-or-later preferred; MPL-2.0 required for Hex.pm) -->
3+
<!-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> -->
4+
5+
# TOPOLOGY.md — a2ml_gleam
6+
7+
## Purpose
8+
9+
A pure Gleam library for parsing, manipulating, and rendering A2ML (AI Attestation Markup Language) documents. Provides full A2ML parser with error reporting, manifest extraction, and roundtrip fidelity for trust-level handling.
10+
11+
## Module Map
12+
13+
```
14+
a2ml_gleam/
15+
├── src/
16+
│ ├── a2ml/
17+
│ │ ├── parser.gleam # Recursive descent parser, error recovery
18+
│ │ ├── renderer.gleam # AST → A2ML text output
19+
│ │ └── manifest.gleam # Directive extraction and queries
20+
│ └── a2ml.gleam # Module entry point
21+
├── test/
22+
│ └── a2ml_gleam_test.gleam # Parser/renderer roundtrip tests
23+
└── gleam.toml # Hex package metadata
24+
```
25+
26+
## Data Flow
27+
28+
```
29+
[A2ML Text] ──► [Parser] ──► [AST] ──► [Renderer] ──► [A2ML Text]
30+
31+
[Manifest Extract]
32+
```
33+
34+
## Key Invariants
35+
36+
- Roundtrip fidelity: parse + render preserves document structure
37+
- Error recovery: malformed directives return errors, don't crash
38+
- Trust-level validation: structural only (enum values), cryptographic verification external

0 commit comments

Comments
 (0)