Skip to content

fix(validate-a2ml): recognise clade- and anchor-shape A2ML doc types#13

Closed
hyperpolymath wants to merge 1 commit into
mainfrom
fix/recognise-clade-anchor-shapes
Closed

fix(validate-a2ml): recognise clade- and anchor-shape A2ML doc types#13
hyperpolymath wants to merge 1 commit into
mainfrom
fix/recognise-clade-anchor-shapes

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Problem

The identity check in validate-a2ml.sh only matched TOML ^(agent-id|name|project) =. Two legitimate, differently-shaped A2ML doc types therefore produced false-positive "Missing required identity field" errors:

Doc type Example Where identity actually lives
Clade declaration CLADE.a2ml gv-clade-index registry uuid + canonical-name under [identity] + [clade] block
Anchor ANCHOR.a2ml YAML-flavoured reverse-DNS id: "org.hyperpolymath.<repo>" (key: value, never key = value)

Forcing a TOML name = line into either would corrupt registry-/YAML-governed files.

Fix

Detect both structurally and exempt them, mirroring the existing 6a2-manifest and contractile-shape carve-outs (hypatia#243 precedent: a validator that scans content patterns must distinguish a target file from a legitimately differently-shaped one).

  • is_clade_shape: [clade] section or canonical-name =
  • is_anchor_shape: ⚓ ANCHOR marker or reverse-DNS top-level id:

The change is strictly a relaxation — it can only clear false positives, never introduce errors. Verified against hyperpolymath/neurophone (15→0 identity errors with this + repo-side fixes) and against this repo's own corpus (12→10; the −2 are the clade/anchor files, 0 new errors).

Refs hyperpolymath/neurophone#41

🤖 Generated with Claude Code

The identity check only matched TOML `agent-id|name|project = ...`, so two
legitimate, differently-shaped A2ML doc types produced false-positive
"Missing required identity field" errors:

- Clade files (CLADE.a2ml): gv-clade-index registry declarations whose
  identity is the registry uuid + `canonical-name` under `[identity]`
  plus a `[clade]` assignment.
- Anchor files (ANCHOR.a2ml): YAML-flavoured, identity is the reverse-DNS
  `id:` value using `key: value` (never TOML `key = value`); forcing a
  `name =` line in would corrupt the YAML.

Both are now detected structurally and exempted, mirroring the existing
6a2-manifest and contractile-shape carve-outs (hypatia#243: a validator
that scans content patterns must distinguish a target file from a
legitimately differently-shaped one). The change is strictly a
relaxation — it can only clear false positives, never introduce errors.

Refs hyperpolymath/neurophone#41

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyperpolymath
Copy link
Copy Markdown
Owner Author

Superseded by #12 (59145c7), which generalises the carve-out to the entire .machine_readable/ tree (structural identity) and fully subsumes the clade/anchor-specific detection here. Verified: neurophone scores 0 identity errors against current main with no repo-side .a2ml edits. Closing as redundant.

@hyperpolymath hyperpolymath deleted the fix/recognise-clade-anchor-shapes branch May 17, 2026 01:46
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.

1 participant