Skip to content

Commit 3ad0d72

Browse files
docs: refresh README/EXPLAINME, RSR + bot-doc compliance, clean root (#55)
* docs: refresh README + EXPLAINME to current status; sweep stale cross-references README.adoc: version Standard-Candidate-1.0 -> 0.9.0 (matches mix.exs); correct the probabilistic-types claim (runtime-represented, static checking on the roadmap — not "statically checked"); add the reflexion design layer to the IP table; replace the aspirational ArangoDB / Salt tooling rows (Salt is Python, banned) with the consensus + formal-verification tooling that actually ships. EXPLAINME.adoc: add a "Reflexion" receipts section (façade Phronesis.Reflexion, anchor REPORT-adequacy example, JEG / equivalence / hash-chained ledger) and wire the reflexion modules + docs/REFLEXION.adoc into the file map. Stale cross-reference sweep (nothing pointing at the old layout): - academic/theorem-index.adoc: lattice/game proof citations -> real .adoc paths - academic/*: bulk .md -> .adoc proof references; white-paper wiki/docs refs - academic/README.adoc: licence statement Apache-2.0/MIT -> CC-BY-SA-4.0 - wiki/Contributing.adoc: contribution licence AGPL-3.0 -> MPL-2.0 + CC-BY-SA-4.0; dead CONTRIBUTORS link -> MAINTAINERS.adoc - wiki/{Quick-Start,Installation,CLI-Reference}.adoc: REPL/version banners 0.1.0 -> 0.9.0 - IMPLEMENTATION-ROADMAP.adoc: SPEC.core/META/ECOSYSTEM .scm -> .a2ml - GOVERNANCE.adoc: CONTRIBUTING.adoc -> CONTRIBUTING.md (canonical file) - .claude/CLAUDE.md: Guile .scm state files -> A2ML; drop removed SaltStack-Python exception (Python fully banned) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk * docs(rsr): add bot-facing AI rules, root allowlist, AUDIT + ANCHOR Bring the repo in line with the rsr-template-repo layout so both humans and bots have sorted, accurate guidance: - .machine_readable/ai/: Cursor/Cline/Windsurf rules + AI.a2ml + README index, all tailored to Phronesis (real languages Elixir/Rust/Idris2/Agda/Zig/TLA+, MPL-2.0 code + CC-BY-SA-4.0 docs split, no placeholders, no banned-language references). - .github/copilot-instructions.md: moved from the repo root (where Copilot does not read it) and destaled — dropped ReScript from the language hierarchy, JavaScript now points at AffineScript, npm/yarn/pnpm -> Deno, removed the self-contradictory "GitLab CI preferred" row. - AUDIT.adoc (root): honest claims-vs-reality ledger — what is real (lexer, parser, type checker, interpreter, LSP, reflexion, green suite) vs scaffold/ roadmap (WASM compiler, Raft runtime, static probabilistic types, package registry, unreviewed proof corpus). - .machine_readable/6a2/anchors/ANCHOR.a2ml: repo identity + golden path (just deps/build/test) + implementation policy. - .machine_readable/root-allow.txt: canonical root allowlist (drift = anything at root not listed here). - .machine_readable/configs/README.adoc: index for the relocated estate configs. - 0-AI-MANIFEST.a2ml: point AI/bot instructions at .machine_readable/ai/ (the .bot_directives/ dir never existed); refresh the structure tree. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk * chore(root): clear cruft, relocate configs, convert remaining docs to AsciiDoc Root cleanup so the tree matches .machine_readable/root-allow.txt (every root entry is now accounted for): Removed cruft: - phronesis (1.7 MB compiled escript committed by accident; now gitignored) - ANALYSIS-COMPLETE.adoc (one-off session artefact) - SPEC.core.a2ml (root symlink redundant with .machine_readable/SPEC.core.a2ml) Relocated machine-readable configs to .machine_readable/configs/: - eclexiaiser.toml, k9iser.toml, opsm.toml, stapeln.toml (consumed by estate tooling, not mix/cargo) Moved internal status/design docs out of the root into docs/: - LSP-IMPLEMENTATION-SUMMARY, TESTING-REPORT, TEST-NEEDS, TOOLCHAIN-WISHLIST, WOKELANG-FEATURE-COMPARISON (refs in EXPLAINME/AUDIT/ANCHOR updated) Moved orphaned root demo scripts to examples/: - test_e2e.exs, test_framework_demo.exs, test_stdlib.exs (the ExUnit suite in test/ is the real coverage; these were never wired into CI) adoc-first: converted the remaining estate .md docs to .adoc (CC-BY-SA-4.0 per the documentation licence policy), via pandoc: - docs/CONSENSUS, docs/safety_proofs, docs/tech-debt-2026-05-26, deploy/DEPLOYMENT, spec/system-specs, editors/vscode/README, syntax/README Only GitHub/tool-required Markdown remains (.github/**, SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, .claude/CLAUDE.md). No source code touched; docs/config/cruft only. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk * chore(state): mark suite green; drop resolved test-failure blocker The pre-existing DebuggerTest/DocGeneratorTest/IncrementalLexerTest/Conformance failures were fixed and merged; the ExUnit suite is green (consensus/Raft cases skipped pending :ra). Update STATE.a2ml: last-result warn -> pass, drop the resolved blocker and its next-action, bump dates to 2026-06-20, refresh the session note. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AqMopxUsgu78rg5fhWBUkk --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e639338 commit 3ad0d72

54 files changed

Lines changed: 2630 additions & 1958 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ RSR layout — see https://github.com/hyperpolymath/standards):
3232
| **Gleam** | Backend services | Runs on BEAM or compiles to JS |
3333
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
3434
| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs |
35-
| **Python** | SaltStack only | No other Python permitted |
3635
| **Nickel** | Configuration language | For complex configs |
37-
| **Guile Scheme** | State/meta files | STATE.scm, META.scm, ECOSYSTEM.scm |
36+
| **A2ML** | State/meta files | STATE.a2ml, META.a2ml, ECOSYSTEM.a2ml (TOML-like) |
3837
| **Julia** | Batch scripts, data processing | Per RSR |
3938
| **OCaml** | AffineScript compiler | Language-specific |
4039
| **Ada** | Safety-critical systems | Where required |
@@ -71,7 +70,7 @@ Both are FOSS with independent governance (no Big Tech).
7170
2. **No package.json - use deno.json deps** - Use deno.json imports
7271
3. **No node_modules in production** - Deno caches deps automatically
7372
4. **No Go code** - Use Rust instead
74-
5. **Python only for SaltStack** - All other Python must be rewritten
73+
5. **No Python** - Python is fully banned (no exceptions); rewrite in AffineScript/Rust
7574
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
7675

7776
### Package Management
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ When reviewing code in this repository, apply these standards strictly.
1313
3. Ada/SPARK — safety-critical, formal verification
1414
4. Haskell — pure functional, type-heavy domains
1515
5. Elixir — concurrent, distributed, fault-tolerant systems
16-
6. ReScriptfrontend when JS interop needed
16+
6. AffineScriptapplication code where a typed web/Deno target is needed
1717
7. Chapel — parallel computing, HPC workloads
1818
8. Julia — numerical computing, scientific applications
1919

2020
**Avoid:**
2121
- C — use Zig instead
2222
- C++ — use Zig or Rust instead
23-
- Python — reject unless interfacing with Python-only libraries
24-
- JavaScript — use ReScript or TypeScript instead
23+
- Python — reject (banned across the estate)
24+
- JavaScript — use AffineScript instead
2525
- Shell scripts over 50 lines — rewrite in a proper language
2626

2727
**Flag for justification:**
@@ -80,8 +80,7 @@ When reviewing code in this repository, apply these standards strictly.
8080
|-----------|-----------|
8181
| Docker | Podman |
8282
| Makefile | Justfile |
83-
| GitHub Actions self-reference | GitLab CI preferred for personal projects |
84-
| npm/yarn | pnpm (if JS unavoidable) |
83+
| npm/yarn/pnpm | Deno |
8584
| pip/poetry | Reject (avoid Python) |
8685

8786
**Build files:**

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ Thumbs.db
2323
# Temporary
2424
*.tmp
2525
*.log
26+
27+
# Built escript binary (mix escript.build)
28+
/phronesis

.machine_readable/6a2/STATE.a2ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[metadata]
66
project = "phronesis"
77
version = "0.9.0"
8-
last-updated = "2026-06-18"
8+
last-updated = "2026-06-20"
99
status = "active"
10-
session = "reflexion design layer + docs/metadata/licence sync — 2026-06-18"
10+
session = "docs refresh + RSR/bot-doc compliance + root cleanup — 2026-06-20"
1111

1212
[project-context]
1313
name = "Phronesis"
@@ -32,18 +32,16 @@ milestones = [
3232

3333
[blockers-and-issues]
3434
issues = [
35-
{ id = "pre-existing-test-failures", note = "DebuggerTest (Trace.merge/2 undefined; State.variables), DocGeneratorTest, IncrementalLexerTest, ConformanceTest 04_boolean_logic — predate the reflexion work" },
3635
{ id = "compiler-backend", note = "Rust to WASM codegen is still AST scaffolding only" },
3736
]
3837

3938
[critical-next-actions]
4039
actions = [
41-
"Repair pre-existing test failures (Trace.merge/2 in debugger; State.variables field)",
4240
"Wire reflexion claim ingest for the compiler, formal/proof, and benchmark sources",
4341
"Advance the Rust to WASM production compiler beyond AST scaffolding",
4442
"Add Idris2 ABI definitions and the Zig FFI layer",
4543
]
4644

4745
[maintenance-status]
48-
last-run-utc = "2026-06-18T00:00:00Z"
49-
last-result = "warn" # unknown | pass | warn | fail (reflexion suite green; pre-existing failures remain)
46+
last-run-utc = "2026-06-20T00:00:00Z"
47+
last-result = "pass" # unknown | pass | warn | fail (full ExUnit suite green; consensus/Raft cases skipped pending :ra)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# ANCHOR.a2ml - authoritative anchor for the phronesis repository.
5+
6+
[metadata]
7+
version = "1.0.0"
8+
last-updated = "2026-06-20"
9+
10+
[anchor]
11+
schema = "hyperpolymath.anchor/1"
12+
repo = "hyperpolymath/phronesis"
13+
authority = "upstream-canonical"
14+
15+
purpose = [
16+
"Define canonical semantics and policy boundaries for Phronesis.",
17+
"Declare what downstream/satellite repos can extend but not redefine.",
18+
"Provide a stable golden path and invariant contract for release readiness.",
19+
]
20+
21+
[identity]
22+
project = "phronesis"
23+
kind = "language"
24+
one-sentence = "A neuro-symbolic, provably-safe language for agentic ethical reasoning on the BEAM."
25+
domain = "ethical AI / policy languages / formal verification"
26+
27+
[semantic-authority]
28+
policy = "canonical"
29+
owns = [
30+
"Phronesis language semantics and specification (spec/, formal/)",
31+
"Invariant definitions and contractiles (.machine_readable/contractiles/)",
32+
"Reference implementation behaviour (lib/phronesis/)",
33+
]
34+
35+
[implementation-policy]
36+
# Languages actually used in this repo, plus estate-allowed neighbours.
37+
allowed = ["Elixir", "Rust", "Idris2", "Agda", "Zig", "TLA+", "AsciiDoc", "Just", "Guix Scheme"]
38+
forbidden = ["Python", "Go", "TypeScript", "ReScript", "V-lang", "Node.js", "npm"]
39+
40+
[golden-path]
41+
smoke-test-command = [
42+
"just deps",
43+
"just build",
44+
"just test",
45+
]
46+
success-criteria = [
47+
"Full ExUnit suite passes (consensus/Raft cases skipped — see docs/TESTING-REPORT.adoc)",
48+
"just build is clean under --warnings-as-errors",
49+
"No unresolved critical security findings",
50+
]
51+
52+
[satellite-policy]
53+
must-pin-upstream = true
54+
must-declare-authority = true
55+
must-have-anchor = true
56+
must-have-golden-path = true
57+
58+
[semantic-authority-files]
59+
language-spec = "spec/grammar.ebnf"
60+
operational-semantics = ".machine_readable/SPEC.core.a2ml"
61+
formal-consensus-spec = "formal/PhronesisConsensus.tla"
62+
proof-corpus = "academic/proofs/"
63+
claims-vs-reality = "AUDIT.adoc"

.machine_readable/ai/.clinerules

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
# Phronesis — Cline AI rules. Kept in sync with .cursorrules / .windsurfrules.
4+
# Authoritative AI instructions: 0-AI-MANIFEST.a2ml (root) and .claude/CLAUDE.md.
5+
6+
# STARTUP (read in this order)
7+
# 1. 0-AI-MANIFEST.a2ml — canonical file locations + invariants
8+
# 2. .machine_readable/6a2/anchors/ANCHOR.a2ml — identity + golden path
9+
# 3. .machine_readable/6a2/STATE.a2ml — current status + blockers
10+
# 4. .claude/CLAUDE.md — full language / licence policy
11+
12+
# LICENSE (per-file, REUSE-style; SPDX header required on EVERY file)
13+
# Code (*.ex/*.exs/*.rs/*.idr/*.tla/*.zig, mix.exs, Justfile, Mustfile, *.a2ml,
14+
# Guix *.scm): MPL-2.0.
15+
# Documentation (narrative *.adoc, wiki/, academic/ prose): CC-BY-SA-4.0.
16+
# GitHub community files (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md,
17+
# CHANGELOG.md): MPL-2.0.
18+
# Never AGPL-3.0. Copyright: Jonathan D.A. Jewell (hyperpolymath)
19+
# <j.d.a.jewell@open.ac.uk>.
20+
21+
# STATE FILES (.machine_readable/6a2/ ONLY)
22+
# The 6 core A2ML files — STATE, META, ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK —
23+
# live in .machine_readable/6a2/ and NOWHERE else. Never create *.a2ml metadata
24+
# in the repo root; the root copy is always treated as stale drift.
25+
26+
# LANGUAGES (this repo)
27+
# Reference implementation: Elixir/BEAM (lib/phronesis/).
28+
# Production compiler: Rust -> WASM (compiler/phronesis-ast, compiler/phronesis-wasm).
29+
# Formal: TLA+ (formal/); proof corpus in academic/ (lattice/order/type theory).
30+
# Estate-allowed elsewhere: AffineScript, Rust/SPARK, Zig, Idris2, Agda, Gleam, Elixir.
31+
# BANNED: Python, Go, TypeScript, ReScript, V-lang, Java/Kotlin/Swift, Node.js, npm.
32+
33+
# BANNED UNSAFE PATTERNS
34+
# Elixir: no bare `raise` without a rescue strategy; use {:ok,_}/{:error,_} tuples;
35+
# supervisors need explicit restart strategies.
36+
# Rust: no `transmute` (unless FFI with a // SAFETY: comment); no `.unwrap()`/
37+
# `.expect()`/`panic!` in library code without justification.
38+
# Idris2: no believe_me/assert_total/assert_smaller. Coq: no Admitted. Lean: no sorry.
39+
40+
# CONTAINERS
41+
# Runtime: Podman (never Docker). File: Containerfile (never Dockerfile).
42+
43+
# BUILD SYSTEM
44+
# Use `just` (Justfile) for build/test/lint/format. No Makefiles (use Mustfile/
45+
# Justfile). `just test` is the definitive correctness gate.
46+
47+
# DOCUMENTATION
48+
# AsciiDoc (.adoc) for all docs. Markdown only for GitHub-required files
49+
# (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, .github/**).
50+
# README is .adoc here.
51+
52+
# CODE STYLE
53+
# British English in user-facing strings and docs. Descriptive names. No
54+
# commented-out code (git has history). Must pass `mix format` / `rustfmt`.

.machine_readable/ai/.cursorrules

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
# Phronesis — Cursor AI rules. Kept in sync with .clinerules / .windsurfrules.
4+
# Authoritative AI instructions: 0-AI-MANIFEST.a2ml (root) and .claude/CLAUDE.md.
5+
6+
# STARTUP (read in this order)
7+
# 1. 0-AI-MANIFEST.a2ml — canonical file locations + invariants
8+
# 2. .machine_readable/6a2/anchors/ANCHOR.a2ml — identity + golden path
9+
# 3. .machine_readable/6a2/STATE.a2ml — current status + blockers
10+
# 4. .claude/CLAUDE.md — full language / licence policy
11+
12+
# LICENSE (per-file, REUSE-style; SPDX header required on EVERY file)
13+
# Code (*.ex/*.exs/*.rs/*.idr/*.tla/*.zig, mix.exs, Justfile, Mustfile, *.a2ml,
14+
# Guix *.scm): MPL-2.0.
15+
# Documentation (narrative *.adoc, wiki/, academic/ prose): CC-BY-SA-4.0.
16+
# GitHub community files (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md,
17+
# CHANGELOG.md): MPL-2.0.
18+
# Never AGPL-3.0. Copyright: Jonathan D.A. Jewell (hyperpolymath)
19+
# <j.d.a.jewell@open.ac.uk>.
20+
21+
# STATE FILES (.machine_readable/6a2/ ONLY)
22+
# The 6 core A2ML files — STATE, META, ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK —
23+
# live in .machine_readable/6a2/ and NOWHERE else. Never create *.a2ml metadata
24+
# in the repo root; the root copy is always treated as stale drift.
25+
26+
# LANGUAGES (this repo)
27+
# Reference implementation: Elixir/BEAM (lib/phronesis/).
28+
# Production compiler: Rust -> WASM (compiler/phronesis-ast, compiler/phronesis-wasm).
29+
# Formal: TLA+ (formal/); proof corpus in academic/ (lattice/order/type theory).
30+
# Estate-allowed elsewhere: AffineScript, Rust/SPARK, Zig, Idris2, Agda, Gleam, Elixir.
31+
# BANNED: Python, Go, TypeScript, ReScript, V-lang, Java/Kotlin/Swift, Node.js, npm.
32+
33+
# BANNED UNSAFE PATTERNS
34+
# Elixir: no bare `raise` without a rescue strategy; use {:ok,_}/{:error,_} tuples;
35+
# supervisors need explicit restart strategies.
36+
# Rust: no `transmute` (unless FFI with a // SAFETY: comment); no `.unwrap()`/
37+
# `.expect()`/`panic!` in library code without justification.
38+
# Idris2: no believe_me/assert_total/assert_smaller. Coq: no Admitted. Lean: no sorry.
39+
40+
# CONTAINERS
41+
# Runtime: Podman (never Docker). File: Containerfile (never Dockerfile).
42+
43+
# BUILD SYSTEM
44+
# Use `just` (Justfile) for build/test/lint/format. No Makefiles (use Mustfile/
45+
# Justfile). `just test` is the definitive correctness gate.
46+
47+
# DOCUMENTATION
48+
# AsciiDoc (.adoc) for all docs. Markdown only for GitHub-required files
49+
# (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, .github/**).
50+
# README is .adoc here.
51+
52+
# CODE STYLE
53+
# British English in user-facing strings and docs. Descriptive names. No
54+
# commented-out code (git has history). Must pass `mix format` / `rustfmt`.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
# Phronesis — Windsurf AI rules. Kept in sync with .cursorrules / .clinerules.
4+
# Authoritative AI instructions: 0-AI-MANIFEST.a2ml (root) and .claude/CLAUDE.md.
5+
6+
# STARTUP (read in this order)
7+
# 1. 0-AI-MANIFEST.a2ml — canonical file locations + invariants
8+
# 2. .machine_readable/6a2/anchors/ANCHOR.a2ml — identity + golden path
9+
# 3. .machine_readable/6a2/STATE.a2ml — current status + blockers
10+
# 4. .claude/CLAUDE.md — full language / licence policy
11+
12+
# LICENSE (per-file, REUSE-style; SPDX header required on EVERY file)
13+
# Code (*.ex/*.exs/*.rs/*.idr/*.tla/*.zig, mix.exs, Justfile, Mustfile, *.a2ml,
14+
# Guix *.scm): MPL-2.0.
15+
# Documentation (narrative *.adoc, wiki/, academic/ prose): CC-BY-SA-4.0.
16+
# GitHub community files (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md,
17+
# CHANGELOG.md): MPL-2.0.
18+
# Never AGPL-3.0. Copyright: Jonathan D.A. Jewell (hyperpolymath)
19+
# <j.d.a.jewell@open.ac.uk>.
20+
21+
# STATE FILES (.machine_readable/6a2/ ONLY)
22+
# The 6 core A2ML files — STATE, META, ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK —
23+
# live in .machine_readable/6a2/ and NOWHERE else. Never create *.a2ml metadata
24+
# in the repo root; the root copy is always treated as stale drift.
25+
26+
# LANGUAGES (this repo)
27+
# Reference implementation: Elixir/BEAM (lib/phronesis/).
28+
# Production compiler: Rust -> WASM (compiler/phronesis-ast, compiler/phronesis-wasm).
29+
# Formal: TLA+ (formal/); proof corpus in academic/ (lattice/order/type theory).
30+
# Estate-allowed elsewhere: AffineScript, Rust/SPARK, Zig, Idris2, Agda, Gleam, Elixir.
31+
# BANNED: Python, Go, TypeScript, ReScript, V-lang, Java/Kotlin/Swift, Node.js, npm.
32+
33+
# BANNED UNSAFE PATTERNS
34+
# Elixir: no bare `raise` without a rescue strategy; use {:ok,_}/{:error,_} tuples;
35+
# supervisors need explicit restart strategies.
36+
# Rust: no `transmute` (unless FFI with a // SAFETY: comment); no `.unwrap()`/
37+
# `.expect()`/`panic!` in library code without justification.
38+
# Idris2: no believe_me/assert_total/assert_smaller. Coq: no Admitted. Lean: no sorry.
39+
40+
# CONTAINERS
41+
# Runtime: Podman (never Docker). File: Containerfile (never Dockerfile).
42+
43+
# BUILD SYSTEM
44+
# Use `just` (Justfile) for build/test/lint/format. No Makefiles (use Mustfile/
45+
# Justfile). `just test` is the definitive correctness gate.
46+
47+
# DOCUMENTATION
48+
# AsciiDoc (.adoc) for all docs. Markdown only for GitHub-required files
49+
# (SECURITY.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md, CHANGELOG.md, .github/**).
50+
# README is .adoc here.
51+
52+
# CODE STYLE
53+
# British English in user-facing strings and docs. Descriptive names. No
54+
# commented-out code (git has history). Must pass `mix format` / `rustfmt`.

.machine_readable/ai/AI.a2ml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# SPDX-License-Identifier: MPL-2.0
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# AI.a2ml — machine-readable AI-assistant directives for Phronesis.
5+
6+
[repository-focus]
7+
name = "phronesis"
8+
kind = "language"
9+
one-sentence = "A neuro-symbolic, provably-safe language for agentic ethical reasoning on the BEAM."
10+
authority = ".machine_readable/ is authoritative; the 6 core A2ML files live in .machine_readable/6a2/ only."
11+
12+
[read-order]
13+
1 = "0-AI-MANIFEST.a2ml"
14+
2 = ".machine_readable/6a2/anchors/ANCHOR.a2ml"
15+
3 = ".machine_readable/6a2/STATE.a2ml"
16+
4 = ".machine_readable/6a2/META.a2ml"
17+
5 = ".claude/CLAUDE.md"
18+
19+
[workflow]
20+
step-1 = "Inspect .machine_readable/6a2/STATE.a2ml for blockers and next actions."
21+
step-2 = "Respect constraints in .machine_readable/6a2/AGENTIC.a2ml when changing tooling."
22+
step-3 = "Run `just test` (the correctness gate) before claiming a change is done."
23+
step-4 = "After edits, update STATE.a2ml outcomes and commit with a concise, imperative message."
24+
25+
[languages]
26+
reference-implementation = "Elixir/BEAM (lib/phronesis/)"
27+
compiler = "Rust -> WASM (compiler/)"
28+
formal = "TLA+ (formal/); proof corpus in academic/"
29+
banned = ["Python", "Go", "TypeScript", "ReScript", "V-lang", "Java", "Kotlin", "Swift", "Node.js", "npm"]
30+
31+
[licence]
32+
code = "MPL-2.0"
33+
documentation = "CC-BY-SA-4.0"
34+
never = "AGPL-3.0"
35+
rule = "SPDX-License-Identifier header required on every file."
36+
37+
[delivery-promises]
38+
report-changes-to = ["STATE.a2ml", ".machine_readable/contractiles/", ".machine_readable/ai/"]
39+
keep-in-sync = "Update this file if repository governance changes."

.machine_readable/ai/README.adoc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// SPDX-License-Identifier: CC-BY-SA-4.0
2+
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= AI Guidance Directory (`.machine_readable/ai/`)
4+
:toc:
5+
6+
Centralised, tool-specific AI-assistant instructions for Phronesis. Keeping them
7+
here (rather than scattered at the repo root) is the RSR convention.
8+
9+
== Contents
10+
11+
[cols="1,3"]
12+
|===
13+
| File | Purpose
14+
15+
| `.cursorrules` | Rules for Cursor.
16+
| `.clinerules` | Rules for Cline.
17+
| `.windsurfrules` | Rules for Windsurf.
18+
| `AI.a2ml` | Machine-readable workflow + repository-focus directives.
19+
| `README.adoc` | This index.
20+
|===
21+
22+
The three `.*rules` files carry identical guidance with a tool-specific header
23+
line; keep them in sync when one changes.
24+
25+
== Canonical AI authority (outside this directory)
26+
27+
* `0-AI-MANIFEST.a2ml` (repo root) — the universal entry point: canonical file
28+
locations and invariants.
29+
* `.claude/CLAUDE.md` — full language and licence policy for Claude.
30+
* `.github/copilot-instructions.md` — GitHub Copilot code-review conventions.
31+
32+
== Recommended machine read order
33+
34+
. `0-AI-MANIFEST.a2ml`
35+
. `.machine_readable/6a2/anchors/ANCHOR.a2ml` — identity + golden path
36+
. `.machine_readable/6a2/STATE.a2ml` — current status + blockers
37+
. `.machine_readable/6a2/META.a2ml` — architecture decisions
38+
. `.claude/CLAUDE.md` — language / licence policy

0 commit comments

Comments
 (0)