anytype is the reference kernel for systemet (Equality Theory): a small, parameterised type checker whose discipline you choose by choosing the algebra at the resource layer. The wager it implements is one sentence — do not add a new type relation when a layer discipline will do.
|
Important
|
Why "anytype" and not "EveryType". This kernel was first drafted under the name
EveryType. That name over-claimed: it suggested a universal "every type" relation,
which is exactly the System-Fc trap this design refuses. The honest claim is the
opposite of universal coercion — pick any resource algebra you like, and the same
kernel gives you that discipline. Hence anytype. (See
|
anytype is a kernel for building disciplined type systems by changing the algebra at the resource layer (L2), rather than by bolting on new type relations. It is the implementation side of the split:
-
the theory — what the layers mean, which collapses are refused, and what must be proven — lives in systemet;
-
the engine — the checker, the pluggable grade machinery, the runtime/ABI seam — lives here.
anytype pins systemet upstream and may extend, not redefine it. If implementation pressure ever demands a change to the theory, that is an ADR in systemet, not a quiet edit here.
The whole point of the kernel is that a new discipline is a one-line change of the L2 grade algebra, checked by the same rules:
grade = Affine
grade = Cost * Nat
grade = Low <= High (an information-flow lattice)
grade = [0,1] (a probability-like grade)
grade = PrivacyBudget
grade = Latency x BillingA candidate grade is admissible only if it satisfies the laws the checker requires (the relevant semiring/ordering operations). "Pick the algebra" is not "attach arbitrary metadata". The laws a grade must satisfy are systemet’s to define; the checking against them is anytype’s to perform.
These are the layers of Equality Theory as the kernel sees them. For what each layer means, read systemet; this table is only the implementation status.
| Layer | Kernel responsibility | Implementation status |
|---|---|---|
L4 · effects |
Effect handlers; detect when a Total+Effect-graded+Affine (TEA) handler erases |
not started — depends on systemet’s open TEA-erasure result |
L3 · recursion |
Guarded recursion checking |
not started |
L2 · resources |
The graded-modal substrate + the pluggable grade-algebra interface |
built (MVP) — |
L1 · equality |
Equality as |
built (MVP cut) — a bidirectional simply-graded λ-calculus whose type-index
language has no recursion constructor, so type-level computation is total by
construction (a syntactic gate, machine-checked via |
L0 · runtime |
Lowering to a WASM/C target |
not started |
|
Warning
|
Honesty check. At this commit the kernel exists for the MVP cut only:
a simply-graded λ-calculus ( |
# See the available repository tasks
just
# Validate the repository shape (this works today — it checks RSR structure)
just validate
# Build / test the kernel (placeholder targets until the kernel exists)
just test
just quality| Path | What lives there |
|---|---|
|
Universal entry point for AI agents. Read this before making changes. |
|
Project metadata, policies, contractiles, AI configs, 6A2 state, anchors. |
|
(Planned) anytype kernel implementation. |
|
Typed ABI/FFI seam: Idris2 interface descriptions, Zig FFI, generated headers. |
|
(Planned) proofs/tests that the kernel honours systemet’s obligations. |
|
Status notes, decisions, diagrams, design records. |
|
Engineering deep-dive: how README claims map to files, caveats, evidence. |
|
Dated honesty snapshot of what the kernel currently does and does not do. |
|
Release audit gate. |
|
Task surface. Thin aliases delegate to the build/session machinery. |
The interesting comparison is the theory — see systemet’s README for the full table. As an engine, anytype’s distinguishing bet is that the discipline is a parameter (the L2 grade algebra), not a fixed feature set:
| anytype | Haskell / System Fc | Rust | |
|---|---|---|---|
Discipline source |
pluggable L2 grade algebra |
fixed relation set (equality evidence, roles) |
fixed (ownership, lifetimes, variance) |
Coercions |
none (equality is conversion) |
yes |
representation/lifetime-sensitive |
Roles |
tropes |
global role system |
lifetime / variance discipline |
-
systemet is the theory anytype implements; it is the semantic authority. anytype must not silently diverge from it.
-
AffineScript is one product profile of this kernel (
grade = affine + cost), aimed at WASM contracts and edge functions. It is downstream of anytype.
This repository uses the Rhodium Standard Repository pattern: machine-readable
metadata under .machine_readable/, the 0-AI-MANIFEST.a2ml agent entry point,
just validate for repository shape, governance and release gates, and SPDX-based
licensing. The RSR machinery is repository infrastructure — it is not part of the
anytype kernel, and passing RSR validation proves nothing about the kernel’s
correctness. See EXPLAINME.adoc#_rsr_integration.
Most of the deep work is theory and proof and belongs in systemet. Engine-side contributions that belong here:
-
the L2 grade-algebra interface and concrete grade instances (affine, cost, information-flow lattice, privacy budget) that satisfy systemet’s laws;
-
the L1 conversion checker and its totality gate;
-
the typed ABI/FFI seam (
src/interface/).
Open issues with one of: [ET-L2], [ET-L3], [ET-L4], [TROPE], [TEA].
Code, configuration, and scripts are licensed under the Mozilla Public License 2.0
(MPL-2.0); prose documentation under CC-BY-SA-4.0. Per-file
SPDX-License-Identifier headers are authoritative; the GitHub-detected licence is
MPL-2.0 via the root LICENSE. Long-term attribution uses Quantum-Safe Provenance
(PMPL Exhibit B where present).