Commit 6b6e2ee
Add A2ML Record Dialect specification + conformance vectors (#456)
## What & why
The seven canonical descriptile files that every estate repo deploys —
`STATE`, `META`, `ECOSYSTEM`, `AGENTIC`, `NEUROSYM`, `PLAYBOOK`,
`ANCHOR` — are written in a TOML-like `[section]` / `key = value`
surface. Until now that surface was **used but never specified**: ~435
files across the estate conformed to a grammar that existed only by
imitation. The existing `a2ml/SPEC.adoc` v1.1.0 specifies the *markup*
dialect (`@directive:` blocks) and an `@record`/`key: value` form, but
never the `[section]`/`key = value` record surface those files actually
use.
This PR fills that gap with a normative spec grounded in a **measured
survey of the deployed corpus** (1,798 `.a2ml` files), not the abandoned
`.scm`-era specs.
## Key design decision
The Record Dialect is **not a rival format** — it is a *second concrete
surface over the same typed core* as the markup dialect (`SPEC.adoc`
§3). It reuses, unchanged:
- validation modes (§4) → conformance classes R0/R1/R2
- base invariants (§6)
- the Base Record vocabulary (§7) — a base record can be written in
either surface and denotes the identical core structure
- the profile mechanism (§8) — the shipped `a2ml/*` profiles already
target this dialect
- the canonical hash form (§9)
One abstract model, two surfaces, **no third generation**. This is a
structural fix for the audit finding that three format generations
(`.scm` → TOML-like → A2ML profiles) coexist with no deprecation story.
## Contents
- **`a2ml/RECORD-DIALECT-SPEC.adoc`** — normative spec: RFC-2119
language, EBNF surface grammar (every production grounded in the
corpus), the record-tree data model, translation to the A2ML core,
R0/R1/R2 conformance classes, a **normative "Divergences from TOML"
table** (so an implementer can't conform by piping input through a stock
TOML parser), security considerations, IANA note, versioning, and a
worked example annotating a real deployed `STATE.a2ml`.
- **`a2ml/tests/record-dialect/`** — an executable conformance-vector
suite: **8 valid + 12 invalid** vectors, each minimal and mapped to one
spec clause + the class at which rejection is required; a **dogfooded**
record-dialect `MANIFEST.a2ml` indexing them; and a `README.adoc`.
## Status: Draft (deliberately)
Per the no-overclaim doctrine, the spec is marked `Draft` and states it
MUST NOT be cited as ratified until a reference reader greens the
vectors and a corpus conformance run is published. The path to `Stable`
is in the spec's **Appendix D**:
1. Reference reader — a second front-end over the existing core (not a
second core).
2. Green the vectors in real CI (no `|| echo SKIP`).
3. Corpus conformance run over all ~435 files; publish the residual
non-conforming set (e.g. the observed malformed timestamp
`"…ZT00:00:00Z"`) as findings.
4. Registry: the spec lives under the already-registered `a2ml/` home.
5. Owner ratification → bump `Status` to `Stable`.
## Registry regeneration — note for the reviewer
`.machine_readable/REGISTRY.a2ml` was regenerated with
`scripts/build-registry.sh` (the sanctioned generator — **not**
hand-edited). This updates the `a2ml/` home `source_hash` for the new
files and **incidentally re-pins the `k9-svc/` home hash**, which was
already drifted on `main` since `6df21b1` (the registry wasn't
regenerated after that commit changed `k9-svc` files).
`build-registry.sh --check` passes after regeneration. Flagging the
k9-svc rehash explicitly since it's unrelated to the spec itself.
## Guardrails respected
No licence content touched; no SPDX sweeps; new files carry correct SPDX
from birth per the repo's MPL-2.0 / CC-BY-SA-4.0 classification.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz
---
_Generated by [Claude
Code](https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 79088f0 commit 6b6e2ee
24 files changed
Lines changed: 1221 additions & 1 deletion
File tree
- .machine_readable
- a2ml
- tests/record-dialect
- vectors
- invalid
- valid
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments