Skip to content

Commit 9f74d4c

Browse files
docs: AFFIRMATION.adoc (MUST/INTEND/WISH state) + next-Claude handoff prompt (#95)
## What Two handoff/attestation docs capturing where WokeLang stands after this session's proof + bytecode-VM work (PRs #90#94). ### `AFFIRMATION.adoc` (repo root, timestamped 2026-06-19) A point-in-time **affirmation** of current state, organised as the project's normative **MUST / INTEND / WISH** standing (using the `Intentfile` status vocabulary): - **MUST** — the normative core (working language, *enforced* consent, machine-checked + CI-gated type safety, sound non-rotting proofs, ethical scaffolding, RSR compliance): **met** for the scoped core. - **INTEND** — committed/in-progress (VM as a real compilation target = the live frontier; broaden the verified core; reconcile docs; echo-types; eval↔spec correspondence). - **WISH** — near/mid/far horizon items. - A "where we are" synthesis + provenance (the merged PRs). ### `docs/NEXT-CLAUDE-PROMPT.md` A copy-paste prompt to hand a fresh Claude Code session: what to read first, current state, best next steps (parity harness, `.wbc` serialization, consent grant-sources, workers, by-reference/multi-level closures, float-arith proofs, doc reconciliation), and the CI/convention gotchas (preflight `fmt` + `clippy`; proof gates). ## Notes - Follows the RSR `.adoc` attestation conventions visible in this repo (cf. `RSR_COMPLIANCE.adoc`, MPL-2.0 headers). The canonical `AFFIRMATION.adoc` template in `hyperpolymath/standards` was **not reachable from this session** (repo-management tooling unavailable) — flagged in both the doc and here; **reconcile against that template when available**. - Docs-only; no code change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7 --- _Generated by [Claude Code](https://claude.ai/code/session_013wg3Mtq2QFhYi4XVw1Z6z7)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 14463d8 commit 9f74d4c

2 files changed

Lines changed: 210 additions & 0 deletions

File tree

AFFIRMATION.adoc

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
// SPDX-License-Identifier: MPL-2.0
2+
// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= WokeLang — Affirmation of Current State
4+
:toc:
5+
:sectnums:
6+
:affirmed: 2026-06-19
7+
:revdate: 2026-06-19
8+
9+
[abstract]
10+
A point-in-time *affirmation* of where WokeLang stands: a timestamped
11+
attestation of what is true now, organised as the project's normative
12+
*MUST / INTEND / WISH* standing. It is a report, not a gate — the hard gates
13+
live in `.machine_readable/contractiles/` (the `must` contractile).
14+
15+
[NOTE]
16+
====
17+
*Provenance & method.* Produced in an AI-assisted (Claude Code) working
18+
session, reflecting the state after the proof and bytecode-VM work merged on
19+
2026-06-18/19 (PRs #90–#94). It follows the RSR conventions visible in this
20+
repository; the canonical `AFFIRMATION.adoc` template in
21+
`hyperpolymath/standards` was *not reachable from this session*, so reconcile
22+
this document against that template when available.
23+
====
24+
25+
== Affirmation
26+
27+
As of *{affirmed}*, we affirm that WokeLang is a *working, consent-driven,
28+
human-centred programming language* whose *type safety is machine-checked and
29+
CI-gated* for a deliberately-scoped expression/statement core. Its normative
30+
MUSTs hold. The live development frontier is making the bytecode VM a true
31+
second compilation target and reconciling documentation to reality.
32+
33+
== MUST — the normative core (what WokeLang must be to *be* itself)
34+
35+
[cols="3,1,4",options="header"]
36+
|===
37+
| MUST | Status | Where we are
38+
39+
| A working language: lex → parse → typecheck → run `.woke`
40+
| ✅ met
41+
| Rust toolchain (parser, typechecker, interpreter, bytecode VM, LSP, DAP, formatter, linter, REPL); 188 lib tests; OCaml reference core
42+
43+
| Consent-driven safety actually *enforced* (the defining feature)
44+
| ✅ met
45+
| Interpreter always; the *VM now enforces* under `#care` (deny-by-default, PR #92); consent lives in the type system of the Idris calculus
46+
47+
| Machine-checked type safety (progress + preservation)
48+
| ✅ met (core)
49+
| Lean + Coq (expression core + arrays + statement typing) and the Idris consent calculus. A *deliberate subset* of the surface language
50+
51+
| Proofs sound and non-rotting (CI-gated, `sorry`/axiom-free)
52+
| ✅ met
53+
| `lean-proofs.yml` + `coq-proofs.yml`; axiom-free bar Coq's unavoidable reals axioms
54+
55+
| Human-centred + ethical scaffolding (consent, gratitude, emotes, Result)
56+
| ✅ met
57+
| In the interpreter and now the VM
58+
59+
| RSR repository compliance (license/governance/contractiles)
60+
| ✅ mostly
61+
| Template `Mustfile` checks pass; commit-signing `must` is the soft spot
62+
|===
63+
64+
== INTEND — committed next-actions (we WILL do this)
65+
66+
[cols="3,1,4",options="header"]
67+
|===
68+
| INTENT | Status | Where we are
69+
70+
| Make the bytecode VM a real compilation target
71+
| in_progress
72+
| Major strides 2026-06-18/19: machine opcodes, full expr/stmt coverage, consent enforcement, Result constructors, closures + upvalue capture. Remainder → wishes
73+
74+
| Broaden the verified core toward the Rust type system
75+
| in_progress
76+
| binop parity + arrays + statement typing landed; float arithmetic still open
77+
78+
| Reconcile documentation to reality
79+
| declared
80+
| README/EXPLAINME stale; `TOOLCHAIN-WISHLIST` lists *built* tools (LSP/DAP/WASM) as "missing"; completion figure contradicts (`STATE.a2ml` 35% vs wishlist 85%)
81+
82+
| Integrate echo-types into the type checker
83+
| declared
84+
| `STATE.a2ml` frontier; not started
85+
86+
| Resolve eval ↔ spec correspondence (PROOF-NEEDS #2)
87+
| declared
88+
| Needs a maintainer decision (treat the spec as normative, or build a second model)
89+
|===
90+
91+
== WISH — horizon aspirations (we WISH this were true)
92+
93+
[cols="4,1,1",options="header"]
94+
|===
95+
| WISH | Horizon | Status
96+
97+
| Interpreter↔VM parity harness (conformance through both) | near | declared
98+
| `.wbc` bytecode serialization | near | declared
99+
| Consent grant-sources (`superpower` declarations) on the VM | near | declared
100+
| Worker / concurrency statements on the VM | near | declared
101+
| By-reference + multi-level closure capture | near | declared
102+
| Full surface-language type safety (statement dynamics, units, pattern matching) | mid | declared
103+
| WASM codegen correctness | mid | declared
104+
| Remaining dev tooling (debugger UI, profiler, package manager, doc-gen) | mid | declared
105+
| Ordinal/echo Bachmann–Howard consumer-evidence; formal VM↔spec compiler-correctness | far | declared
106+
| Establishment (paper / Zenodo) + production-grade toolchain | far | declared
107+
|===
108+
109+
== Where we are (synthesis)
110+
111+
WokeLang's MUSTs are met for a deliberately-scoped core: a real, running,
112+
consent-enforcing language whose type safety is machine-checked and CI-gated.
113+
The frontier is the INTEND layer — turning the bytecode VM into a genuine
114+
second compilation target (which moved a great deal this session: it went from
115+
crashing on most programs to running the core language *with consent enforced
116+
and closures that capture state*) and reconciling the stale documentation and
117+
scope numbers. Everything past that is the WISH horizon.
118+
119+
The one honest asterisk: `STATE.a2ml` pegs whole-vision completion at *~35%* —
120+
that figure counts the entire surface language plus full tooling plus ecosystem
121+
(the large WISH/INTEND surface), so it coexists with "the core MUSTs hold." The
122+
gap between "MUSTs met" and "35%" *is* the roadmap above.
123+
124+
== Provenance
125+
126+
Work merged to `main` that this affirmation reflects:
127+
128+
* PR #90 — Lean array typing (mirror of Coq `T_Array` / `T_Lit_Array`)
129+
* PR #91 — statement typing judgment + metatheory (Lean + Coq)
130+
* PR #92 — VM: full expression coverage + Result/record/index execution + consent enforcement under `#care`
131+
* PR #93 — VM: Result constructors from surface syntax + closures
132+
* PR #94 — VM: upvalue capture for closures
133+
134+
Deeper detail: `docs/proofs/verification/AUDIT.md` (proofs) and the per-PR
135+
descriptions. Next-session handoff: `docs/NEXT-CLAUDE-PROMPT.md`.
136+
137+
// Affirmed 2026-06-19 (UTC date) in an AI-assisted Claude Code session, on
138+
// behalf of the maintainer. Reconcile against hyperpolymath/standards.

docs/NEXT-CLAUDE-PROMPT.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<!--
2+
SPDX-License-Identifier: MPL-2.0
3+
SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
-->
5+
# WokeLang — handoff prompt for the next Claude
6+
7+
Paste the block below into a fresh Claude Code session working on
8+
`hyperpolymath/wokelang`. (State as of 2026-06-19 — see `AFFIRMATION.adoc`.)
9+
10+
---
11+
12+
You are continuing work on **WokeLang**, a consent-driven, human-centred
13+
programming language. Primary implementation is **Rust** (`src/`), with an
14+
**OCaml** reference core (`core/`) and formal proofs in **Lean/Coq**
15+
(`docs/proofs/verification/`) and **Idris 2** (`src/abi/`). Match the
16+
interpreter (`src/interpreter/mod.rs`) as the reference semantics.
17+
18+
**Read first, in order:**
19+
1. `AFFIRMATION.adoc` — the current MUST / INTEND / WISH standing (timestamped).
20+
2. `.machine_readable/6a2/STATE.a2ml` — project state checkpoint.
21+
3. `docs/proofs/verification/AUDIT.md` — proof state (Lean / Coq / Idris).
22+
4. `PROOF-NEEDS.md`, `TEST-NEEDS.md`, `TOOLCHAIN-WISHLIST.md` — needs and wishes.
23+
(Note: `TOOLCHAIN-WISHLIST.md` is **stale** — LSP, the DAP debugger, and the
24+
WASM backend already exist; and it says 85% complete while `STATE.a2ml` says
25+
35%. Reconciling these is itself an open task.)
26+
27+
**Where things stand (2026-06-19):**
28+
- **Proofs.** Lean + Coq at parity (expression-core type safety + arrays +
29+
statement typing) and an Idris consent calculus (typing with a handler
30+
context + small-step with an audit log + `progress`). CI-gated
31+
(`lean-proofs.yml`, `coq-proofs.yml`), `sorry`/axiom-free.
32+
- **Bytecode VM** (`src/vm/`). Now runs the core language: Result types,
33+
records, indexing, control flow, **consent enforcement under `#care`**
34+
(deny-by-default), and **closures with upvalue capture**. 188 lib tests green.
35+
It went from crashing on most programs to running the core language this
36+
session (PRs #92#94).
37+
38+
**Best next steps (near-horizon, mostly independent — pick one):**
39+
- *VM → real compilation target:*
40+
- **Interpreter↔VM parity harness:** run each `conformance/*.woke` and
41+
`examples/*.woke` through both the interpreter and `vm::run_vm`, assert
42+
equal results, CI-gate it. (Highest-value correctness mechanism.)
43+
- **`.wbc` bytecode serialization:** `woke compile -o x.wbc` cannot write a
44+
loadable file yet (`src/main.rs` says "not yet implemented"); add serde
45+
round-trip so `woke run-vm x.wbc` loads it.
46+
- **Consent grant-sources:** seed the VM's `granted` set (in `src/vm/machine.rs`)
47+
from `superpower` declarations so `#care` programs can actually grant
48+
capabilities (currently deny-by-default).
49+
- **Worker statements on the VM** (the 5 concurrency forms — needs a VM
50+
channel/scheduler model).
51+
- **By-reference + multi-level closure capture** (current capture is by-value,
52+
single-level).
53+
- *Proofs:* **float arithmetic** variants; **open-term expression preservation**
54+
(the prerequisite for statement *dynamic* safety); decide the **eval ↔ spec
55+
correspondence** question (PROOF-NEEDS #2) with the maintainer.
56+
- *Docs:* **reconcile** `README.adoc` / `EXPLAINME.adoc` / `TOOLCHAIN-WISHLIST.md`
57+
to reality and fix the 35%-vs-85% completion contradiction.
58+
59+
**Conventions & CI gates:**
60+
- Develop on the branch you are told to; push and open a **draft PR**.
61+
- Gates include **Build Check** (`cargo fmt --check` + `cargo clippy --lib --bins
62+
-- -D warnings`), **Build + E2E (Rust + OCaml)**, **lean-proofs**, **coq-proofs**.
63+
**Run `cargo fmt` + `cargo clippy --lib --bins -- -D warnings` locally before
64+
pushing** — Build Check gates on both, and that has bitten past sessions.
65+
- Language policy (`.claude/CLAUDE.md`): Rust / OCaml / Lean / Coq / Idris as
66+
present; no Go / Python / TypeScript; `Containerfile`, not `Dockerfile`.
67+
- Keep proofs `sorry`/axiom-free; pin each headline theorem the way `AUDIT.md`
68+
describes.
69+
70+
Tell me which item to take, or propose one and go.
71+
72+
---

0 commit comments

Comments
 (0)