Skip to content

Add A2ML Record Dialect specification + conformance vectors#456

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/standards-repo-architecture-6j606d
Jul 3, 2026
Merged

Add A2ML Record Dialect specification + conformance vectors#456
hyperpolymath merged 2 commits into
mainfrom
claude/standards-repo-architecture-6j606d

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

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.ai/code/session_0112RkdER2wtwHdNmbEhThUz


Generated by Claude Code

Specifies the TOML-like [section]/key=value surface that ~435 estate
descriptile files (STATE/META/ECOSYSTEM/AGENTIC/NEUROSYM/PLAYBOOK/ANCHOR)
already use but which was never formally defined. Grounded in a measured
survey of the deployed corpus (1,798 .a2ml files), not the abandoned
.scm-era specs.

The record dialect is a second concrete surface over the SAME typed core as
the existing markup dialect (SPEC.adoc section 3): it reuses the validation
modes, base invariants, Base Record vocabulary, profile mechanism, and
canonical hash form unchanged. Not a rival format -- a co-equal reader. This
is a structural fix for the "three coexisting format generations, no
deprecation story" finding.

Adds:
- a2ml/RECORD-DIALECT-SPEC.adoc -- normative spec (RFC 2119, EBNF, core
  mapping, R0/R1/R2 conformance classes, normative divergences from TOML,
  security, versioning). Status: Draft -- not yet ratified, wired into CI, or
  exercised by a reference reader (see the spec's Appendix D).
- a2ml/tests/record-dialect/ -- executable conformance-vector suite: 8 valid
  + 12 invalid vectors, each mapped to a spec clause and required class, plus
  a dogfooded record-dialect MANIFEST.a2ml and a README.

Regenerated .machine_readable/REGISTRY.a2ml with scripts/build-registry.sh
(the sanctioned generator; the file is 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 was not regenerated after that commit changed k9-svc files). The
drift gate (build-registry.sh --check) passes after regeneration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112RkdER2wtwHdNmbEhThUz
@hyperpolymath hyperpolymath marked this pull request as ready for review July 3, 2026 01:49
@hyperpolymath hyperpolymath enabled auto-merge (squash) July 3, 2026 01:49
…-architecture-6j606d

# Conflicts:
#	.machine_readable/REGISTRY.a2ml
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@hyperpolymath hyperpolymath disabled auto-merge July 3, 2026 01:52
@hyperpolymath hyperpolymath merged commit 6b6e2ee into main Jul 3, 2026
19 checks passed
@hyperpolymath hyperpolymath deleted the claude/standards-repo-architecture-6j606d branch July 3, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants