Skip to content

Commit c829e31

Browse files
hyperpolymathclaude
andcommitted
migrate: 6SCM → 6A2ML format family + atomicity protocol (AAP v1.0)
- All documentation updated: SCM → A2ML references throughout - 0-AI-MANIFEST.a2ml: now references .a2ml files, includes AAP section - .claude/CLAUDE.md: A2ML format family, not Guile Scheme - A2ML templates: added [provenance] section and human-readable annotations - standards-update: migrated .machine_readable/ from .scm to .a2ml - standards-update/README.adoc: comprehensive SCM→A2ML terminology update, fixed dead links (meta-scm→meta-a2ml, etc.), added AAP reference - Old .scm files archived in 6scm-archive/ for reference - New: A2ML-ATOMICITY-PROTOCOL.adoc (AAP v1.0) — three-layer concurrent access protocol (provenance headers, advisory locks, OCC via git SHA) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f086c8b commit c829e31

29 files changed

Lines changed: 1003 additions & 215 deletions

.claude/CLAUDE.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Machine-Readable Artefacts
44

5-
Every Hyperpolymath repo must have `.machine_readable/` with these 6 SCM files:
5+
Every Hyperpolymath repo must have `.machine_readable/` with these 6 A2ML files:
66

7-
- `STATE.scm` - Current project state and progress
8-
- `META.scm` - Architecture decisions and development practices
9-
- `ECOSYSTEM.scm` - Position in the ecosystem and related projects
10-
- `AGENTIC.scm` - AI agent interaction patterns
11-
- `NEUROSYM.scm` - Neurosymbolic integration config
12-
- `PLAYBOOK.scm` - Operational runbook
7+
- `STATE.a2ml` - Current project state and progress
8+
- `META.a2ml` - Architecture decisions and development practices
9+
- `ECOSYSTEM.a2ml` - Position in the ecosystem and related projects
10+
- `AGENTIC.a2ml` - AI agent interaction patterns
11+
- `NEUROSYM.a2ml` - Neurosymbolic integration config
12+
- `PLAYBOOK.a2ml` - Operational runbook
1313

1414
See: https://github.com/hyperpolymath/standards
1515

@@ -30,7 +30,7 @@ See: https://github.com/hyperpolymath/standards
3030
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
3131
| **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs |
3232
| **Nickel** | Configuration language | For complex configs |
33-
| **Guile Scheme** | State/meta files | STATE.scm, META.scm, etc. |
33+
| **A2ML** | State/meta files | STATE.a2ml, META.a2ml, etc. (TOML-like format) |
3434
| **Julia** | Batch scripts, data processing | Per RSR |
3535
| **OCaml** | AffineScript compiler | Language-specific |
3636
| **Ada** | Safety-critical systems | Where required |

0-AI-MANIFEST.a2ml

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ⚠️ STOP - CRITICAL READING REQUIRED
1+
# STOP - CRITICAL READING REQUIRED
22

33
**THIS FILE MUST BE READ FIRST BY ALL AI AGENTS**
44

@@ -13,13 +13,13 @@ This is the AI manifest for **standards**. It declares:
1313

1414
### Machine-Readable Metadata: `.machine_readable/` ONLY
1515

16-
These 6 SCM files MUST exist in `.machine_readable/` directory ONLY:
17-
1. **STATE.scm** - Project state, progress, blockers
18-
2. **META.scm** - Architecture decisions, governance
19-
3. **ECOSYSTEM.scm** - Position in ecosystem, relationships
20-
4. **AGENTIC.scm** - AI agent interaction patterns
21-
5. **NEUROSYM.scm** - Neurosymbolic integration config
22-
6. **PLAYBOOK.scm** - Operational runbook
16+
These 6 A2ML files MUST exist in `.machine_readable/` directory ONLY:
17+
1. **STATE.a2ml** - Project state, progress, blockers
18+
2. **META.a2ml** - Architecture decisions, governance
19+
3. **ECOSYSTEM.a2ml** - Position in ecosystem, relationships
20+
4. **AGENTIC.a2ml** - AI agent interaction patterns
21+
5. **NEUROSYM.a2ml** - Neurosymbolic integration config
22+
6. **PLAYBOOK.a2ml** - Operational runbook
2323

2424
**CRITICAL:** If ANY of these files exist in the root directory, this is an ERROR.
2525

@@ -40,9 +40,9 @@ Bot-specific instructions for:
4040

4141
## CORE INVARIANTS
4242

43-
1. **No SCM duplication** - Root must NOT contain STATE.scm, META.scm, etc.
43+
1. **No A2ML duplication** - Root must NOT contain STATE.a2ml, META.a2ml, etc.
4444
2. **Single source of truth** - `.machine_readable/` is authoritative
45-
3. **No stale metadata** - If root SCMs exist, they are OUT OF DATE
45+
3. **No stale metadata** - If root A2ML files exist, they are OUT OF DATE
4646
4. **License consistency** - All code PMPL-1.0-or-later unless platform requires MPL-2.0
4747
5. **Author attribution** - Always "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"
4848

@@ -57,24 +57,36 @@ standards/
5757
├── 0-AI-MANIFEST.a2ml # THIS FILE (start here)
5858
├── README.md # Project overview
5959
├── [your source files] # Main code
60-
├── .machine_readable/ # SCM files (6 files)
61-
│ ├── STATE.scm
62-
│ ├── META.scm
63-
│ ├── ECOSYSTEM.scm
64-
│ ├── AGENTIC.scm
65-
│ ├── NEUROSYM.scm
66-
│ └── PLAYBOOK.scm
60+
├── .machine_readable/ # A2ML files (6 files)
61+
│ ├── STATE.a2ml
62+
│ ├── META.a2ml
63+
│ ├── ECOSYSTEM.a2ml
64+
│ ├── AGENTIC.a2ml
65+
│ ├── NEUROSYM.a2ml
66+
│ └── PLAYBOOK.a2ml
6767
└── .bot_directives/ # Bot instructions
6868
```
6969

70+
## A2ML ATOMICITY PROTOCOL (AAP)
71+
72+
When multiple agents or bots may be writing to A2ML files concurrently:
73+
74+
1. **Read** the file and record `git-sha-at-read` in the `[provenance]` section
75+
2. **Lock** by creating `.machine_readable/.lock-<FILENAME>` (advisory)
76+
3. **Write** the updated file with new `[provenance]` metadata
77+
4. **Release** by removing the lock file
78+
5. **Conflict** — if `git-sha-at-read` does not match current HEAD, re-read and retry
79+
80+
This prevents lost writes when multiple agents update state files simultaneously.
81+
7082
## SESSION STARTUP CHECKLIST
7183

72-
Read THIS file (0-AI-MANIFEST.a2ml) first
73-
Understand canonical locations (.machine_readable/, .bot_directives/)
74-
Know the invariants (no SCM duplication, etc.)
75-
Check for MCP enforcement (if applicable)
76-
Read `.machine_readable/STATE.scm` for current status
77-
Read `.machine_readable/AGENTIC.scm` for interaction patterns
84+
- Read THIS file (0-AI-MANIFEST.a2ml) first
85+
- Understand canonical locations (.machine_readable/, .bot_directives/)
86+
- Know the invariants (no A2ML duplication, etc.)
87+
- Check for MCP enforcement (if applicable)
88+
- Read `.machine_readable/STATE.a2ml` for current status
89+
- Read `.machine_readable/AGENTIC.a2ml` for interaction patterns
7890

7991
## LIFECYCLE HOOKS
8092

@@ -86,15 +98,15 @@ When starting a new session:
8698
2. Log session start (optional but recommended)
8799
- Format: `[YYYY-MM-DD HH:MM:SS] Session started: [agent-name]`
88100
- Location: `.machine_readable/session-log.txt`
89-
3. Read `.machine_readable/STATE.scm`
101+
3. Read `.machine_readable/STATE.a2ml`
90102
4. Check for blockers
91103
5. State understanding of canonical locations
92104

93105
### on-exit (Session End)
94106

95107
When ending a session:
96108

97-
1. Update `.machine_readable/STATE.scm` if changes made
109+
1. Update `.machine_readable/STATE.a2ml` if changes made
98110
2. Log session end (optional but recommended)
99111
- Format: `[YYYY-MM-DD HH:MM:SS] Session ended: [summary]`
100112
- Location: `.machine_readable/session-log.txt`
@@ -105,7 +117,7 @@ When ending a session:
105117

106118
After reading this file, demonstrate understanding by stating:
107119

108-
**"I have read the AI manifest. SCM files are located in `.machine_readable/` ONLY, bot directives in `.bot_directives/`, and I will not create duplicate files in the root directory."**
120+
**"I have read the AI manifest. A2ML files are located in `.machine_readable/` ONLY, bot directives in `.bot_directives/`, and I will not create duplicate files in the root directory."**
109121

110122
## META
111123

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,78 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# AGENTIC.a2ml - AI agent interaction patterns
33
# Template from: https://github.com/hyperpolymath/standards
4+
#
5+
# HUMAN SUMMARY: This file configures how AI coding agents (Claude, etc.)
6+
# should behave when working on this project. It sets model preferences,
7+
# permitted tools, coding patterns, and language constraints. Think of it
8+
# as a "rules of engagement" file for AI assistants.
49

10+
# ── Agent Configuration ────────────────────────────────────────────────────
511
[agentic-config]
12+
# version: Format version for this file.
613
version = "1.0.0"
14+
15+
# project: Must match the repo name exactly.
716
project = "{{PROJECT_NAME}}"
817

18+
# ── Claude Code Settings ──────────────────────────────────────────────────
919
[agentic-config.claude-code]
20+
# model: Which Claude model to use. Update when new models release.
1021
model = "claude-opus-4-5-20251101"
22+
23+
# tools: Which Claude Code tools the agent may use.
1124
tools = ["read", "edit", "bash", "grep", "glob"]
25+
26+
# permissions: Default file access level.
27+
# read-all — can read any file
28+
# read-some — restricted to certain directories
1229
permissions = "read-all"
1330

31+
# ── Coding Patterns ───────────────────────────────────────────────────────
1432
[agentic-config.patterns]
33+
# code-review: How thorough should code review be?
34+
# thorough — check every line, suggest improvements
35+
# standard — check for bugs and style issues
36+
# quick — only flag critical issues
1537
code-review = "thorough"
38+
39+
# refactoring: How aggressive should refactoring be?
40+
# conservative — minimal changes, preserve structure
41+
# moderate — improve when opportunity arises
42+
# aggressive — restructure freely for better design
1643
refactoring = "conservative"
44+
45+
# testing: How much test coverage to aim for?
46+
# comprehensive — test all paths, property-based tests
47+
# standard — test main paths and edge cases
48+
# minimal — test critical paths only
1749
testing = "comprehensive"
50+
51+
# documentation: Where to put documentation?
52+
# inline — comments in code
53+
# adoc — separate AsciiDoc files
54+
# both — inline + external docs
1855
documentation = "inline"
1956

57+
# ── Language Constraints ──────────────────────────────────────────────────
2058
[agentic-config.constraints]
59+
# languages: Languages the agent is allowed to write in this project.
2160
languages = ["rescript", "rust", "gleam", "{{PRIMARY_LANGUAGE}}"]
61+
62+
# banned: Languages the agent must NEVER use, even if asked.
2263
banned = ["typescript", "go", "python", "makefile"]
2364

65+
# ── Project-Specific Overrides ────────────────────────────────────────────
2466
[agentic-config.project-specific]
25-
# Custom patterns for this project
67+
# Custom patterns for this project. Add any project-specific agent
68+
# instructions here (e.g., "always use Result types", "no unwrap()").
69+
70+
# ── Provenance ─────────────────────────────────────────────────────────────
71+
[provenance]
72+
# Audit trail — updated automatically by agents/bots on every write.
73+
# Humans: you can ignore this section, but don't delete it.
74+
last-modified-by = "{{AGENT_ID}}"
75+
last-modified-at = "{{TIMESTAMP}}"
76+
last-session-id = ""
77+
git-sha-at-read = ""
78+
modification-summary = "Initial creation from template"
Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,71 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# ECOSYSTEM.a2ml - Project ecosystem positioning
33
# Template from: https://github.com/hyperpolymath/standards
4+
#
5+
# HUMAN SUMMARY: This file explains where this project fits in the broader
6+
# Hyperpolymath ecosystem. It describes what it is, what it isn't, and how
7+
# it relates to sibling/parent/child projects.
48

9+
# ── Ecosystem Identity ─────────────────────────────────────────────────────
510
[ecosystem]
11+
# version: Format version for this file.
612
version = "1.0.0"
13+
14+
# name: Must match the repo name exactly.
715
name = "{{PROJECT_NAME}}"
8-
type = "{{PROJECT_TYPE}}" # language, library, tool, infrastructure, playground
16+
17+
# type: What kind of project is this?
18+
# language — a programming language or dialect
19+
# library — reusable code package
20+
# tool — developer tooling (CLI, linter, etc.)
21+
# infrastructure — build systems, CI/CD, deployment
22+
# playground — experimental sandbox
23+
type = "{{PROJECT_TYPE}}"
24+
25+
# purpose: One-sentence description of why this project exists.
926
purpose = "{{PURPOSE}}"
10-
position-in-ecosystem = "{{POSITION}}" # core, supporting, experimental
1127

28+
# position-in-ecosystem: How central is this project?
29+
# core — essential, many things depend on it
30+
# supporting — useful but not critical
31+
# experimental — exploring ideas, may be discarded
32+
position-in-ecosystem = "{{POSITION}}"
33+
34+
# ── Related Projects ───────────────────────────────────────────────────────
1235
[ecosystem.related-projects]
13-
# relationship-type: sibling-standard, parent, child, dependency, inspiration
36+
# List related projects and their relationship type:
37+
# sibling-standard — same level, different focus
38+
# parent — this project belongs to / is part of
39+
# child — this project contains / manages
40+
# dependency — this project depends on
41+
# inspiration — influenced design but not a dependency
1442
nextgen-languages = "parent"
1543
language-playgrounds = "parent"
1644

45+
# ── What This Is ───────────────────────────────────────────────────────────
1746
[ecosystem.what-this-is]
47+
# Short descriptions of what the project provides. Helps humans and
48+
# AI agents quickly understand the scope.
1849
descriptions = [
1950
"{{DESCRIPTION_1}}",
2051
"{{DESCRIPTION_2}}",
2152
]
2253

54+
# ── What This Is NOT ──────────────────────────────────────────────────────
2355
[ecosystem.what-this-is-not]
56+
# Explicit boundaries — things people might assume this project does
57+
# but it intentionally does not. Prevents scope creep.
2458
descriptions = [
2559
"{{NOT_1}}",
2660
"{{NOT_2}}",
2761
]
62+
63+
# ── Provenance ─────────────────────────────────────────────────────────────
64+
[provenance]
65+
# Audit trail — updated automatically by agents/bots on every write.
66+
# Humans: you can ignore this section, but don't delete it.
67+
last-modified-by = "{{AGENT_ID}}"
68+
last-modified-at = "{{TIMESTAMP}}"
69+
last-session-id = ""
70+
git-sha-at-read = ""
71+
modification-summary = "Initial creation from template"

a2ml-templates/META.a2ml.template

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,66 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# META.a2ml - Project metadata and architectural decisions
33
# Template from: https://github.com/hyperpolymath/standards
4+
#
5+
# HUMAN SUMMARY: This is the project's "constitution". It records the big
6+
# decisions (Architecture Decision Records / ADRs), coding practices, and
7+
# design philosophy. Read this to understand *why* things are the way they are.
48

9+
# ── Project Identity ───────────────────────────────────────────────────────
510
[project-meta]
11+
# version: Format version for this file.
612
version = "1.0.0"
13+
14+
# name: Must match the repo name exactly.
715
name = "{{PROJECT_NAME}}"
816

17+
# ── Architecture Decisions ─────────────────────────────────────────────────
918
[project-meta.architecture-decisions]
10-
# ADR format: [project-meta.architecture-decisions.adr-NNN]
11-
# status, date, context, decision, consequences
19+
# ADRs go here as sub-tables. Each ADR is numbered:
20+
# [project-meta.architecture-decisions.adr-001]
21+
# status = "accepted" # proposed | accepted | deprecated | superseded | rejected
22+
# date = "2026-01-15"
23+
# context = "Why this decision was needed"
24+
# decision = "What was decided"
25+
# consequences = "What changed as a result"
1226

27+
# ── Development Practices ──────────────────────────────────────────────────
1328
[project-meta.development-practices]
14-
code-style = "{{CODE_STYLE}}" # rescript, rust, gleam, etc.
29+
# code-style: Which language's conventions to follow.
30+
# Common values: rescript, rust, gleam, elixir, idris2
31+
code-style = "{{CODE_STYLE}}"
32+
33+
# security: Which security framework is used.
1534
security = "openssf-scorecard"
35+
36+
# testing: Testing philosophy.
37+
# property-based — QuickCheck-style generative tests
38+
# unit — traditional unit tests
39+
# integration — end-to-end tests
1640
testing = "property-based"
41+
42+
# versioning: Version numbering scheme.
1743
versioning = "semver"
44+
45+
# documentation: Preferred documentation format.
1846
documentation = "asciidoc"
47+
48+
# branching: Git branching strategy.
49+
# trunk-based — single main branch, short-lived feature branches
50+
# git-flow — develop/release/hotfix branches
1951
branching = "trunk-based"
2052

53+
# ── Design Rationale ──────────────────────────────────────────────────────
2154
[project-meta.design-rationale]
22-
# Key design decisions and their reasoning
55+
# Key design decisions and their reasoning. Free-form notes about
56+
# why the project is structured the way it is. Not as formal as ADRs.
57+
58+
# ── Provenance ─────────────────────────────────────────────────────────────
59+
[provenance]
60+
# Audit trail — updated automatically by agents/bots on every write.
61+
# Humans: you can ignore this section, but don't delete it.
62+
last-modified-by = "{{AGENT_ID}}"
63+
last-modified-at = "{{TIMESTAMP}}"
64+
last-session-id = ""
65+
git-sha-at-read = ""
66+
modification-summary = "Initial creation from template"

0 commit comments

Comments
 (0)