Skip to content

Commit 65cb200

Browse files
neurophone: licence drift → MPL-2.0, language-policy/STATE refresh, GOVERNANCE.adoc (#160)
## Summary Documentation-correctness + RSR-compliance follow-up (after merged #158). - **chore(licence): PMPL-1.0 → MPL-2.0 drift correction (owner-approved).** neurophone is a sole-owner MPL-2.0 repo (licence reverted from PMPL in #102/#118 per HANDOVER), but several *functional* declarations still read PMPL. Corrected README badge/body, `META.a2ml`/`stapeln.toml` licence fields, `AGENTIC.a2ml`, `0-AI-MANIFEST.a2ml`, `QUICKSTART-MAINTAINER.adoc`, `llm-warmup-{dev,user}.md`. **Deliberately not touched** (owner territory): `PALIMPSEST.adoc`, `docs/CITATIONS.adoc`, `docs/governance/*`, `LICENSES/*.txt`, and the README Palimpsest-*philosophy* badge. Docs stay CC-BY-SA-4.0. - **docs: refresh stale `.claude/CLAUDE.md` language policy** — drop the removed Python/SaltStack allowance and the Nix fallback (Guix-only); Rust→Rust/SPARK; add Zig/Idris2; add ReScript/V-lang/ATS2/Nix/Makefiles to BANNED. - **docs: correct `STATE.a2ml`** — the neural crates were mislabelled "stub" but carry real code + property suites; neurophone-android is now the full JNI surface. Records 160 tests, clippy/fmt/TLC clean, a `[proofs]` block, and honest external `[blockers]`. - **docs: dedup CONTRIBUTING** — removed the 402-byte `.adoc` stub (estate keeps the GitHub-required `.md`; nothing referenced the `.adoc`). - **docs(rsr): add `GOVERNANCE.adoc`** (was missing at root) and mark the JNI surface audit as implemented by #110. No code changes; docs/config only. (Prior branch verification stands: 160 tests, clippy `-D warnings` clean, fmt clean.) ## FLAGS (unchanged) - `gossamer` + `conative-gating` remain 403-blocked → #83 / #103 staged. - Owner fills the Trustfile `{{PLACEHOLDER}}` crypto at signing time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0172RBMz3qYjb1ttzD2i7RNh --- _Generated by [Claude Code](https://claude.ai/code/session_0172RBMz3qYjb1ttzD2i7RNh)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 65fec4a commit 65cb200

13 files changed

Lines changed: 149 additions & 72 deletions

.claude/CLAUDE.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ The following files in `.machine_readable/` contain structured project metadata:
2121
|---------------|----------|-------|
2222
| **AffineScript** | Primary application code | Affine-typed, compiles to typed-wasm or Deno-ESM |
2323
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
24-
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
24+
| **Rust/SPARK** | Performance-critical, systems, WASM, CLI, safety-critical | "Rust" always means Rust with SPARK integration as the default stance |
25+
| **Zig** | APIs, FFIs, gateways, client SDKs | Estate default for FFI/gateway work; Idris2 owns ABIs |
26+
| **Idris2** | Formal verification (ABI-style proofs) | Proven-library status in `proven` repo |
2527
| **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI |
2628
| **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like |
2729
| **Gleam** | Backend services | Runs on BEAM or compiles to JS |
2830
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
29-
| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs |
30-
| **Python** | SaltStack only | No other Python permitted |
31+
| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs (transitional) |
3132
| **Nickel** | Configuration language | For complex configs |
3233
| **Guile Scheme** | State/meta files | .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, .machine_readable/6a2/ECOSYSTEM.a2ml |
3334
| **Julia** | Batch scripts, data processing | Per RSR |
@@ -43,9 +44,14 @@ The following files in `.machine_readable/` contain structured project metadata:
4344
| npm | Deno |
4445
| Bun | Deno |
4546
| pnpm/yarn | Deno |
46-
| Go | Rust |
47-
| Python (general) | ReScript/Rust |
48-
| Java/Kotlin | Rust/Tauri/Dioxus |
47+
| Go | Rust/SPARK |
48+
| **Python** (fully banned, no exceptions) | AffineScript/Rust/Julia |
49+
| **ReScript** (banned 2026-04-30) | AffineScript |
50+
| **V-lang** (banned 2026-04-10) | Zig |
51+
| **ATS2** | Idris2 (formal) / Rust/SPARK |
52+
| **Nix** | Guix (guix.scm) |
53+
| **Makefiles** | Mustfile/justfile |
54+
| Java/Kotlin | Rust/SPARK, Tauri, Dioxus |
4955
| Swift | Tauri/Dioxus |
5056
| React Native | Tauri/Dioxus |
5157
| Flutter/Dart | Tauri/Dioxus |
@@ -64,14 +70,13 @@ Both are FOSS with independent governance (no Big Tech).
6470
1. **No new TypeScript files** - Convert existing TS to AffineScript
6571
2. **No package.json for runtime deps** - Use deno.json imports
6672
3. **No node_modules in production** - Deno caches deps automatically
67-
4. **No Go code** - Use Rust instead
68-
5. **Python only for SaltStack** - All other Python must be rewritten
69-
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
73+
4. **No Go code** - Use Rust/SPARK instead
74+
5. **No Python** - fully banned (SaltStack exception removed 2026-01-03); use Rust/SPARK, Julia, or AffineScript
75+
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus (this repo's Android client migrates to gossamer per #83)
7076

7177
### Package Management
7278

73-
- **Primary**: Guix (guix.scm)
74-
- **Fallback**: Nix (flake.nix)
79+
- **Primary**: Guix (guix.scm) — this repo is Guix-only (flake.nix removed; Nix is banned estate-wide)
7580
- **JS deps**: Deno (deno.json imports)
7681

7782
### Security Requirements

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ can-create-files = true
2121
# - Never commit secrets or credentials
2222
# - Never use banned languages (TypeScript, Python, Go, etc.)
2323
# - Never place state files in repository root (must be in .machine_readable/)
24-
# - Never use AGPL license (use PMPL-1.0-or-later)
24+
# - Never use AGPL license (use MPL-2.0)

.machine_readable/6a2/META.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
[metadata]
66
project = "neurophone"
77
author = "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"
8-
license = "PMPL-1.0-or-later"
8+
license = "MPL-2.0"
99
standard = "RSR 2026"

.machine_readable/6a2/STATE.a2ml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,55 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# STATE.a2ml — Project state checkpoint
3-
# Updated 2026-04-04 — CRG C grade achieved
3+
# Updated 2026-07-01 — proofs (2.1 TLC / 2.3 typestate), JNI surface, Trustfile,
4+
# CI green; crate statuses corrected (the neural crates were never stubs).
45

56
[metadata]
67
project = "neurophone"
78
version = "1.0.0"
8-
last-updated = "2026-04-04"
9+
last-updated = "2026-07-01"
910
status = "active"
1011
crg-grade = "C"
1112

1213
[project-context]
1314
name = "neurophone"
14-
completion-percentage = 65
15-
phase = "Testing complete, feature development ready"
15+
completion-percentage = 80
16+
phase = "Core + proofs advancing; Android shell blocked on external gossamer"
1617

1718
[test-coverage]
18-
unit-tests = 41
19-
smoke-tests = 3
20-
e2e-tests = 2
21-
property-tests = 14
22-
reflexive-tests = 3
23-
contract-tests = 2
24-
aspect-tests = 6
25-
benchmarks = 24
26-
total-tests = 95
19+
# Aggregate across the workspace (lib + integration + doc-tests).
20+
total-tests = 160
21+
notes = "includes property tests (0.1/0.2/1.2/1.3), typestate compile-fail doc-tests (2.1/2.3), and the TLC lifecycle model check (2.1)"
2722

2823
[test-results]
29-
unit-tests-status = "PASS"
30-
smoke-tests-status = "PASS"
31-
e2e-tests-status = "PASS"
32-
property-tests-status = "PASS"
3324
build-status = "SUCCESS"
25+
test-status = "PASS"
26+
clippy-status = "CLEAN (--all-targets -- -D warnings)"
27+
fmt-status = "CLEAN"
28+
tlc-status = "PASS (Lifecycle: no error, 13 states)"
3429

3530
[crates]
36-
neurophone-core = "88 tests"
37-
lsm = "4 tests"
38-
esn = "9 tests"
39-
bridge = "stub"
40-
llm = "stub"
41-
sensors = "stub"
42-
claude-client = "stub"
43-
neurophone-android = "stub"
31+
# Corrected: bridge/llm/sensors/claude-client carry real code + property suites;
32+
# neurophone-android is now the full JNI surface, not a stub.
33+
neurophone-core = "complete — orchestrator + typestate lifecycle + QueryRoute"
34+
lsm = "complete — proptest_numeric + proptest_bounds"
35+
esn = "complete — proptest_numeric; true spectral-radius via power iteration"
36+
bridge = "complete — proptest_soundness (obligation 1.3)"
37+
llm = "complete — local inference"
38+
sensors = "complete — proptest_numeric; IIR filtering"
39+
claude-client = "complete — cloud fallback; egress-scrub test"
40+
neurophone-android = "implemented — 11-method ai.neurophone.NativeLib JNI surface (#110)"
41+
42+
[proofs]
43+
# Honest obligation status; full detail in proofs/README.adoc + Trustfile PROOF_ARTIFACTS.
44+
discharged = "0.1 panic-freedom, 0.2 numeric containment, 0.3 unsafe discipline, 1.2 LSM bounds, 1.3 bridge soundness (property); 2.1 lifecycle (TLC); 2.3 release-once (compile-fail)"
45+
open = "1.1 Echo State Property (formal contraction), 1.2 formal Dafny bound, 2.2 concurrency (N/A single-owner), 3.1 egress veto (external #103), 3.2 bounded-interaction contract test"
4446

4547
[recent-work]
46-
session-date = "2026-04-04"
47-
fixed = "ESN crate (was missing src/lib.rs and [lib] section)"
48-
added = "95+ comprehensive tests covering unit/smoke/e2e/property/reflexive/contract/aspect"
49-
improved = "Cargo.toml license (PMPL), author attribution, dev dependencies"
48+
session-date = "2026-07-01"
49+
fixed = "rand 0.9/0.10 build break; retired scorecard-enforcer.yml; re-pinned standards reusables (governance/hypatia/scorecard green)"
50+
added = "real JNI surface (#110); TLA+ Lifecycle.cfg + TLC; typestate compile-fail proofs; core panic/numeric proptests; full estate Trustfile v2026.2.5-final + trustfile.yml gate"
51+
improved = "Cargo.toml/manifests licence normalised to MPL-2.0; proofs/README honest status; STATE corrected"
5052

5153
[blockers]
52-
none = "Ready for feature development"
54+
gossamer = "External: #83 Android migration (gossamer Idris2+Zig shell) blocked — repo not in session scope (403)"
55+
conative-gating = "External: #103 egress GO/NO-GO veto (obligation 3.1 residual) blocked — repo not in session scope"

0-AI-MANIFEST.a2ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Bot-specific instructions for:
4343
1. **No SCM duplication** - Root must NOT contain .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, etc.
4444
2. **Single source of truth** - `.machine_readable/` is authoritative
4545
3. **No stale metadata** - If root SCMs exist, they are OUT OF DATE
46-
4. **License consistency** - All code PMPL-1.0-or-later unless platform requires MPL-2.0
46+
4. **License consistency** - All code MPL-2.0 (sole-owner repo)
4747
5. **Author attribution** - Always "Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>"
4848

4949
## REPOSITORY STRUCTURE
@@ -112,5 +112,5 @@ After reading this file, demonstrate understanding by stating:
112112
- **Format Version:** 1.0.0
113113
- **Created:** [DATE]
114114
- **Maintained By:** [YOUR-NAME/ORG]
115-
- **License:** PMPL-1.0-or-later
115+
- **License:** MPL-2.0
116116
- **Protocol:** https://github.com/hyperpolymath/0-ai-gatekeeper-protocol

CONTRIBUTING.adoc

Lines changed: 0 additions & 20 deletions
This file was deleted.

GOVERNANCE.adoc

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// SPDX-License-Identifier: CC-BY-SA-4.0
2+
// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= Governance Model
4+
:toc: preamble
5+
6+
Governance model for **neurophone** (on-device neurosymbolic AI). This repo
7+
follows the hyperpolymath estate governance pattern; the canonical estate policy
8+
lives in https://github.com/hyperpolymath/standards[hyperpolymath/standards].
9+
10+
== Overview
11+
12+
neurophone follows a **Benevolent Dictator (BDFL)** model:
13+
14+
* A single champion (@hyperpolymath) holds the project's vision and final
15+
decision authority, while actively welcoming contributions and delegating.
16+
* *Current reality:* a sole maintainer. That is a staffing fact, not a closed
17+
door — contributions are welcomed and reviewed, and authority is delegable to
18+
anyone who demonstrably carries the project's essence.
19+
* Decisions are made transparently through GitHub issues and pull requests.
20+
21+
== Core Principles
22+
23+
[cols="1,2"]
24+
|===
25+
| Principle | Description
26+
| **Benevolent Dictatorship** | Maintainer has final authority but seeks input.
27+
| **Meritocracy** | Contributions are judged on technical merit.
28+
| **Transparency** | Significant decisions are documented publicly.
29+
| **Fail loudly, seal soundly** | No silent green; seams (ABI/FFI) are sealed and, where load-bearing, proved.
30+
| **Report faithfully** | No overclaiming — proof obligations are discharged or honestly left open (never faked).
31+
|===
32+
33+
== Roles and Permissions
34+
35+
[cols="1,2,2"]
36+
|===
37+
| Role | Permissions | Assignment
38+
| **Maintainer** | Write, merge, admin | @hyperpolymath
39+
| **Contributors** | Fork, submit PRs | All GitHub users
40+
| **Agents (LLM)** | Bounded per `.machine_readable/6a2/AGENTIC.a2ml` | Automated assistants
41+
|===
42+
43+
== Decision-Making Framework
44+
45+
Routine (bug fixes, docs, minor features, dependency updates) — maintainer or a
46+
delegate merges after CI is green. Significant (architecture, ABI/FFI seam
47+
changes, proof-obligation changes, security policy, licence) — require explicit
48+
maintainer review; these are gated by the estate policies below.
49+
50+
=== Licence changes — owner-only
51+
52+
Per the estate guardrail, **licence and SPDX changes are manual, per-file, and
53+
owner-approved only**. Agents and automation must not generate licence-change PRs
54+
or sweep SPDX headers; findings about licence drift are flag-only. neurophone is a
55+
sole-owner repo: code is **MPL-2.0**, documentation is **CC-BY-SA-4.0**.
56+
57+
=== Security-critical changes
58+
59+
Changes to the Trustfile, CI/security/release workflows, cryptographic material,
60+
the JNI FFI boundary, or the `proofs/` corpus require explicit review. See
61+
`.machine_readable/contractiles/trust/Trustfile.a2ml` (`[CAPABILITY_GATEWAY]`).
62+
63+
== Machine-Readable Governance
64+
65+
The normative substrate is authoritative where it applies:
66+
67+
* `.machine_readable/6a2/AGENTIC.a2ml` — agent permissions / risk gating.
68+
* `.machine_readable/6a2/META.a2ml` — architecture decisions.
69+
* `.machine_readable/contractiles/` — MUST / TRUST / INTEND / ADJUST / DUST / BUST
70+
contracts (e.g. `MUST.contractile` bans proof escape hatches).
71+
* `proofs/README.adoc` — proof-obligation map and status.
72+
73+
== Code of Conduct
74+
75+
Participation is governed by `CODE_OF_CONDUCT.md`. Report concerns via the
76+
security/contact channels in `SECURITY.md`.

QUICKSTART-MAINTAINER.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Or via OPSM: `opsm update {{PACKAGE_NAME}}`
106106

107107
== Security Notes
108108

109-
* License: PMPL-1.0-or-later (Palimpsest License)
109+
* License: MPL-2.0
110110
* All dependencies SHA-pinned
111111
* `panic-attacker` scan results: link:INSTALL-SECURITY-REPORT.adoc[]
112112
* OpenSSF Scorecard: see badge in README

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image:https://img.shields.io/badge/License-MPL--2.0-blue.svg[License: PMPL-1.0,link="https://github.com/hyperpolymath/palimpsest-license"]
1+
image:https://img.shields.io/badge/License-MPL--2.0-blue.svg[License: MPL-2.0,link="https://github.com/hyperpolymath/neurophone/blob/main/LICENSE"]
22
image:https://img.shields.io/badge/Philosophy-Palimpsest-indigo.svg[Palimpsest,link="https://github.com/hyperpolymath/palimpsest-license"]
33

44

@@ -521,7 +521,7 @@ Contributions welcome! See link:CONTRIBUTING.md[CONTRIBUTING.md].
521521

522522
== License
523523

524-
Palimpsest-MPL-1.0 License - See LICENSE file
524+
MPL-2.0 License - See the LICENSE file. Documentation is CC-BY-SA-4.0.
525525

526526
== Citation
527527

docs/migrations/JNI-SURFACE-AUDIT.adoc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,20 @@ can finish.
1515

1616
== Current state
1717

18-
* `crates/neurophone-android/src/lib.rs` = 6-line stub (`pub fn hello() -> &'static str`). No JNI exports yet.
18+
[NOTE]
19+
====
20+
*IMPLEMENTED (2026-07-01, issue #110).* The audit below is fulfilled. The 11-method
21+
surface now lives in `crates/neurophone-android/` (`lib.rs` JNI exports +
22+
`state.rs` holder/bridge + `sensor_map.rs` + `error.rs`), using jni 0.22's safe
23+
`EnvUnowned::with_env`. The `query` gap (Gap 3) was resolved by adding
24+
`QueryRoute` + `query_routed` to `neurophone-core` (so `queryLocal`/`queryClaude`
25+
force the model); `getNeuralContext` (Gap 4) and the sensor-id map (Gap 2) landed
26+
as designed. Bridge logic is host-tested and `reset` consumes the core
27+
`shutdown(self)` typestate (release-once). The historical audit is retained below
28+
for provenance.
29+
====
30+
31+
* `crates/neurophone-android/src/lib.rs` = 6-line stub (`pub fn hello() -> &'static str`). No JNI exports yet. *(historical — now implemented; see the note above.)*
1932
* `crates/neurophone-android/Cargo.toml` already declares `crate-type =
2033
["cdylib"]`, depends on `jni`, `neurophone-core`, `sensors`,
2134
`serde_json`, `tokio`, `chrono`. Foundation is correct.

0 commit comments

Comments
 (0)