11# SPDX-License-Identifier: MPL-2.0
22# 0-AI-MANIFEST.a2ml — error-lang
33# Universal AI Agent Gateway — Read This First
4- # Generated : 2026-03-14
4+ # Last updated : 2026-06-02
55
66## Identity
77
@@ -12,8 +12,8 @@ description: >
1212 A dissembling / decompositional educational programming language. Programs,
1313 syntax, semantics, and types can decay, decompose, and destabilise over time,
1414 and the language EXPOSES that decomposition (consequence amplification +
15- stability scoring) rather than hiding it. Error-first with graduated error
16- levels and a ReScript playground compiler .
15+ stability scoring) rather than hiding it. Echo types give structured loss a
16+ first-class shape. Error-first with graduated error levels .
1717license: MPL-2.0
1818
1919## Core Narrative (read before reasoning about features)
@@ -33,55 +33,105 @@ debit is never hidden. See docs/Echo-Decomposition.adoc and spec/type-system.md
3333- Decomposition must be visible: never make echo_to_residue a silent cast,
3434 never let EchoR behave like Echo, never hide the erasure stability debit
3535- SCM files ONLY in `.machine_readable/` (root copies are symlinks)
36- - NEVER delete spec files: grammar, SPEC.core.scm
36+ - NEVER delete spec files: spec/ grammar.ebnf, spec/ SPEC.core.scm
3737- NEVER use banned languages: TypeScript, Node.js, npm, Go, Python
3838- All GitHub Actions must be SHA-pinned
39- - All source files must have SPDX headers
39+ - All source files must have SPDX-License-Identifier: MPL-2.0 headers
4040- Root symlinks MUST be maintained when moving files
41+ - NEVER use the AGPL license (use MPL-2.0)
42+ - DO NOT remove compiler/*.res files — they are a legacy reference frontend
43+ pending AffineScript re-target. The governance CI failure is pre-existing.
44+
45+ ## Known Pre-existing CI Failure
46+
47+ governance / Language / package anti-pattern policy FAILS on every PR and on
48+ main because compiler/src/*.res files exist. This is intentional/legacy — the
49+ compiler is a reference frontend in a non-standard early ReScript dialect. The
50+ runnable implementation is in cli/. Resolution: AffineScript re-target
51+ (contractiles/lust/Intentfile INTENT-001). Do NOT work around it by removing
52+ .res files or patching governance.yml.
4153
4254## Canonical File Locations
4355
44- ### Machine-Readable Metadata (.machine_readable/)
45- - `.machine_readable/AGENTIC.scm`
46- - `.machine_readable/ECOSYSTEM.scm`
47- - `.machine_readable/META.scm`
48- - `.machine_readable/NEUROSYM.scm`
49- - `.machine_readable/PLAYBOOK.scm`
50- - `.machine_readable/STATE.scm`
56+ ### Human Orientation
57+ - `EXPLAINME.adoc` — Comprehensive human/agent orientation (read this too)
58+ - `README.adoc` — GitHub landing page overview
59+
60+ ### Machine-Readable Metadata (.machine_readable/6a2/)
61+ - `.machine_readable/6a2/STATE.a2ml` — Current project state and session history
62+ - `.machine_readable/6a2/META.a2ml` — Architecture decisions (ADR-0001: Echo types)
63+ - `.machine_readable/6a2/AGENTIC.a2ml` — Agent permissions and constraints
64+ - `.machine_readable/6a2/ECOSYSTEM.a2ml` — Ecosystem position and related projects
65+ - `.machine_readable/6a2/NEUROSYM.a2ml` — Hypatia symbolic rules for Echo invariants
66+ - `.machine_readable/6a2/PLAYBOOK.a2ml` — Operational playbook
5167
68+ ### Operational Framework (contractiles/)
69+ - `contractiles/must/Mustfile` — Required invariants and validation checks
70+ - `contractiles/dust/Dustfile` — Recovery and rollback handlers
71+ - `contractiles/trust/Trustfile.hs` — Trust model and verification steps
72+ - `contractiles/lust/Intentfile` — Roadmap and intent (INTENT-001 through 005)
5273
5374### Specification (spec/)
54- - `spec/grammar.ebnf` — Canonical EBNF grammar (@taxonomy: spec/grammar)
75+ - `spec/grammar.ebnf` — Canonical EBNF grammar (@taxonomy: spec/grammar)
76+ - `spec/type-system.md` — Type system spec including §7 Echo Types
77+ - `spec/README.adoc` — Specification index
5578
56- - `spec/README.adoc` — Specification index
79+ ### Key Documentation (docs/)
80+ - `docs/Echo-Decomposition.adoc` — Echo types authoritative narrative
81+ - `docs/Design-Philosophy.adoc` — Why the language is designed this way
82+ - `docs/Error-Lang.adoc` — Full language reference
83+ - `docs/Error-Categories.adoc` — Nine error categories + stability debits
84+ - `docs/Curriculum.adoc` — Lesson sequence (Lessons 1–11)
5785
5886### Verification (verification/)
59- - `verification/proofs/` — Formal proofs
60- - `verification/tests/` — Test suite ../compiler/test
61- (symlink)
62- - `verification/conformance/` — Conformance tests ../conformance
63- (symlink)
64- - `verification/benchmarks/` — Performance benchmarks ../bench
65- (symlink)
66- - `verification/fuzzing/` — Fuzz targets ../compiler/fuzz
67- (symlink)
68- - `verification/README.adoc` — Verification index
87+ - `verification/proofs/` — Formal proofs
88+ - `verification/tests/` — Test suite (symlink → ../compiler/test)
89+ - `verification/conformance/` — Conformance tests (symlink → ../conformance)
90+ - `verification/benchmarks/` — Performance benchmarks (symlink → ../bench)
91+ - `verification/fuzzing/` — Fuzz targets (symlink → ../compiler/fuzz)
92+
93+ ### Compiler (reference frontend — non-standard ReScript dialect)
94+ - `compiler/src/Types.res` — Token + type AST (TyEcho, TyEchoResidue)
95+ - `compiler/src/Lexer.res` — Tokenizer (Echo, EchoR keywords)
96+ - `compiler/src/Parser.res` — AST builder (type expression parser)
97+ - `compiler/src/TypeChecker.res` — Type inference + unification (Echo rules)
98+ - `compiler/src/Bytecode.res` — VEcho/VResidue values + Echo opcodes
99+ - `compiler/src/VM.res` — Stack VM (echoEraseCost = 15.0)
100+ - `compiler/src/Codegen.res` — AST → bytecode
101+
102+ ### CLI (runnable implementation)
103+ - `cli/runtime.js` — Main runtime (Deno)
104+ - `cli/analyze.js` — Stability analysis
105+ - `cli/five-whys.js` — Root cause tracing
106+ - `cli/layer-navigator.js` — Five-layer view
107+
108+ ### Examples
109+ - `examples/01-hello-world.err` — Baseline
110+ - `examples/11-echo-decomposition.err` — Echo types (full demo with gutter zone)
69111
70112## Taxonomy Index
71113
72- - `spec/grammar.ebnf` — @taxonomy: spec/grammar
73-
74- - `spec/README.adoc` — @taxonomy: spec/index
75- - `verification/README .adoc` — @taxonomy: verification/index
76- - `playground/compiler/src/lexer/Lexer.res` — @taxonomy: compiler/lexer
77- - `playground/ compiler/src/parser/Parser .res` — @taxonomy: compiler/parser
78- - `editors/error-lang.tmLanguage.json` — @taxonomy: editors/textmate-grammar
79- - `docs/Echo-Decomposition.adoc` — @taxonomy: docs/echo-decomposition
80- - `spec/type-system.md` — @taxonomy: spec/type-system
114+ - `spec/grammar.ebnf` — @taxonomy: spec/grammar
115+ - `spec/type-system.md` — @taxonomy: spec/type-system
116+ - `spec/README.adoc` — @taxonomy: spec/index
117+ - `docs/Echo-Decomposition .adoc` — @taxonomy: docs/echo-decomposition
118+ - `verification/README.adoc` — @taxonomy: verification/index
119+ - `compiler/src/Lexer .res` — @taxonomy: compiler/lexer
120+ - `compiler/src/Parser.res` — @taxonomy: compiler/parser
121+ - `compiler/src/TypeChecker.res` — @taxonomy: compiler/typechecker
122+ - `compiler/src/VM.res` — @taxonomy: compiler/vm
81123
82124## Session Startup Sequence
83125
841261. Read this manifest (0-AI-MANIFEST.a2ml)
85- 2. Read `.machine_readable/STATE.scm` for current progress
86- 3. Read `.machine_readable/META.scm` for architecture decisions
87- 4. Read `.machine_readable/ECOSYSTEM.scm` for ecosystem context
127+ 2. Read `EXPLAINME.adoc` for comprehensive orientation
128+ 3. Read `.machine_readable/6a2/STATE.a2ml` for current project state
129+ 4. Read `.machine_readable/6a2/META.a2ml` for architecture decisions
130+ 5. Read `.machine_readable/6a2/AGENTIC.a2ml` for agent constraints
131+ 6. Read `.machine_readable/6a2/ECOSYSTEM.a2ml` for ecosystem context
132+
133+ ## Session Exit Sequence
134+
135+ 1. Update `.machine_readable/6a2/STATE.a2ml` with session outcomes
136+ 2. Ensure all new files have SPDX-License-Identifier: MPL-2.0 headers
137+ 3. Ensure Echo decomposition invariants are intact (run contractiles/must/Mustfile checks)
0 commit comments