Skip to content

Commit a1898b7

Browse files
Revert #53: TOML is not canonical A2ML (spec is S-expr/Djot-like) (#54)
Reverts #53. A2ML is the Attested Markup Language (tree-sitter grammar, 6 parsers), not TOML — so a 'canonical = TOML' dialect check was backwards. Canonical surface is being redefined to S-expression / Djot-like attested document. Removing the incorrect Check 5 + input. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent db22cd5 commit a1898b7

3 files changed

Lines changed: 0 additions & 46 deletions

File tree

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ RSR (Rhodium Standard Repository) projects to declare machine-readable
1212
metadata, AI agent instructions, and project state. This action scans
1313
for `.a2ml` files and validates their structure and required fields.
1414

15-
# Canonical dialect: TOML
16-
17-
Estate decision (2026-07-06): the **one canonical A2ML dialect is TOML**
18-
(`key = value` / `[section]`). Files written in YAML (`key:`) or S-expression
19-
(`(form ...)`) are non-canonical and should be converted. Check 5 flags them as
20-
a **warning** by default; set `enforce-canonical-dialect: true` to make it a
21-
hard **error** once a repository's `.a2ml` files are all converted. AI-manifest
22-
templates are exempt from this check until they are converted upstream in
23-
`rsr-template-repo` / `standards`.
24-
2515
# Checks Performed
2616

2717
1. **SPDX header** — Verifies `SPDX-License-Identifier` is present in

action.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@ inputs:
2929
will fail on any validation issue. Defaults to false.
3030
required: false
3131
default: 'false'
32-
enforce-canonical-dialect:
33-
description: >-
34-
When true, files written in a non-canonical A2ML dialect (YAML or
35-
S-expression instead of canonical TOML) are reported as errors rather
36-
than warnings. Defaults to false so the estate can migrate incrementally.
37-
Canonical A2ML dialect: TOML (key = value / [section]).
38-
required: false
39-
default: 'false'
4032
paths-ignore:
4133
description: >-
4234
Newline-separated path fragments to skip. Each line is matched as a
@@ -77,7 +69,6 @@ runs:
7769
env:
7870
INPUT_PATH: ${{ inputs.path }}
7971
INPUT_STRICT: ${{ inputs.strict }}
80-
INPUT_ENFORCE_CANONICAL_DIALECT: ${{ inputs.enforce-canonical-dialect }}
8172
INPUT_PATHS_IGNORE: ${{ inputs.paths-ignore }}
8273
run: |
8374
"${GITHUB_ACTION_PATH}/validate-a2ml.sh"

validate-a2ml.sh

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ set -euo pipefail
2626

2727
SCAN_PATH="${INPUT_PATH:-.}"
2828
STRICT="${INPUT_STRICT:-false}"
29-
ENFORCE_DIALECT="${INPUT_ENFORCE_CANONICAL_DIALECT:-false}"
3029
PATHS_IGNORE_RAW="${INPUT_PATHS_IGNORE:-}"
3130
GITHUB_OUTPUT_FILE="${GITHUB_OUTPUT:-/dev/null}"
3231

@@ -279,32 +278,6 @@ validate_a2ml() {
279278
fi
280279
fi
281280
done < "$file"
282-
283-
# --- Check 5: Canonical dialect (TOML) ---
284-
# Estate canon (2026-07-06): .a2ml is ONE dialect — TOML (`key = value` /
285-
# `[section]`). Flag repo-specific files still written as YAML (`key:`) or
286-
# S-expression (`(form ...)`). AI manifests are template-sourced (converted
287-
# upstream in rsr-template-repo/standards), so they are exempt here to avoid
288-
# estate-wide noise before that conversion lands. Warning by default so the
289-
# estate can migrate incrementally; set enforce_canonical_dialect=true to
290-
# make it a hard error once conversion is complete.
291-
if [[ "$is_manifest" == "false" ]]; then
292-
local _sexpr _toml _yaml _dialect=""
293-
_sexpr=$(grep -cE '^[[:space:]]*\([a-zA-Z]' "$file" 2>/dev/null || true)
294-
_toml=$(grep -cE '^[[:space:]]*(\[[^]]+\]|[A-Za-z0-9_.-]+[[:space:]]*=)' "$file" 2>/dev/null || true)
295-
_yaml=$(grep -cE '^[[:space:]]*[A-Za-z0-9_-]+:[[:space:]]' "$file" 2>/dev/null || true)
296-
if [[ "${_sexpr:-0}" -gt 2 && "${_toml:-0}" -eq 0 ]]; then
297-
_dialect="S-expression"
298-
elif [[ "${_yaml:-0}" -gt 2 && "${_toml:-0}" -le 1 ]]; then
299-
_dialect="YAML"
300-
fi
301-
if [[ -n "$_dialect" ]]; then
302-
local _sev="warning"
303-
[[ "$ENFORCE_DIALECT" == "true" ]] && _sev="error"
304-
report_issue "$_sev" "$file" "1" \
305-
"Non-canonical A2ML dialect ($_dialect). Canonical A2ML dialect is TOML (key = value / [section]); convert this file."
306-
fi
307-
fi
308281
}
309282

310283
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)