Skip to content

Commit 8358b11

Browse files
docs: ephapax↔AffineScript disambiguation hooks (README + CLAUDE.md + a2ml) (#152)
## Summary Plants three thin pointers in this repo to the canonical disambiguation doc at [nextgen-languages/docs/disambiguation/ephapax-vs-affinescript.md](https://github.com/hyperpolymath/nextgen-languages/blob/main/docs/disambiguation/ephapax-vs-affinescript.md): - **README.adoc** top-of-file [IMPORTANT] admonition. - **CLAUDE.md** (new file) with a 🚨 Disambiguation section as first content. - **.machine_readable/6a2/AGENTIC.a2ml** [agentic-config.disambiguation] block. All three explain: - This is Ephapax, not AffineScript. - The two share only hyperpolymath/typed-wasm as a compile target. - Ephapax is itself dyadic (ephapax-linear + ephapax-affine); the internal ephapax-affine sublanguage is NOT AffineScript. - The shared "affine" syllable is a substructural-logic family name, not a project relationship. ## Why AI agents (and humans) have repeatedly conflated this repo with hyperpolymath/affinescript across sessions. The two languages share zero AST / typing / borrow-checker / codegen. ## Companion PRs Symmetric disambiguation hooks landing in: - hyperpolymath/affinescript — README admonition + AGENTS.md (or equivalent) + a2ml block. - hyperpolymath/typed-wasm — README "two unrelated producers target this format" callout. ## Test plan - [ ] Markdown/AsciiDoc renders cleanly on GitHub. - [ ] AGENTIC.a2ml parses (manual review). - [ ] CLAUDE.md picked up by Claude Code on next session start. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1bda88d commit 8358b11

3 files changed

Lines changed: 99 additions & 2 deletions

File tree

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,26 @@ banned = ["typescript", "go", "python", "makefile"]
3232
# NEVER modify formal proofs (Coq/Idris2) without verifying them.
3333
# Always run `just golden` before committing to ensure proof closure.
3434
# Respect the dyadic boundary: affine vs linear must be explicitly handled.
35-
last-modified-at = "2026-04-23T13:00:00Z"
36-
modification-summary = "Initial creation from 1.0.0 template"
35+
last-modified-at = "2026-05-26T20:00:00Z"
36+
modification-summary = "Added @disambiguation block — Ephapax vs AffineScript canonical pointer"
37+
38+
# ── Disambiguation ────────────────────────────────────────────────────────
39+
# AI agents have repeatedly conflated this repo (Ephapax) with the unrelated
40+
# language AffineScript (hyperpolymath/affinescript). The two share exactly
41+
# one thing — both target hyperpolymath/typed-wasm — and otherwise have
42+
# different ASTs, type checkers, compilers, and proof stories. The shared
43+
# `affine` syllable names a substructural-logic property in BOTH cases (it's
44+
# a logic-family name), not a project relationship.
45+
[agentic-config.disambiguation]
46+
this = "hyperpolymath/ephapax"
47+
canonical-name = "Ephapax"
48+
distinct-from = ["hyperpolymath/affinescript"]
49+
shared-with-distinct = ["hyperpolymath/typed-wasm"]
50+
internal-sublanguages = ["ephapax-linear", "ephapax-affine"]
51+
# `ephapax-affine` is an internal sublanguage of THIS repo (dyadic with
52+
# ephapax-linear, one AST, one Rust crate). It is NOT the AffineScript
53+
# language at hyperpolymath/affinescript.
54+
ephapax-affine-is-not-affinescript = true
55+
canonical-doc = "https://github.com/hyperpolymath/nextgen-languages/blob/main/docs/disambiguation/ephapax-vs-affinescript.md"
56+
canonical-memory-entry = "feedback_affinescript_ephapax_siblings_not_impl_proof.md"
57+
do-not-apply-cross-repo-lessons-without-explicit-check = true

CLAUDE.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
<!-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> -->
3+
4+
# CLAUDE.md — Ephapax repo agent guidance
5+
6+
## 🚨 Disambiguation (read first)
7+
8+
**This repo is `hyperpolymath/ephapax`.** It is **NOT** `hyperpolymath/affinescript`.
9+
10+
| | This repo | NOT this repo |
11+
|---|---|---|
12+
| Name | **Ephapax** | AffineScript |
13+
| Path | `hyperpolymath/ephapax` | `hyperpolymath/affinescript` |
14+
| File extension | `.eph` | `.affine` (plus face dialects) |
15+
| Build | `Cargo.toml` at root | `dune-project` at root |
16+
| Type checker | `ephapax-linear/src/{linear,affine}.rs` (Rust) | `lib/borrow.ml` (OCaml) |
17+
| Proofs | `formal/Semantics.v` (Coq), `src/abi/Ephapax/…` (Idris2) | None mechanized; `lib/borrow.ml` only |
18+
19+
**Internal naming trap.** Ephapax itself is dyadic. Inside this repo:
20+
- **ephapax-linear** = strict, formally-verified core.
21+
- **ephapax-affine** = versatile prototyping companion to ephapax-linear.
22+
23+
Both are *internal sublanguages*. They share one AST, one Rust crate (`ephapax-linear/`), one grammar directory. **The `ephapax-affine` sublanguage is NOT AffineScript.** The word `affine` is shared because both happen to be substructural-logic-family type systems — that's a logic-family fact, not a project relationship.
24+
25+
**Rule for agents:** before applying any prior-session lesson, memory entry, or snippet, check whether it was about *ephapax* or about *AffineScript*. They share zero AST / typing / borrow-checker / codegen. The only shared surface is the compile target (`hyperpolymath/typed-wasm`).
26+
27+
When in doubt: state the context shift explicitly ("switching from AffineScript context to ephapax context") so the user sees the boundary respected.
28+
29+
**Canonical disambiguation doc** (single source of truth):
30+
https://github.com/hyperpolymath/nextgen-languages/blob/main/docs/disambiguation/ephapax-vs-affinescript.md
31+
32+
**Companion memory entry** (in user auto-memory):
33+
`feedback_affinescript_ephapax_siblings_not_impl_proof.md`
34+
35+
---
36+
37+
## Machine-readable artefacts
38+
39+
Structured project metadata lives in `.machine_readable/6a2/`:
40+
41+
- `STATE.a2ml` — current project state and progress.
42+
- `META.a2ml` — architecture decisions and development practices.
43+
- `ECOSYSTEM.a2ml` — position in the ecosystem and related projects.
44+
- `AGENTIC.a2ml` — AI agent interaction patterns (also carries an `@disambiguation` block).
45+
- `NEUROSYM.a2ml` — neurosymbolic integration config.
46+
- `PLAYBOOK.a2ml` — operational runbook.
47+
48+
## Standing reminders
49+
50+
- Formal-proof work touches `formal/Semantics.v` (Coq) and `src/abi/Ephapax/…/*.idr` (Idris2). Both build oracles are authoritative; `coqc` and `idris2 --check` are the only "is this proved?" answers.
51+
- Preservation closure plan: see `ROADMAP.adoc` § "Preservation closure plan" and `formal/PRESERVATION-HANDOFF.md`.
52+
- All commits GPG-signed (key `4A03639C1EB1F86C7F0C97A91835A14A2867091E`), email `6759885+hyperpolymath@users.noreply.github.com`. Auto-merge ON for every PR.

README.adoc

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,30 @@ image:https://api.thegreenwebfoundation.org/greencheckimage/ephapax.org[Green Ho
1616

1717
_ἐφάπαξ — once for all._
1818

19+
[IMPORTANT]
20+
.Not to be confused with AffineScript
21+
====
22+
This is **Ephapax**, a research language for WebAssembly memory safety.
23+
It is *not* https://github.com/hyperpolymath/affinescript[AffineScript], a
24+
separate language at `hyperpolymath/affinescript` that succeeds JS / TS /
25+
ReScript.
26+
27+
The two share **exactly one thing**: both target
28+
https://github.com/hyperpolymath/typed-wasm[typed-wasm]. They have separate
29+
ASTs, separate type checkers, separate compilers, separate proof stories.
30+
The word `affine` overlaps in both names because it names a substructural-
31+
logic property — that's a logic-family fact, not a project relationship.
32+
33+
Internal note: Ephapax is itself dyadic — `ephapax-linear` (strict core)
34+
and `ephapax-affine` (versatile prototyping companion) are *both inside this
35+
repo*, one Rust crate, one AST, two structural disciplines. **`ephapax-affine`
36+
is not AffineScript.** When ambiguous, write "ephapax-affine sublanguage"
37+
vs "AffineScript language".
38+
39+
Canonical disambiguation:
40+
link:https://github.com/hyperpolymath/nextgen-languages/blob/main/docs/disambiguation/ephapax-vs-affinescript.md[nextgen-languages/docs/disambiguation/ephapax-vs-affinescript.md].
41+
====
42+
1943
A dyadic linear+affine type system for compile-time WebAssembly
2044
memory safety. Resources are tracked through the type system so the
2145
compiler can guarantee — without a garbage collector — that no value

0 commit comments

Comments
 (0)