Skip to content

Commit d6ab0cb

Browse files
committed
Add sponsor badge
1 parent d77b5b8 commit d6ab0cb

1 file changed

Lines changed: 113 additions & 0 deletions

File tree

README.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
[![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?logo=github)](https://github.com/sponsors/hyperpolymath)
2+
3+
= a2ml-validate-action
4+
:toc: preamble
5+
:icons: font
6+
7+
== Overview
8+
9+
**GitHub Action to validate A2ML manifest files in your repository.**
10+
11+
A2ML (Agnostic Agent Markup Language) is a manifest format used across RSR
12+
(Rhodium Standard Repository) projects to declare machine-readable metadata,
13+
AI agent instructions, and project state. This action scans for `.a2ml` files
14+
and validates their structure and required fields.
15+
16+
== Checks Performed
17+
18+
1. **SPDX header** — Verifies `SPDX-License-Identifier` is present in the first 10 lines
19+
2. **Identity fields** — Requires `agent-id`, `name`, or `project` field (relaxed for AI-MANIFEST files)
20+
3. **Version field** — Checks for `version` or `schema_version`
21+
4. **Attestation blocks** — If an `[attestation]` section exists, validates it contains `proof`, `signature`, or `hash` fields
22+
5. **Section syntax** — Warns on malformed `[section]` headings with unclosed brackets
23+
24+
== Usage
25+
26+
Add to your workflow:
27+
28+
[source,yaml]
29+
----
30+
name: Validate A2ML
31+
on: [push, pull_request]
32+
33+
permissions:
34+
contents: read
35+
36+
jobs:
37+
validate:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- uses: hyperpolymath/a2ml-validate-action@v1
42+
with:
43+
path: '.' # Directory to scan (default: repo root)
44+
strict: 'false' # Promote warnings to errors (default: false)
45+
# paths-ignore: defaults to vendored / fixture patterns; override
46+
# via newline-separated string. Use '' to disable.
47+
----
48+
49+
=== Inputs
50+
51+
[cols="1,1,3"]
52+
|===
53+
| Input | Default | Description
54+
55+
| `path`
56+
| `.`
57+
| Directory path to scan for `.a2ml` files
58+
59+
| `strict`
60+
| `false`
61+
| When `true`, warnings become errors and the action fails on any issue
62+
63+
| `paths-ignore`
64+
| _vendored & fixture defaults_
65+
| Newline-separated path fragments to skip. Substring match against each
66+
file path. Default set: `vendor/`, `vendored/`, `verified-container-spec/`,
67+
`.audittraining/`, `integration/fixtures/`, `test/fixtures/`,
68+
`tests/fixtures/`. Pass an empty string (`paths-ignore: ''`) to disable
69+
and scan everything. See https://github.com/hyperpolymath/hypatia/pull/243
70+
for the architectural rationale (content-pattern validators must
71+
distinguish targets from fixtures / vendored / training-corpus files
72+
that legitimately contain the very pattern being checked).
73+
|===
74+
75+
==== Why default-on path exemptions?
76+
77+
A2ML files inside vendored projects (e.g. `verified-container-spec/`) have
78+
their own identity declarations elsewhere or are themselves training corpora.
79+
Flagging every such file as "missing identity field" is provenance noise,
80+
not signal. The defaults match the canonical RSR vendored-content paths;
81+
override for project-specific carve-outs.
82+
83+
=== Outputs
84+
85+
[cols="1,3"]
86+
|===
87+
| Output | Description
88+
89+
| `files-scanned`
90+
| Number of `.a2ml` files processed
91+
92+
| `errors`
93+
| Count of validation errors
94+
95+
| `warnings`
96+
| Count of validation warnings
97+
|===
98+
99+
== Strict Mode
100+
101+
In strict mode (`strict: 'true'`), all warnings are promoted to errors. This
102+
is useful for repositories that require full A2ML compliance, such as those
103+
following the RSR standard.
104+
105+
== Author
106+
107+
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
108+
109+
== License
110+
111+
SPDX-License-Identifier: MPL-2.0
112+
113+
See link:LICENSE[LICENSE] for details.

0 commit comments

Comments
 (0)