Commit 49b8300
docs: reframe FFI + formal-proofs surfaces as experimental (W2-4) (#48)
## What changed & why
The prod-readiness audit found the Zig FFI and Agda proofs are
aspirational:
FFI ops are placeholders calling no Julia code, the "Idris2 ABI +
generated
header" pipeline in `ABI-FFI-README.md` never existed as anything but
removed
template scaffolding, and the Agda proofs cover discrete ℕ-lemmas, not
the
ℝ/Float64 statistical theorems the docs implied. Per the binding user
decision recorded in `.claude/tasks/prod-readiness/README.md` ("FFI
(Zig/C-ABI)
and Agda proofs are EXPERIMENTAL"), this PR is the docs/positioning
sweep
that follows W1-6 (Zig FFI compiles + CI) and W1-7 (Agda proofs
type-check +
CI) — no `.jl`/`.agda`/`.zig` logic changes, comment-text and docs only.
Work order: `.claude/tasks/prod-readiness/w2-4-experimental-reframe.md`.
### Files changed, before → after
| File | Before | After |
|---|---|---|
| `README.adoc` | No section describing FFI/proofs maturity. | Adds the
single canonical `== Experimental surfaces` section (after Architecture,
before License): labels FFI and Proofs both **Experimental**, states the
FFI entry points are placeholders and the Idris2 ABI layer is
design-only, states the Agda lemmas are ℕ-level not ℝ, and links
`ABI-FFI-README.md` / `proofs/README.adoc` / `PROOF-NEEDS.md`. Confirms
the Julia core remains tested/reference-validated. |
| `ABI-FFI-README.md` | Described the Idris2 ABI + generated-header
pipeline as if it existed; directory tree showed `src/abi/`,
`generated/abi/`, `bindings/` as real. | Adds an EXPERIMENTAL status
banner at the top pointing to README.adoc's canonical section; directory
tree and prose now say plainly that `src/abi/`, `generated/abi/`, and
`bindings/` do not exist in this repo and that only `ffi/zig/` is real
(compiles, CI-tested, placeholder ops). |
| `EXPLAINME.adoc` | Tools table listed "Idris2 ABI" as an available
component; prose claimed "optional formal verification of statistical
properties" and "formal verification that all numerical computation
originates from Julia". | Removes the Idris2 ABI table row (with a NOTE
explaining why); Zig FFI row now says EXPERIMENTAL/placeholder/links
canonical section; "Dogfooded" prose reframed to state the FFI standard
is experimental, the 10 Agda lemmas are ℕ-level proxies not ℝ theorems,
and the Julia-origin guarantee is a code-structure property (executor.jl
boundary), not an Agda-proven one. |
| `PROOF-NEEDS.md` | Title/intro implied a coverage catalogue; "Current
State" claimed `src/abi/*.idr` proofs existed (Idris2 ABI),
self-contradicting its own later "Template ABI Cleanup" note that they
were removed 2026-03-29. | Retitled "Open Proof Targets" with an
EXPERIMENTAL status line up top; "Current State" now says the Idris2
template ABI was removed 2026-03-29 and `src/abi/` does not exist, and
"Existing ABI proofs: none" — resolving the self-contradiction. File is
kept (not deleted), per the work order. |
| `RSR_OUTLINE.adoc` | Generic RSR template doc read as if describing
this repo's actual state. | Adds a NOTE clarifying it documents the
generic template Statistikles was bootstrapped from, that `src/abi/` in
it is target layout only, and pointing to README.adoc's canonical
section for Statistikles' actual status. |
| `docs/AI-CONVENTIONS.md` | "ABI/FFI Standard" section listed Idris2
ABI (`src/abi/`) and generated headers (`generated/abi/`) as standard
components without qualification. | Reframed as "Target design"; each
bullet now states explicitly what is/isn't present — Idris2 ABI "not
present in this repo; design-only", Zig FFI "real and CI-tested, but
EXPERIMENTAL: … placeholders", generated headers "not present; no
generation pipeline exists yet". |
| `docs/CROSS-VERIFICATION-ARCHITECTURE.md` | Layer 3 (ECHIDNA)
described as doing "Formal proofs of statistical identities via
Agda/Lean 4" without qualification; Layer 5 (TypeLL) described L10 as
"formally-proven epistemological types" without qualification. | Adds an
ASPIRATIONAL status banner at the top scoping the whole document; Layer
3 now says "planned; not wired up" and clarifies the 10 existing Agda
lemmas are ℕ-proxies, not ℝ identities, and ECHIDNA dispatch from
`echidna_adapter.jl` isn't implemented; Layer 5 clarifies L9-10 are a
target dependent on the unwired Layer-3 pipeline, so no value in the
codebase currently carries an L9/L10 guarantee. |
| `proofs/README.adoc` | Already had an accurate EXPERIMENTAL status
paragraph (from W1-7) but didn't point back to a repo-wide canonical
section. | Adds a one-line pointer to README.adoc's "Experimental
surfaces" section so the two docs can't drift apart. |
| `.well-known/humans.txt` | `Components: Idris2 ABI, Zig FFI`
(unqualified, implies both exist/are real). | `Components: Zig FFI
(experimental — placeholder ops); Idris2 ABI (design-only, not
present)`. |
| `src/bridge/echidna_adapter.jl` | Module header: "Formal proof
dispatch for statistical properties. Dispatches proof obligations to
ECHIDNA's 48-prover backend…"; docstring: "Statistical property that can
be formally verified." — both present-tense, implying live dispatch. |
Header retitled "EXPERIMENTAL / design-only proof-dispatch scaffolding",
states dispatch is not wired up and the identities below are proof
*targets*, not currently-formally-verified statements; docstring
reworded to "Statistical property targeted for future formal
verification (not yet dispatched…)". No logic changed. |
| `src/bridge/typell_levels.jl` | Comment described Levels 9-12 as "by
external proof systems" without flagging they're unconnected. | Adds
EXPERIMENTAL/scaffolding notes at the top-level comment and above the
Level 9-10 struct definitions, stating no value in the codebase
currently carries a Level 9-12 guarantee and the ECHIDNA dispatch that
would populate one isn't wired up. No logic changed. |
| `.machine_readable/6a2/STATE.a2ml` | No machine-readable maturity
fields for FFI/proofs. | Adds an `[experimental-surfaces]` block
mirroring README.adoc's wording exactly (`ffi-maturity =
"experimental"`, `proof-maturity = "experimental"` + matching notes), so
the human- and machine-readable claims can't drift apart. Valid a2ml
`[section]` / `key = "value"` syntax, consistent with sibling files. |
Not touched: the Julia core's tested/reference-validated claims (per the
work
order's requirement 5) and `PROOF-NEEDS.md` was relabelled, not deleted.
## Verification run & result
**Acceptance criterion 1** — `git grep -in "formally verified\|formally
proven"` (excluding `.claude/tasks/`):
```
$ git grep -in "formally verified\|formally proven" -- . ':!.claude/tasks'
.machine_readable/integrations/proven.a2ml:2:# Proven Integration — Formally Verified Safety Library
src/bridge/echidna_adapter.jl:8:# currently formally verified. If/when wired up, the intent is to route to:
```
Both hits are accurate: `proven.a2ml` describes the external,
actually-proven
`hyperpolymath/proven` safety library (unrelated to this repo's
FFI/proofs
boundary — different subject entirely), and the `echidna_adapter.jl` hit
is
itself the "not yet / not currently" phrasing this task requires ("…are
proof
*targets*, not statements that are **currently formally verified**"). No
stray present-tense claims remain.
**Acceptance criterion 2** — no doc asserts the C-ABI reaches the stats
core:
confirmed by review of every touched file above; `ABI-FFI-README.md`,
`docs/AI-CONVENTIONS.md`, and `.well-known/humans.txt` now explicitly
state
the FFI entry points are placeholders not backed by the Julia core.
**Acceptance criterion 3** — single canonical section:
```
$ grep -rn "Experimental surfaces" --include='*.adoc' --include='*.md' --include='*.a2ml' .
README.adoc:137:== Experimental surfaces (the only place the section is *defined*)
ABI-FFI-README.md (links it)
EXPLAINME.adoc (links it)
PROOF-NEEDS.md (links it)
RSR_OUTLINE.adoc (links it)
docs/CROSS-VERIFICATION-ARCHITECTURE.md (links it)
proofs/README.adoc (links it)
.machine_readable/6a2/STATE.a2ml (mirrors it, machine-readable)
```
**Acceptance criterion 4 (A2ML validation)** —
`.machine_readable/6a2/STATE.a2ml`
is the only `.a2ml` file this PR touches (adds the
`[experimental-surfaces]`
block). Locally verified bracket/quote balance and structural
consistency
with sibling `.machine_readable/6a2/*.a2ml` files (`[section]` headers,
`key = "value"` pairs) — no local `a2ml-validate-action` binary is
available
in this sandbox, so the authoritative check is the "Validate A2ML
manifests"
job in `.github/workflows/dogfood-gate.yml` (`a2ml-validate`), which
triggers
on `pull_request: branches: ['**']` and will run against this PR.
## Anything skipped
Nothing in scope was skipped. Out of scope per the work order (deferred
by
user decision, not attempted here): making the FFI real or proving the
statistical theorems over ℝ; no code logic changed beyond comment-text.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent a62e73b commit 49b8300
12 files changed
Lines changed: 143 additions & 33 deletions
File tree
- .machine_readable/6a2
- .well-known
- docs
- proofs
- src/bridge
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | | - | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | | - | |
| 22 | + | |
| 23 | + | |
12 | 24 | | |
13 | | - | |
14 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
15 | 29 | | |
16 | 30 | | |
17 | 31 | | |
| |||
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
54 | 71 | | |
55 | 72 | | |
56 | 73 | | |
57 | | - | |
| 74 | + | |
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
| |||
71 | 88 | | |
72 | 89 | | |
73 | 90 | | |
74 | | - | |
| 91 | + | |
75 | 92 | | |
76 | | - | |
| 93 | + | |
77 | 94 | | |
78 | | - | |
| 95 | + | |
79 | 96 | | |
80 | 97 | | |
81 | 98 | | |
| |||
197 | 214 | | |
198 | 215 | | |
199 | 216 | | |
200 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
201 | 221 | | |
202 | 222 | | |
203 | 223 | | |
| |||
332 | 352 | | |
333 | 353 | | |
334 | 354 | | |
335 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
336 | 359 | | |
337 | 360 | | |
338 | 361 | | |
| |||
350 | 373 | | |
351 | 374 | | |
352 | 375 | | |
353 | | - | |
| 376 | + | |
| 377 | + | |
354 | 378 | | |
355 | 379 | | |
356 | 380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
77 | | - | |
78 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
79 | 90 | | |
80 | 91 | | |
81 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
9 | | - | |
10 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | 16 | | |
9 | 17 | | |
| |||
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
29 | | - | |
30 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | | - | |
39 | | - | |
40 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
0 commit comments