Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 0 additions & 57 deletions README.adoc

This file was deleted.

60 changes: 31 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,61 @@
[![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?logo=github)](https://github.com/sponsors/hyperpolymath)

= a2ml-pre-commit
:toc: preamble
:icons: font
<!--
SPDX-License-Identifier: CC-BY-SA-4.0
SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->

== Overview
# Overview

**Pre-commit hook for validating A2ML manifest files.**

A2ML (Agnostic Agent Markup Language) is a manifest format for machine-readable
metadata, AI agent instructions, and project state. This hook validates `.a2ml`
files on commit for structural correctness and required fields.
A2ML (Agnostic Agent Markup Language) is a manifest format for
machine-readable metadata, AI agent instructions, and project state.
This hook validates `.a2ml` files on commit for structural correctness
and required fields.

# Checks Performed

1. **SPDX header** — `SPDX-License-Identifier` in the first 10 lines

2. **Identity fields** — Requires `agent-id`, `name`, or `project`
(relaxed for AI-MANIFEST files)

== Checks Performed
3. **Version field** — `version` or `schema_version` presence

1. **SPDX header** — `SPDX-License-Identifier` in the first 10 lines
2. **Identity fields** — Requires `agent-id`, `name`, or `project` (relaxed for AI-MANIFEST files)
3. **Version field** — `version` or `schema_version` presence
4. **Attestation blocks** — Validates `proof`/`signature`/`hash` fields if `[attestation]` section exists
4. **Attestation blocks** — Validates `proof`/`signature`/`hash` fields
if `[attestation]` section exists

== Installation
# Installation

Add to your `.pre-commit-config.yaml`:

[source,yaml]
----
```yaml
repos:
- repo: https://github.com/hyperpolymath/a2ml-pre-commit
rev: v1.0.0
hooks:
- id: validate-a2ml
----
```

Then install:

[source,bash]
----
```bash
pre-commit install
----
```

== Manual Usage
# Manual Usage

You can also run the hook script directly:

[source,bash]
----
```bash
./hooks/validate-a2ml.sh path/to/file.a2ml [more-files.a2ml ...]
----
```

== Author
# Author

Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
Jonathan D.A. Jewell \<[j.d.a.jewell@open.ac](j.d.a.jewell@open.ac).uk\>

== License
# License

SPDX-License-Identifier: CC-BY-SA-4.0

See link:LICENSE[LICENSE] for details.
See [LICENSE](LICENSE) for details.
Loading