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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ build/
.*.aux
.lia.cache
.Makefile.d
formal/.build.mk.d
formal/build.mk
formal/build.mk.conf
# NOTE: _CoqProject IS tracked (it's the project definition file)
# NOTE: formal/Makefile is generated by coq_makefile — do NOT track

Expand Down
36 changes: 36 additions & 0 deletions .machine_readable/6a2/AGENTIC.a2ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# AGENTIC.a2ml - AI agent interaction patterns for ephapax
# Template from: https://github.com/hyperpolymath/standards

# ── Agent Configuration ────────────────────────────────────────────────────
[agentic-config]
version = "1.0.0"
project = "ephapax"

# ── Claude Code Settings ──────────────────────────────────────────────────
[agentic-config.claude-code]
model = "claude-opus-4-5-20251101"
tools = ["read", "edit", "bash", "grep", "glob"]
permissions = "read-all"

# ── Coding Patterns ───────────────────────────────────────────────────────
[agentic-config.patterns]
code-review = "thorough"
refactoring = "conservative"
testing = "comprehensive"
documentation = "inline"

# ── Language Constraints ──────────────────────────────────────────────────
[agentic-config.constraints]
# Allowed languages for the project
languages = ["rust", "zig", "idris2", "coq", "bash", "just"]
# Organization-wide banned languages
banned = ["typescript", "go", "python", "makefile"]

# ── Project-Specific Overrides ────────────────────────────────────────────
[agentic-config.project-specific]
# NEVER modify formal proofs (Coq/Idris2) without verifying them.
# Always run `just golden` before committing to ensure proof closure.
# Respect the dyadic boundary: affine vs linear must be explicitly handled.
last-modified-at = "2026-04-23T13:00:00Z"
modification-summary = "Initial creation from 1.0.0 template"
21 changes: 21 additions & 0 deletions .machine_readable/6a2/ANCHOR.a2ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# ⚓ ANCHOR: ephapax
# Canonical authority and project recalibration trigger for ephapax.
# Template from: https://github.com/hyperpolymath/standards

id: "org.hyperpolymath.ephapax"
version: "1.0.0"
clade: "foundation-language"
status: "active"

# SSG Configuration (Unified boj-server build)
ssg:
engine: "casket"
output_dir: "public"
boj_trigger: true
cartridge: "ssg-mcp"

# Relationships
parents:
- "org.hyperpolymath.standards"
- "org.hyperpolymath.boj-server"
- "org.hyperpolymath.nextgen-languages"
22 changes: 10 additions & 12 deletions .machine_readable/6a2/ECOSYSTEM.a2ml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# ECOSYSTEM.a2ml — Ecosystem position
# Converted from ECOSYSTEM.scm on 2026-04-12
# ECOSYSTEM.a2ml — Ecosystem position for ephapax
# Converted and updated 2026-04-23

[metadata]
project = "ephapax"
ecosystem = "hyperpolymath"

[position]
type = "programming-language"
purpose = "A dyadic linear/affine language targeting WebAssembly with dual formalisation (Coq + Idris2)"
type = "foundation-language"
purpose = "A dyadic linear/affine language targeting WebAssembly with dual formalisation (Coq + Idris2). Ensures resource safety for the entire neurosymbolic stack."

[pipeline]
position = "co-product"
chain = "katagoria → typell → typed-wasm → PanLL"
notes = "Ephapax compiles to typed WasmGC. TypeLL principles ground its dyadic type design, and typed-wasm provides shared binary layout/ABI conventions."
coordination = "nextgen-typing"
position = "foundation"
chain = "katagoria → ephapax → typed-wasm → PanLL"
notes = "Ephapax provides the resource-safety guarantees (no-leak, no-use-after-free) that higher-level languages in the ecosystem depend on."

[related-projects]
projects = [
{ name = "nextgen-typing", relationship = "coordination-parent", notes = "Canonical architecture and pipeline context for the type theory stack." },
{ name = "proven", relationship = "downstream-consumer", notes = "Proven consumes ephapax via Zig bindings for high-assurance resource management." },
{ name = "007-lang", relationship = "sibling-language", notes = "Shares linear logic concepts for agent handles and session types." },
{ name = "typed-wasm", relationship = "aggregate-library", notes = "Shared binary layout conventions for WasmGC cross-language calls." },
{ name = "typell", relationship = "type-theory-foundation", notes = "TypeLL open-ended progressive framework informs Ephapax type-system evolution." },
{ name = "affinescript", relationship = "sibling-wasm-target", notes = "Both compile to typed WasmGC and converge via typed-wasm layout conventions." },
{ name = "katagoria", relationship = "research-upstream", notes = "Future type-theory level candidates can originate there before pipeline promotion." },
{ name = "standards", relationship = "parent", notes = "Enforces the RSR 2026 standards that ephapax implements." },
]
49 changes: 41 additions & 8 deletions .machine_readable/6a2/META.a2ml
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# META.a2ml — Project meta-information
# Converted from META.scm on 2026-03-15

[metadata]
project = "ephapax"
author = "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"
license = "PMPL-1.0-or-later"
standard = "RSR 2026"
# META.a2ml - Project metadata and architectural decisions for ephapax
# Template from: https://github.com/hyperpolymath/standards

# ── Project Identity ───────────────────────────────────────────────────────
[project-meta]
version = "1.0.0"
name = "ephapax"

# ── Architecture Decisions ─────────────────────────────────────────────────
[project-meta.architecture-decisions]

[project-meta.architecture-decisions.adr-001]
status = "accepted"
date = "2026-03-10"
context = "Need safe memory management without a garbage collector for WASM targets."
decision = "Dyadic type system: one part affine, the other linear."
consequences = "Guaranteed no use-after-free and no memory leaks at compile time."

[project-meta.architecture-decisions.adr-002]
status = "accepted"
date = "2026-04-11"
context = "Formal verification of the type system is required for high-assurance use."
decision = "Dual formalization in Coq (operational semantics) and Idris2 (type structure)."
consequences = "Fully closed proofs (67 Qed) ensuring the correctness of the linear logic engine."

# ── Development Practices ──────────────────────────────────────────────────
[project-meta.development-practices]
code-style = "rsr-strict"
security = "formal-verification"
testing = "golden-path-tests"
versioning = "semver"
documentation = "asciidoc"
branching = "trunk-based"

# ── Design Rationale ──────────────────────────────────────────────────────
[project-meta.design-rationale]
# ephapax (ἐφάπαξ — once for all) ensures every linear resource is used
# exactly once. This is foundational for high-performance, crash-proof
# systems where memory leaks or use-after-free are unacceptable.
last-modified-at = "2026-04-23T13:00:00Z"
modification-summary = "Updated to 1.0.0 template standards and recorded dual-formalization milestone"
25 changes: 25 additions & 0 deletions .machine_readable/6a2/NEUROSYM.a2ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# NEUROSYM.a2ml — Neurosymbolic integration metadata for ephapax
# Template from: https://github.com/hyperpolymath/standards

[metadata]
version = "1.0.0"
last-updated = "2026-04-23"

[hypatia-config]
scan-enabled = true
scan-depth = "standard"
report-format = "logtalk"
rulesets = ["rsr-baseline", "linear-logic-safety", "license-compliance"]

[symbolic-rules]
rules = [
{ name = "no-use-after-free", pattern = "linear resource consumption followed by access", severity = "critical" },
{ name = "no-unsafe-idris", pattern = "believe_me|assert_total", severity = "critical" },
{ name = "no-unsafe-coq", pattern = "Admitted", severity = "critical" },
]

[neural-config]
confidence-threshold = 0.95
model = "hypatia-v2-formal"
notes = "Uses the formal-verification specialized model to ensure linear logic invariants hold across the implementation."
36 changes: 36 additions & 0 deletions .machine_readable/6a2/PLAYBOOK.a2ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# PLAYBOOK.a2ml — Operational playbook for ephapax
# Template from: https://github.com/hyperpolymath/standards

[metadata]
version = "1.0.0"
last-updated = "2026-04-23"

[deployment]
method = "ci-triggered"
target = "wasm"
notes = "Primary target is wasm32-unknown-unknown for safe memory resource management."

[incident-response]
steps = [
"1. Read 0-AI-MANIFEST.a2ml for canonical locations.",
"2. Check .machine_readable/6a2/STATE.a2ml for active blockers or proof debt.",
"3. Run `just test` to verify current implementation state.",
"4. Run `just proofs` to verify Coq operational semantics.",
"5. Run `just idris-build` to verify type-theoretic proofs.",
]

[release-process]
steps = [
"1. Update version and last-updated in all 6A2 files and Cargo.toml.",
"2. Run `just golden` to ensure tests and proofs are 100% closed.",
"3. Verify RSR compliance with `just validate-rsr`.",
"4. Tag the release with `vX.Y.Z`.",
"5. Push tags and update the 'last-updated' field in META.a2ml.",
]

[maintenance-operations]
audit = "just maint-audit"
hard-pass = "just maint-hard-pass"
proof-verification = "just golden"
wasm-conformance = "just conformance"
54 changes: 13 additions & 41 deletions .machine_readable/6a2/STATE.a2ml
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
# SPDX-License-Identifier: PMPL-1.0-or-later
# STATE.a2ml — Project state checkpoint
# Converted from STATE.scm on 2026-03-15
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
#
# STATE.a2ml v2 — Thin Session Journal for ephapax
# See: standards/a2ml-templates/STATE.a2ml.v2.spec.adoc

[metadata]
project = "ephapax"
version = "0.1.0"
last-updated = "2026-04-11"
status = "active"
@state(version="2.0"):
phase: "implementation"
next_action: "Wire real PipeWire session through type checker (PipeWire Proving Ground)"
last_action: "Standardized to RSR 2026 with v2 STATE format and 6a2 alignment"
updated: 2026-04-23T13:00:00Z

[project-context]
name = "ephapax"
completion-percentage = 65
phase = "implementation"
description = "Linear type system compiler — 19 crates, formal proofs FULLY CLOSED (67 Qed, 0 Admitted)"
crg-grade = "C"

[dogfooding-status]
# Populated 2026-04-19 against real on-disk integrations. Each entry must
# resolve to a grep-hit in the cited path. Per memory: ephapax is the
# proven-alternatives source, so `proven` is its canonical downstream consumer.
proven-consumer = "2026-04-19 — proven repo consumes ephapax via Zig bindings (types.zig, ephapax_proven.zig, lru_adapter.zig + lru_impl.zig, buffer_adapter.zig + buffer_impl.zig, resource_adapter.zig + resource_impl.zig, stubs.c + build.zig + DYADIC-FFI-DESIGN.md). Path: verification-ecosystem/proven/bindings/ephapax/"

[formal-proofs]
rocq-version = "9.1.1"
compiles-clean = true
qed-count = 67
admitted-count = 0
admit-sub-goals = 0
# FULLY VERIFIED — all theorems closed as of 2026-04-11 audit
# Final closures (post 2026-04-04):
# - subst_typing_gen: Admitted → Qed (bea3ac8, 47→64 Qed)
# - preservation: last Admitted closed (a1a93d1, debug artifacts cleaned)
# Type system is now formally verified end-to-end:
# subst_typing_gen → subst_preserves_typing → preservation (all Qed)

[next-priorities]
# P1 (DONE): Formal proofs — 0 Admitted remaining
# P2: PipeWire proving ground — wire real PipeWire session through type checker
# Spec: memory/ephapax-pipewire-project.md
# P3: typed-wasm compilation target — ensure Ephapax IR compatible with typed-wasm ABI
# Spec: /var/mnt/eclipse/repos/typed-wasm/docs/architecture/AGGREGATE-LIBRARY-VISION.adoc
# P4: Toolchain merge with AffineScript — shared modules where possible
# Spec: docs/specs/DYADIC-VISION.adoc
@blockers:
# No active blockers. Formal proofs FULLY CLOSED (67 Qed, 0 Admitted).
@end
@end
Loading
Loading