File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [ ![ Sponsor] ( https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?logo=github )] ( https://github.com/sponsors/hyperpolymath )
2+
3+ = a2ml-pre-commit
4+ :toc: preamble
5+ :icons: font
6+
7+ == Overview
8+
9+ ** Pre-commit hook for validating A2ML manifest files.**
10+
11+ A2ML (Agnostic Agent Markup Language) is a manifest format for machine-readable
12+ metadata, AI agent instructions, and project state. This hook validates ` .a2ml `
13+ files on commit for structural correctness and required fields.
14+
15+ == Checks Performed
16+
17+ 1 . ** SPDX header** — ` SPDX-License-Identifier ` in the first 10 lines
18+ 2 . ** Identity fields** — Requires ` agent-id ` , ` name ` , or ` project ` (relaxed for AI-MANIFEST files)
19+ 3 . ** Version field** — ` version ` or ` schema_version ` presence
20+ 4 . ** Attestation blocks** — Validates ` proof ` /` signature ` /` hash ` fields if ` [attestation] ` section exists
21+
22+ == Installation
23+
24+ Add to your ` .pre-commit-config.yaml ` :
25+
26+ [ source,yaml]
27+ ----
28+ repos:
29+ - repo: https://github.com/hyperpolymath/a2ml-pre-commit
30+ rev: v1.0.0
31+ hooks:
32+ - id: validate-a2ml
33+ ----
34+
35+ Then install:
36+
37+ [ source,bash]
38+ ----
39+ pre-commit install
40+ ----
41+
42+ == Manual Usage
43+
44+ You can also run the hook script directly:
45+
46+ [ source,bash]
47+ ----
48+ ./hooks/validate-a2ml.sh path/to/file.a2ml [ more-files.a2ml ...]
49+ ----
50+
51+ == Author
52+
53+ Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk >
54+
55+ == License
56+
57+ SPDX-License-Identifier: MPL-2.0
58+
59+ See link: LICENSE [ LICENSE] for details.
You can’t perform that action at this time.
0 commit comments