diff --git a/.machine_readable/6a2/PLAYBOOK.a2ml b/.machine_readable/6a2/PLAYBOOK.a2ml
index 676ec4c..cdaebfd 100644
--- a/.machine_readable/6a2/PLAYBOOK.a2ml
+++ b/.machine_readable/6a2/PLAYBOOK.a2ml
@@ -63,7 +63,7 @@ enforcement-workflow = ".github/workflows/estate-rules.yml"
# .github/ CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, workflows/
# .machine_readable/ AI manifests (0.1-AI-MANIFEST.a2ml), 6a2/ checkpoints,
# contractiles/, configs/, anchors/, policies/, scripts/, svc/
-# build/ contractile.just, flake.nix, guix.scm, Containerfile,
+# build/ contractile.just, flake.guix, guix.scm, Containerfile,
# just/*.just (Justfile section imports)
# docs/ onboarding/, status/, architecture/, governance/ (all .adoc)
# session/ dispatch.sh, custom-checks.k9, local-hooks.sh
@@ -103,7 +103,7 @@ enforcement-workflow = ".github/workflows/estate-rules.yml"
# build/just/groove.just Groove protocol setup (after zig removed)
#
# Daily-use recipes (BUILD, TEST, LINT, RUN, DEPS, DOCS, CONTAINER, CI,
-# SECURITY, STATE, GUIX/NIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION)
+# SECURITY, STATE, GUIX/GUIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION)
# stay in the root Justfile where users expect to find them.
# === 5-PR cleanup pattern ===
diff --git a/ABI-FFI-README.md b/ABI-FFI-README.adoc
similarity index 74%
rename from ABI-FFI-README.md
rename to ABI-FFI-README.adoc
index aef6962..909c707 100644
--- a/ABI-FFI-README.md
+++ b/ABI-FFI-README.adoc
@@ -1,21 +1,20 @@
-
-# SMTLib ABI/FFI Documentation
+== SMTLib ABI/FFI Documentation
-## Overview
+=== Overview
-This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
+This library follows the *Hyperpolymath RSR Standard* for ABI and FFI
+design:
-- **ABI (Application Binary Interface)** defined in **Idris2** with formal proofs
-- **FFI (Foreign Function Interface)** implemented in **Zig** for C compatibility
-- **Generated C headers** bridge Idris2 ABI to Zig FFI
-- **Any language** can call through standard C ABI
+* *ABI (Application Binary Interface)* defined in *Idris2* with formal
+proofs
+* *FFI (Foreign Function Interface)* implemented in *Zig* for C
+compatibility
+* *Generated C headers* bridge Idris2 ABI to Zig FFI
+* *Any language* can call through standard C ABI
-## Architecture
+=== Architecture
-```
+....
┌─────────────────────────────────────────────┐
│ ABI Definitions (Idris2) │
│ src/abi/ │
@@ -45,13 +44,13 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
▼
┌─────────────────────────────────────────────┐
│ Any Language via C ABI │
-│ - Rust, ReScript, Julia, Python, etc. │
+│ - Rust, AffineScript, Julia, Python, etc. │
└─────────────────────────────────────────────┘
-```
+....
-## Directory Structure
+=== Directory Structure
-```
+....
smtlib/
├── src/
│ ├── abi/ # ABI definitions (Idris2)
@@ -77,17 +76,19 @@ smtlib/
│
└── bindings/ # Language-specific wrappers (optional)
├── rust/
- ├── rescript/
+ ├── affinescript/
└── julia/
-```
+....
-## Why Idris2 for ABI?
+=== Why Idris2 for ABI?
-### 1. **Formal Verification**
+==== 1. *Formal Verification*
-Idris2's dependent types allow proving properties about the ABI at compile-time:
+Idris2’s dependent types allow proving properties about the ABI at
+compile-time:
-```idris
+[source,idris]
+----
-- Prove struct size is correct
public export
exampleStructSize : HasSize ExampleStruct 16
@@ -99,13 +100,14 @@ fieldAligned : Divides 8 (offsetOf ExampleStruct.field)
-- Prove ABI is platform-compatible
public export
abiCompatible : Compatible (ABI 1) (ABI 2)
-```
+----
-### 2. **Type Safety**
+==== 2. *Type Safety*
Encode invariants that C/Zig cannot express:
-```idris
+[source,idris]
+----
-- Non-null pointer guaranteed at type level
data Handle : Type where
MkHandle : (ptr : Bits64) -> {auto 0 nonNull : So (ptr /= 0)} -> Handle
@@ -113,13 +115,14 @@ data Handle : Type where
-- Array with length proof
data Buffer : (n : Nat) -> Type where
MkBuffer : Vect n Byte -> Buffer n
-```
+----
-### 3. **Platform Abstraction**
+==== 3. *Platform Abstraction*
Platform-specific types with compile-time selection:
-```idris
+[source,idris]
+----
CInt : Platform -> Type
CInt Linux = Bits32
CInt Windows = Bits32
@@ -127,13 +130,14 @@ CInt Windows = Bits32
CSize : Platform -> Type
CSize Linux = Bits64
CSize Windows = Bits64
-```
+----
-### 4. **Safe Evolution**
+==== 4. *Safe Evolution*
Prove that new ABI versions are backward-compatible:
-```idris
+[source,idris]
+----
-- Compiler enforces compatibility
abiUpgrade : ABI 1 -> ABI 2
abiUpgrade old = MkABI2 {
@@ -142,71 +146,78 @@ abiUpgrade old = MkABI2 {
-- Can add new fields
new_features = defaults
}
-```
+----
-## Why Zig for FFI?
+=== Why Zig for FFI?
-### 1. **C ABI Compatibility**
+==== 1. *C ABI Compatibility*
Zig exports C-compatible functions naturally:
-```zig
+[source,zig]
+----
export fn library_function(param: i32) i32 {
return param * 2;
}
-```
+----
-### 2. **Memory Safety**
+==== 2. *Memory Safety*
Compile-time safety without runtime overhead:
-```zig
+[source,zig]
+----
// Null check enforced at compile time
const handle = init() orelse return error.InitFailed;
defer free(handle);
-```
+----
-### 3. **Cross-Compilation**
+==== 3. *Cross-Compilation*
Built-in cross-compilation to any platform:
-```bash
+[source,bash]
+----
zig build -Dtarget=x86_64-linux
zig build -Dtarget=aarch64-macos
zig build -Dtarget=x86_64-windows
-```
+----
-### 4. **Zero Dependencies**
+==== 4. *Zero Dependencies*
No runtime, no libc required (unless explicitly needed):
-```zig
+[source,zig]
+----
// Minimal binary size
pub const lib = @import("std");
// Only includes what you use
-```
+----
-## Building
+=== Building
-### Build FFI Library
+==== Build FFI Library
-```bash
+[source,bash]
+----
cd ffi/zig
zig build # Build debug
zig build -Doptimize=ReleaseFast # Build optimized
zig build test # Run tests
-```
+----
-### Generate C Header from Idris2 ABI
+==== Generate C Header from Idris2 ABI
-```bash
+[source,bash]
+----
cd src/abi
idris2 --cg c-header Types.idr -o ../../generated/abi/smtlib.h
-```
+----
-### Cross-Compile
+==== Cross-Compile
-```bash
+[source,bash]
+----
cd ffi/zig
# Linux x86_64
@@ -217,13 +228,14 @@ zig build -Dtarget=aarch64-macos
# Windows x86_64
zig build -Dtarget=x86_64-windows
-```
+----
-## Usage
+=== Usage
-### From C
+==== From C
-```c
+[source,c]
+----
#include "smtlib.h"
int main() {
@@ -239,16 +251,19 @@ int main() {
smtlib_free(handle);
return 0;
}
-```
+----
Compile with:
-```bash
+
+[source,bash]
+----
gcc -o example example.c -lsmtlib -L./zig-out/lib
-```
+----
-### From Idris2
+==== From Idris2
-```idris
+[source,idris]
+----
import SMTLib.ABI.Foreign
main : IO ()
@@ -261,11 +276,12 @@ main = do
free handle
putStrLn "Success"
-```
+----
-### From Rust
+==== From Rust
-```rust
+[source,rust]
+----
#[link(name = "smtlib")]
extern "C" {
fn smtlib_init() -> *mut std::ffi::c_void;
@@ -284,11 +300,12 @@ fn main() {
smtlib_free(handle);
}
}
-```
+----
-### From Julia
+==== From Julia
-```julia
+[source,julia]
+----
const libsmtlib = "libsmtlib"
function init()
@@ -314,27 +331,30 @@ try
finally
cleanup(handle)
end
-```
+----
-## Testing
+=== Testing
-### Unit Tests (Zig)
+==== Unit Tests (Zig)
-```bash
+[source,bash]
+----
cd ffi/zig
zig build test
-```
+----
-### Integration Tests
+==== Integration Tests
-```bash
+[source,bash]
+----
cd ffi/zig
zig build test-integration
-```
+----
-### ABI Verification (Idris2)
+==== ABI Verification (Idris2)
-```idris
+[source,idris]
+----
-- Compile-time verification
%runElab verifyABI
@@ -344,44 +364,44 @@ main = do
verifyLayoutsCorrect
verifyAlignmentsCorrect
putStrLn "ABI verification passed"
-```
+----
-## Contributing
+=== Contributing
When modifying the ABI/FFI:
-1. **Update ABI first** (`src/abi/*.idr`)
- - Modify type definitions
- - Update proofs
- - Ensure backward compatibility
-
-2. **Generate C header**
- ```bash
- idris2 --cg c-header src/abi/Types.idr -o generated/abi/smtlib.h
- ```
-
-3. **Update FFI implementation** (`ffi/zig/src/main.zig`)
- - Implement new functions
- - Match ABI types exactly
-
-4. **Add tests**
- - Unit tests in Zig
- - Integration tests
- - ABI verification tests
-
-5. **Update documentation**
- - Function signatures
- - Usage examples
- - Migration guide (if breaking changes)
-
-## License
+[arabic]
+. *Update ABI first* (`+src/abi/*.idr+`)
+* Modify type definitions
+* Update proofs
+* Ensure backward compatibility
+. *Generate C header*
++
+[source,bash]
+----
+idris2 --cg c-header src/abi/Types.idr -o generated/abi/smtlib.h
+----
+. *Update FFI implementation* (`+ffi/zig/src/main.zig+`)
+* Implement new functions
+* Match ABI types exactly
+. *Add tests*
+* Unit tests in Zig
+* Integration tests
+* ABI verification tests
+. *Update documentation*
+* Function signatures
+* Usage examples
+* Migration guide (if breaking changes)
+
+=== License
MPL-2.0
-## See Also
+=== See Also
-- [Idris2 Documentation](https://idris2.readthedocs.io)
-- [Zig Documentation](https://ziglang.org/documentation/master/)
-- [Rhodium Standard Repositories](https://github.com/hyperpolymath/rhodium-standard-repositories)
-- [FFI Migration Guide](../ffi-migration-guide.md)
-- [ABI Migration Guide](../abi-migration-guide.md)
+* https://idris2.readthedocs.io[Idris2 Documentation]
+* https://ziglang.org/documentation/master/[Zig Documentation]
+* https://github.com/hyperpolymath/rhodium-standard-repositories[Rhodium
+Standard Repositories]
+* link:../ffi-migration-guide.md[FFI Migration Guide]
+* link:../abi-migration-guide.md[ABI Migration Guide]
diff --git a/AGENTS.adoc b/AGENTS.adoc
new file mode 100644
index 0000000..12fe032
--- /dev/null
+++ b/AGENTS.adoc
@@ -0,0 +1,76 @@
+== Repository Guidelines
+
+=== Project Structure & Module Organization
+
+* `+src/SMTLib.jl+` contains the main `+SMTLib+` module and public API.
+* `+test/runtests.jl+` holds the test suite driven by Julia’s `+Test+`
+stdlib.
+* `+Project.toml+` defines package metadata and dependencies.
+* `+README.md+` documents features, usage, and solver prerequisites.
+
+=== Build, Test, and Development Commands
+
+* `+julia --project=. -e 'using Pkg; Pkg.instantiate()'+` installs
+dependencies for this project environment.
+* `+julia --project=. -e 'using Pkg; Pkg.precompile()'+` precompiles for
+faster local runs.
+* `+julia --project=. -e 'using Pkg; Pkg.test()'+` runs the test suite.
+
+This package is pure Julia, so there is no separate build step beyond
+precompilation.
+
+=== User Options & Configuration
+
+* Prefer `+find_solver(:z3)+` or `+find_solver(:cvc5)+` when you need a
+specific backend.
+* `+SMTContext+` accepts `+solver+`, `+logic+`, and `+timeout_ms+`
+(milliseconds).
+* `+check_sat(ctx; get_model=false)+` skips model parsing when you only
+need status.
+* The `+@smt+` macro mirrors `+SMTContext+` options:
+`+@smt solver=:z3 logic=:QF_LRA timeout=10000 begin ... end+`.
+
+=== Coding Style & Naming Conventions
+
+* Follow Julia conventions: 4-space indentation, CamelCase for types
+(`+SMTContext+`), lowercase with underscores for functions
+(`+available_solvers+`), and `+!+` suffix for mutating functions
+(`+reset!+`, `+assert!+`).
+* Keep public API exported from `+src/SMTLib.jl+` and add docstrings for
+new public functions.
+* Prefer explicit types for public structs and use `+Symbol+` for SMT
+identifiers.
+
+=== Testing Guidelines
+
+* Tests live in `+test/runtests.jl+` and use `+Test.@testset+` blocks.
+* Add new tests near related functionality and keep them deterministic.
+* Solver-dependent tests should gracefully skip when no SMT solver is
+installed.
+
+=== CI & Solver Detection
+
+* CI should install at least one solver and ensure it is on `+PATH+`
+(e.g., `+apt-get install z3+` on Ubuntu runners).
+* Expect solver-backed tests to skip or return `+:unknown+` if no solver
+is detected; document this in CI logs or PR notes.
+* For a solver matrix, run separate CI jobs with only one solver on
+`+PATH+` to validate backend-specific behavior.
+* If adding a new solver, extend `+available_solvers()+` and keep
+`+README.md+` and this guide in sync.
+
+=== Commit & Pull Request Guidelines
+
+* Current history is minimal; use clear, imperative commit subjects
+(e.g., "`Add model parsing for bitvectors`").
+* PRs should describe the change, list commands run (e.g.,
+`+Pkg.test()+`), and note solver prerequisites when relevant.
+* If behavior changes are user-visible, update `+README.md+` examples or
+API descriptions.
+
+=== Solver Prerequisites
+
+* At least one SMT solver (Z3, CVC5, Yices, or MathSAT) must be
+installed to run solver-backed tests and examples.
+* If adding solver-specific features, document them in `+README.md+` and
+guard for missing executables.
diff --git a/AGENTS.md b/AGENTS.md
deleted file mode 100644
index 75106a6..0000000
--- a/AGENTS.md
+++ /dev/null
@@ -1,49 +0,0 @@
-
-# Repository Guidelines
-
-## Project Structure & Module Organization
-- `src/SMTLib.jl` contains the main `SMTLib` module and public API.
-- `test/runtests.jl` holds the test suite driven by Julia’s `Test` stdlib.
-- `Project.toml` defines package metadata and dependencies.
-- `README.md` documents features, usage, and solver prerequisites.
-
-## Build, Test, and Development Commands
-- `julia --project=. -e 'using Pkg; Pkg.instantiate()'` installs dependencies for this project environment.
-- `julia --project=. -e 'using Pkg; Pkg.precompile()'` precompiles for faster local runs.
-- `julia --project=. -e 'using Pkg; Pkg.test()'` runs the test suite.
-
-This package is pure Julia, so there is no separate build step beyond precompilation.
-
-## User Options & Configuration
-- Prefer `find_solver(:z3)` or `find_solver(:cvc5)` when you need a specific backend.
-- `SMTContext` accepts `solver`, `logic`, and `timeout_ms` (milliseconds).
-- `check_sat(ctx; get_model=false)` skips model parsing when you only need status.
-- The `@smt` macro mirrors `SMTContext` options: `@smt solver=:z3 logic=:QF_LRA timeout=10000 begin ... end`.
-
-## Coding Style & Naming Conventions
-- Follow Julia conventions: 4-space indentation, CamelCase for types (`SMTContext`), lowercase with underscores for functions (`available_solvers`), and `!` suffix for mutating functions (`reset!`, `assert!`).
-- Keep public API exported from `src/SMTLib.jl` and add docstrings for new public functions.
-- Prefer explicit types for public structs and use `Symbol` for SMT identifiers.
-
-## Testing Guidelines
-- Tests live in `test/runtests.jl` and use `Test.@testset` blocks.
-- Add new tests near related functionality and keep them deterministic.
-- Solver-dependent tests should gracefully skip when no SMT solver is installed.
-
-## CI & Solver Detection
-- CI should install at least one solver and ensure it is on `PATH` (e.g., `apt-get install z3` on Ubuntu runners).
-- Expect solver-backed tests to skip or return `:unknown` if no solver is detected; document this in CI logs or PR notes.
-- For a solver matrix, run separate CI jobs with only one solver on `PATH` to validate backend-specific behavior.
-- If adding a new solver, extend `available_solvers()` and keep `README.md` and this guide in sync.
-
-## Commit & Pull Request Guidelines
-- Current history is minimal; use clear, imperative commit subjects (e.g., "Add model parsing for bitvectors").
-- PRs should describe the change, list commands run (e.g., `Pkg.test()`), and note solver prerequisites when relevant.
-- If behavior changes are user-visible, update `README.md` examples or API descriptions.
-
-## Solver Prerequisites
-- At least one SMT solver (Z3, CVC5, Yices, or MathSAT) must be installed to run solver-backed tests and examples.
-- If adding solver-specific features, document them in `README.md` and guard for missing executables.
diff --git a/CODE_OF_CONDUCT.adoc b/CODE_OF_CONDUCT.adoc
new file mode 100644
index 0000000..019a362
--- /dev/null
+++ b/CODE_OF_CONDUCT.adoc
@@ -0,0 +1,339 @@
+== Code of Conduct
+
+=== Our Pledge
+
+We as members, contributors, and leaders pledge to make participation in
+SMTLib.jl a harassment-free experience for everyone, regardless of age,
+body size, visible or invisible disability, ethnicity, sex
+characteristics, gender identity and expression, level of experience,
+education, socio-economic status, nationality, personal appearance,
+race, caste, colour, religion, or sexual identity and orientation.
+
+We pledge to act and interact in ways that contribute to an open,
+welcoming, diverse, inclusive, and healthy community.
+
+We recognise that a thriving open source community requires
+*psychological safety* — an environment where people can contribute, ask
+questions, make mistakes, and learn without fear of ridicule or
+retaliation.
+
+'''''
+
+=== Our Standards
+
+==== Expected Behaviour
+
+The following behaviours contribute to a positive environment:
+
+*Communication* - Using welcoming and inclusive language - Being
+respectful of differing viewpoints and experiences - Giving and
+gracefully accepting constructive feedback - Assuming good intent while
+addressing impact - Communicating clearly and patiently, especially with
+newcomers
+
+*Collaboration* - Focusing on what is best for the community - Showing
+empathy and kindness toward other community members - Being
+collaborative rather than competitive - Mentoring and supporting less
+experienced contributors - Celebrating others’ contributions and
+successes
+
+*Professionalism* - Accepting responsibility and apologising to those
+affected by our mistakes - Learning from the experience and avoiding
+repetition - Respecting others’ time and attention - Staying on topic in
+project spaces - Following project guidelines and conventions
+
+*Accessibility* - Using plain language and avoiding unnecessary jargon -
+Providing alt text for images and transcripts for audio/video - Being
+patient with those using assistive technologies - Accommodating
+different communication styles and needs - Recognising that not everyone
+communicates the same way
+
+==== Unacceptable Behaviour
+
+The following behaviours are considered harassment and are unacceptable:
+
+*Harassment* - The use of sexualised language or imagery, and sexual
+attention or advances of any kind - Trolling, insulting or derogatory
+comments, and personal or political attacks - Public or private
+harassment - Deliberate intimidation, stalking, or following (online or
+in-person) - Unwelcome physical contact or simulated physical contact
+(e.g., emoji) - Sustained disruption of talks, events, or online
+discussions
+
+*Discrimination* - Discriminatory jokes and language - Posting or
+threatening to post others’ personally identifying information
+("`doxing`") - Advocating for, or encouraging, any of the above
+behaviour - Microaggressions — subtle, often unintentional,
+discriminatory comments or actions
+
+*Professional Misconduct* - Publishing others’ private information
+without explicit permission - Misrepresenting affiliation or
+contributions - Plagiarism or claiming credit for others’ work -
+Retaliating against anyone who reports a Code of Conduct violation -
+Other conduct which could reasonably be considered inappropriate in a
+professional setting
+
+==== Grey Areas
+
+Some situations require judgement. When uncertain:
+
+* *Intent vs Impact*: Good intentions do not excuse harmful impact.
+Focus on making things right.
+* *Power Dynamics*: Those with more power (maintainers, employers,
+experienced contributors) must be especially mindful of their impact.
+* *Cultural Differences*: What’s acceptable varies by culture. When in
+doubt, err on the side of caution and ask.
+* *Humour*: Jokes at others’ expense are rarely funny to everyone. Punch
+up, not down.
+
+'''''
+
+=== Scope
+
+This Code of Conduct applies within all community spaces, including:
+
+*Online Spaces* - Repository discussions, issues, and pull/merge
+requests - Project chat channels (Matrix, Discord, Slack, IRC) - Mailing
+lists and forums - Social media when representing the project - Video
+calls and virtual meetings
+
+*In-Person Spaces* - Conferences, meetups, and events - Workshops and
+training sessions - Any gathering where you represent the project
+
+*Representation* This Code of Conduct also applies when an individual is
+officially representing the community in public spaces. Examples
+include:
+
+* Using an official project email address
+* Posting via an official social media account
+* Acting as an appointed representative at an event
+* Speaking on behalf of the project
+
+'''''
+
+=== Enforcement
+
+==== Reporting
+
+If you experience or witness unacceptable behaviour, or have any other
+concerns, please report it as soon as possible.
+
+*How to Report*
+
+[width="99%",cols="30%,33%,37%",options="header",]
+|===
+|Method |Details |Best For
+|*Email* |j.d.a.jewell@open.ac.uk |Detailed reports, sensitive matters
+
+|*Private Message* |Contact any maintainer directly |Quick questions,
+minor issues
+
+|*Anonymous Form* |[Link to form if available] |When you need anonymity
+|===
+
+*What to Include*
+
+* Your contact information (unless anonymous)
+* Names/usernames of those involved
+* Description of what happened
+* When and where it occurred
+* Any witnesses
+* Any supporting evidence (screenshots, links)
+* How you would like us to respond (if you have a preference)
+
+*What Happens Next*
+
+[arabic]
+. You will receive acknowledgment within *72 hours*
+. The maintainers will review the report
+. We may ask for additional information
+. We will determine appropriate action
+. We will inform you of the outcome (respecting others’ privacy)
+
+==== Confidentiality
+
+All reports will be handled with discretion:
+
+* Reporter identity is protected by default
+* Details are shared only with those who need to know
+* We will ask before naming you in any communication
+* Anonymous reports are accepted and investigated
+
+==== Conflicts of Interest
+
+If a maintainers member is involved in an incident:
+
+* They will recuse themselves from the process
+* Another maintainer or external party will handle the report
+* We will disclose any potential conflicts
+
+'''''
+
+=== Enforcement Guidelines
+
+The maintainers will follow these guidelines in determining
+consequences:
+
+==== 1. Correction
+
+*Community Impact*: Use of inappropriate language or other behaviour
+deemed unprofessional or unwelcome.
+
+*Consequence*: A private, written warning providing clarity around the
+nature of the violation and an explanation of why the behaviour was
+inappropriate. A public apology may be requested.
+
+*Duration*: Immediate
+
+==== 2. Warning
+
+*Community Impact*: A violation through a single incident or series of
+actions.
+
+*Consequence*: A warning with consequences for continued behaviour. No
+interaction with the people involved, including unsolicited interaction
+with those enforcing the Code of Conduct, for a specified period. This
+includes avoiding interactions in community spaces as well as external
+channels like social media. Violating these terms may lead to a
+temporary or permanent ban.
+
+*Duration*: 1-4 weeks
+
+==== 3. Temporary Ban
+
+*Community Impact*: A serious violation of community standards,
+including sustained inappropriate behaviour.
+
+*Consequence*: A temporary ban from any sort of interaction or public
+communication with the community for a specified period. No public or
+private interaction with the people involved, including unsolicited
+interaction with those enforcing the Code of Conduct, is allowed during
+this period. Violating these terms may lead to a permanent ban.
+
+*Duration*: 1-6 months
+
+==== 4. Permanent Ban
+
+*Community Impact*: Demonstrating a pattern of violation of community
+standards, including sustained inappropriate behaviour, harassment of an
+individual, or aggression toward or disparagement of classes of
+individuals.
+
+*Consequence*: A permanent ban from any sort of public interaction
+within the community.
+
+*Duration*: Permanent (with appeal rights after 12 months)
+
+==== Enforcement Across Perimeters
+
+For contributors with elevated access (Perimeter 2 or 1):
+
+[cols=",",options="header",]
+|===
+|Level |Additional Consequence
+|Correction |Noted in contributor record
+|Warning |Access privileges may be temporarily reduced
+|Temporary Ban |Access reduced to Perimeter 3 for ban duration
+|Permanent Ban |All access revoked
+|===
+
+'''''
+
+=== Appeals
+
+If you believe an enforcement decision was made in error:
+
+[arabic]
+. *Wait 7 days* after the decision (cooling-off period)
+. *Email* j.d.a.jewell@open.ac.uk with subject line "`Appeal: [Original
+Report ID]`"
+. *Explain* why you believe the decision should be reconsidered
+. *Provide* any new information not previously available
+
+*Appeals Process*
+
+* Appeals are reviewed by a different maintainers member than the
+original
+* You will receive a response within 14 days
+* The appeals decision is final
+* You may only appeal once per incident
+
+*Grounds for Appeal*
+
+* Procedural errors in the original investigation
+* New evidence not previously available
+* Disproportionate response to the violation
+* Misunderstanding of facts
+
+'''''
+
+=== Supporting Those Who Report
+
+We are committed to supporting those who report violations:
+
+*We Will* - Believe and take all reports seriously - Respect your
+privacy and confidentiality preferences - Keep you informed of progress
+(if you wish) - Take steps to protect you from retaliation - Provide
+resources if you need support
+
+*We Will Not* - Require you to confront the person directly - Dismiss
+reports without investigation - Reveal your identity without consent -
+Tolerate retaliation against reporters - Rush you to make decisions
+
+'''''
+
+=== Prevention
+
+Beyond enforcement, we actively work to prevent issues:
+
+*Onboarding* - All contributors are expected to read this Code of
+Conduct - Perimeter 2 applicants must confirm they’ve read and
+understood it - Maintainers receive additional training on enforcement
+
+*Culture* - We model the behaviour we expect - We intervene early when
+we see potential issues - We thank people for positive contributions -
+We create opportunities for diverse voices
+
+*Review* - This Code of Conduct is reviewed annually - Community
+feedback is welcomed - Changes are communicated clearly
+
+'''''
+
+=== Acknowledgments
+
+This Code of Conduct is adapted from:
+
+* https://www.contributor-covenant.org/[Contributor Covenant], version
+2.1
+* https://www.djangoproject.com/conduct/[Django Code of Conduct]
+* https://www.rust-lang.org/policies/code-of-conduct[Rust Code of
+Conduct]
+* https://www.python.org/psf/conduct/[Python Community Code of Conduct]
+
+We thank these communities for their leadership in creating welcoming
+spaces.
+
+'''''
+
+=== Questions?
+
+If you have questions about this Code of Conduct:
+
+* Open a
+https://github.com/hyperpolymath/SMTLib.jl/discussions[Discussion] (for
+general questions)
+* Email j.d.a.jewell@open.ac.uk (for private questions)
+* Contact any maintainer directly
+
+'''''
+
+=== Summary
+
+*Be kind. Be respectful. Be collaborative.*
+
+We’re all here because we care about this project. Let’s make it a place
+where everyone can do their best work.
+
+'''''
+
+Last updated: 2026 · Based on Contributor Covenant 2.1
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index 3671c46..0000000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1,312 +0,0 @@
-
-# Code of Conduct
-
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in SMTLib.jl a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
-
-We recognise that a thriving open source community requires **psychological safety** — an environment where people can contribute, ask questions, make mistakes, and learn without fear of ridicule or retaliation.
-
----
-
-## Our Standards
-
-### Expected Behaviour
-
-The following behaviours contribute to a positive environment:
-
-**Communication**
-- Using welcoming and inclusive language
-- Being respectful of differing viewpoints and experiences
-- Giving and gracefully accepting constructive feedback
-- Assuming good intent while addressing impact
-- Communicating clearly and patiently, especially with newcomers
-
-**Collaboration**
-- Focusing on what is best for the community
-- Showing empathy and kindness toward other community members
-- Being collaborative rather than competitive
-- Mentoring and supporting less experienced contributors
-- Celebrating others' contributions and successes
-
-**Professionalism**
-- Accepting responsibility and apologising to those affected by our mistakes
-- Learning from the experience and avoiding repetition
-- Respecting others' time and attention
-- Staying on topic in project spaces
-- Following project guidelines and conventions
-
-**Accessibility**
-- Using plain language and avoiding unnecessary jargon
-- Providing alt text for images and transcripts for audio/video
-- Being patient with those using assistive technologies
-- Accommodating different communication styles and needs
-- Recognising that not everyone communicates the same way
-
-### Unacceptable Behaviour
-
-The following behaviours are considered harassment and are unacceptable:
-
-**Harassment**
-- The use of sexualised language or imagery, and sexual attention or advances of any kind
-- Trolling, insulting or derogatory comments, and personal or political attacks
-- Public or private harassment
-- Deliberate intimidation, stalking, or following (online or in-person)
-- Unwelcome physical contact or simulated physical contact (e.g., emoji)
-- Sustained disruption of talks, events, or online discussions
-
-**Discrimination**
-- Discriminatory jokes and language
-- Posting or threatening to post others' personally identifying information ("doxing")
-- Advocating for, or encouraging, any of the above behaviour
-- Microaggressions — subtle, often unintentional, discriminatory comments or actions
-
-**Professional Misconduct**
-- Publishing others' private information without explicit permission
-- Misrepresenting affiliation or contributions
-- Plagiarism or claiming credit for others' work
-- Retaliating against anyone who reports a Code of Conduct violation
-- Other conduct which could reasonably be considered inappropriate in a professional setting
-
-### Grey Areas
-
-Some situations require judgement. When uncertain:
-
-- **Intent vs Impact**: Good intentions do not excuse harmful impact. Focus on making things right.
-- **Power Dynamics**: Those with more power (maintainers, employers, experienced contributors) must be especially mindful of their impact.
-- **Cultural Differences**: What's acceptable varies by culture. When in doubt, err on the side of caution and ask.
-- **Humour**: Jokes at others' expense are rarely funny to everyone. Punch up, not down.
-
----
-
-## Scope
-
-This Code of Conduct applies within all community spaces, including:
-
-**Online Spaces**
-- Repository discussions, issues, and pull/merge requests
-- Project chat channels (Matrix, Discord, Slack, IRC)
-- Mailing lists and forums
-- Social media when representing the project
-- Video calls and virtual meetings
-
-**In-Person Spaces**
-- Conferences, meetups, and events
-- Workshops and training sessions
-- Any gathering where you represent the project
-
-**Representation**
-This Code of Conduct also applies when an individual is officially representing the community in public spaces. Examples include:
-
-- Using an official project email address
-- Posting via an official social media account
-- Acting as an appointed representative at an event
-- Speaking on behalf of the project
-
----
-
-## Enforcement
-
-### Reporting
-
-If you experience or witness unacceptable behaviour, or have any other concerns, please report it as soon as possible.
-
-**How to Report**
-
-| Method | Details | Best For |
-|--------|---------|----------|
-| **Email** | j.d.a.jewell@open.ac.uk | Detailed reports, sensitive matters |
-| **Private Message** | Contact any maintainer directly | Quick questions, minor issues |
-| **Anonymous Form** | [Link to form if available] | When you need anonymity |
-
-**What to Include**
-
-- Your contact information (unless anonymous)
-- Names/usernames of those involved
-- Description of what happened
-- When and where it occurred
-- Any witnesses
-- Any supporting evidence (screenshots, links)
-- How you would like us to respond (if you have a preference)
-
-**What Happens Next**
-
-1. You will receive acknowledgment within **72 hours**
-2. The maintainers will review the report
-3. We may ask for additional information
-4. We will determine appropriate action
-5. We will inform you of the outcome (respecting others' privacy)
-
-### Confidentiality
-
-All reports will be handled with discretion:
-
-- Reporter identity is protected by default
-- Details are shared only with those who need to know
-- We will ask before naming you in any communication
-- Anonymous reports are accepted and investigated
-
-### Conflicts of Interest
-
-If a maintainers member is involved in an incident:
-
-- They will recuse themselves from the process
-- Another maintainer or external party will handle the report
-- We will disclose any potential conflicts
-
----
-
-## Enforcement Guidelines
-
-The maintainers will follow these guidelines in determining consequences:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behaviour deemed unprofessional or unwelcome.
-
-**Consequence**: A private, written warning providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate. A public apology may be requested.
-
-**Duration**: Immediate
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series of actions.
-
-**Consequence**: A warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
-
-**Duration**: 1-4 weeks
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including sustained inappropriate behaviour.
-
-**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
-
-**Duration**: 1-6 months
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behaviour, harassment of an individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within the community.
-
-**Duration**: Permanent (with appeal rights after 12 months)
-
-### Enforcement Across Perimeters
-
-For contributors with elevated access (Perimeter 2 or 1):
-
-| Level | Additional Consequence |
-|-------|----------------------|
-| Correction | Noted in contributor record |
-| Warning | Access privileges may be temporarily reduced |
-| Temporary Ban | Access reduced to Perimeter 3 for ban duration |
-| Permanent Ban | All access revoked |
-
----
-
-## Appeals
-
-If you believe an enforcement decision was made in error:
-
-1. **Wait 7 days** after the decision (cooling-off period)
-2. **Email** j.d.a.jewell@open.ac.uk with subject line "Appeal: [Original Report ID]"
-3. **Explain** why you believe the decision should be reconsidered
-4. **Provide** any new information not previously available
-
-**Appeals Process**
-
-- Appeals are reviewed by a different maintainers member than the original
-- You will receive a response within 14 days
-- The appeals decision is final
-- You may only appeal once per incident
-
-**Grounds for Appeal**
-
-- Procedural errors in the original investigation
-- New evidence not previously available
-- Disproportionate response to the violation
-- Misunderstanding of facts
-
----
-
-## Supporting Those Who Report
-
-We are committed to supporting those who report violations:
-
-**We Will**
-- Believe and take all reports seriously
-- Respect your privacy and confidentiality preferences
-- Keep you informed of progress (if you wish)
-- Take steps to protect you from retaliation
-- Provide resources if you need support
-
-**We Will Not**
-- Require you to confront the person directly
-- Dismiss reports without investigation
-- Reveal your identity without consent
-- Tolerate retaliation against reporters
-- Rush you to make decisions
-
----
-
-## Prevention
-
-Beyond enforcement, we actively work to prevent issues:
-
-**Onboarding**
-- All contributors are expected to read this Code of Conduct
-- Perimeter 2 applicants must confirm they've read and understood it
-- Maintainers receive additional training on enforcement
-
-**Culture**
-- We model the behaviour we expect
-- We intervene early when we see potential issues
-- We thank people for positive contributions
-- We create opportunities for diverse voices
-
-**Review**
-- This Code of Conduct is reviewed annually
-- Community feedback is welcomed
-- Changes are communicated clearly
-
----
-
-## Acknowledgments
-
-This Code of Conduct is adapted from:
-
-- [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1
-- [Django Code of Conduct](https://www.djangoproject.com/conduct/)
-- [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
-- [Python Community Code of Conduct](https://www.python.org/psf/conduct/)
-
-We thank these communities for their leadership in creating welcoming spaces.
-
----
-
-## Questions?
-
-If you have questions about this Code of Conduct:
-
-- Open a [Discussion](https://github.com/hyperpolymath/SMTLib.jl/discussions) (for general questions)
-- Email j.d.a.jewell@open.ac.uk (for private questions)
-- Contact any maintainer directly
-
----
-
-## Summary
-
-**Be kind. Be respectful. Be collaborative.**
-
-We're all here because we care about this project. Let's make it a place where everyone can do their best work.
-
----
-
-Last updated: 2026 · Based on Contributor Covenant 2.1
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
new file mode 100644
index 0000000..d00e035
--- /dev/null
+++ b/CONTRIBUTING.adoc
@@ -0,0 +1,108 @@
+== Clone the repository
+
+git clone https://github.com/hyperpolymath/SMTLib.jl.git cd SMTLib.jl
+
+== Using Guix (recommended for reproducibility)
+
+guix develop
+
+== Or using toolbox/distrobox
+
+toolbox create SMTLib.jl-dev toolbox enter SMTLib.jl-dev # Install
+dependencies manually
+
+== Verify setup
+
+just check # or: cargo check / mix compile / etc. just test # Run test
+suite
+
+....
+
+### Repository Structure
+....
+
+SMTLib.jl/ ├── src/ # Source code (Perimeter 1-2) ├── lib/ # Library
+code (Perimeter 1-2) ├── extensions/ # Extensions (Perimeter 2) ├──
+plugins/ # Plugins (Perimeter 2) ├── tools/ # Tooling (Perimeter 2) ├──
+docs/ # Documentation (Perimeter 3) │ ├── architecture/ # ADRs, specs
+(Perimeter 2) │ └── proposals/ # RFCs (Perimeter 3) ├── examples/ #
+Examples (Perimeter 3) ├── spec/ # Spec tests (Perimeter 3) ├── tests/ #
+Test suite (Perimeter 2-3) ├── .well-known/ # Protocol files (Perimeter
+1-3) ├── .github/ # GitHub config (Perimeter 1) │ ├── ISSUE_TEMPLATE/ │
+└── workflows/ ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├──
+CONTRIBUTING.md # This file ├── GOVERNANCE.md ├── LICENSE ├──
+MAINTAINERS.md ├── README.adoc ├── SECURITY.md ├── flake.guix # Guix
+flake (Perimeter 1) └── Justfile # Task runner (Perimeter 1)
+
+....
+
+---
+
+## How to Contribute
+
+### Reporting Bugs
+
+**Before reporting**:
+1. Search existing issues
+2. Check if it's already fixed in `main`
+3. Determine which perimeter the bug affects
+
+**When reporting**:
+
+Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include:
+
+- Clear, descriptive title
+- Environment details (OS, versions, toolchain)
+- Steps to reproduce
+- Expected vs actual behaviour
+- Logs, screenshots, or minimal reproduction
+
+### Suggesting Features
+
+**Before suggesting**:
+1. Check the [roadmap](ROADMAP.md) if available
+2. Search existing issues and discussions
+3. Consider which perimeter the feature belongs to
+
+**When suggesting**:
+
+Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include:
+
+- Problem statement (what pain point does this solve?)
+- Proposed solution
+- Alternatives considered
+- Which perimeter this affects
+
+### Your First Contribution
+
+Look for issues labelled:
+
+- [`good first issue`](https://github.com/hyperpolymath/SMTLib.jl/labels/good%20first%20issue) — Simple Perimeter 3 tasks
+- [`help wanted`](https://github.com/hyperpolymath/SMTLib.jl/labels/help%20wanted) — Community help needed
+- [`documentation`](https://github.com/hyperpolymath/SMTLib.jl/labels/documentation) — Docs improvements
+- [`perimeter-3`](https://github.com/hyperpolymath/SMTLib.jl/labels/perimeter-3) — Community sandbox scope
+
+---
+
+## Development Workflow
+
+### Branch Naming
+....
+
+docs/short-description # Documentation (P3) test/what-added # Test
+additions (P3) feat/short-description # New features (P2)
+fix/issue-number-description # Bug fixes (P2) refactor/what-changed #
+Code improvements (P2) security/what-fixed # Security fixes (P1-2)
+
+....
+
+### Commit Messages
+
+We follow [Conventional Commits](https://www.conventionalcommits.org/):
+....
+
+():
+
+{empty}[optional body]
+
+{empty}[optional footer]
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index f4cadf9..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,120 +0,0 @@
-
-# Clone the repository
-git clone https://github.com/hyperpolymath/SMTLib.jl.git
-cd SMTLib.jl
-
-# Using Nix (recommended for reproducibility)
-nix develop
-
-# Or using toolbox/distrobox
-toolbox create SMTLib.jl-dev
-toolbox enter SMTLib.jl-dev
-# Install dependencies manually
-
-# Verify setup
-just check # or: cargo check / mix compile / etc.
-just test # Run test suite
-```
-
-### Repository Structure
-```
-SMTLib.jl/
-├── src/ # Source code (Perimeter 1-2)
-├── lib/ # Library code (Perimeter 1-2)
-├── extensions/ # Extensions (Perimeter 2)
-├── plugins/ # Plugins (Perimeter 2)
-├── tools/ # Tooling (Perimeter 2)
-├── docs/ # Documentation (Perimeter 3)
-│ ├── architecture/ # ADRs, specs (Perimeter 2)
-│ └── proposals/ # RFCs (Perimeter 3)
-├── examples/ # Examples (Perimeter 3)
-├── spec/ # Spec tests (Perimeter 3)
-├── tests/ # Test suite (Perimeter 2-3)
-├── .well-known/ # Protocol files (Perimeter 1-3)
-├── .github/ # GitHub config (Perimeter 1)
-│ ├── ISSUE_TEMPLATE/
-│ └── workflows/
-├── CHANGELOG.md
-├── CODE_OF_CONDUCT.md
-├── CONTRIBUTING.md # This file
-├── GOVERNANCE.md
-├── LICENSE
-├── MAINTAINERS.md
-├── README.adoc
-├── SECURITY.md
-├── flake.nix # Nix flake (Perimeter 1)
-└── Justfile # Task runner (Perimeter 1)
-```
-
----
-
-## How to Contribute
-
-### Reporting Bugs
-
-**Before reporting**:
-1. Search existing issues
-2. Check if it's already fixed in `main`
-3. Determine which perimeter the bug affects
-
-**When reporting**:
-
-Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include:
-
-- Clear, descriptive title
-- Environment details (OS, versions, toolchain)
-- Steps to reproduce
-- Expected vs actual behaviour
-- Logs, screenshots, or minimal reproduction
-
-### Suggesting Features
-
-**Before suggesting**:
-1. Check the [roadmap](ROADMAP.md) if available
-2. Search existing issues and discussions
-3. Consider which perimeter the feature belongs to
-
-**When suggesting**:
-
-Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include:
-
-- Problem statement (what pain point does this solve?)
-- Proposed solution
-- Alternatives considered
-- Which perimeter this affects
-
-### Your First Contribution
-
-Look for issues labelled:
-
-- [`good first issue`](https://github.com/hyperpolymath/SMTLib.jl/labels/good%20first%20issue) — Simple Perimeter 3 tasks
-- [`help wanted`](https://github.com/hyperpolymath/SMTLib.jl/labels/help%20wanted) — Community help needed
-- [`documentation`](https://github.com/hyperpolymath/SMTLib.jl/labels/documentation) — Docs improvements
-- [`perimeter-3`](https://github.com/hyperpolymath/SMTLib.jl/labels/perimeter-3) — Community sandbox scope
-
----
-
-## Development Workflow
-
-### Branch Naming
-```
-docs/short-description # Documentation (P3)
-test/what-added # Test additions (P3)
-feat/short-description # New features (P2)
-fix/issue-number-description # Bug fixes (P2)
-refactor/what-changed # Code improvements (P2)
-security/what-fixed # Security fixes (P1-2)
-```
-
-### Commit Messages
-
-We follow [Conventional Commits](https://www.conventionalcommits.org/):
-```
-():
-
-[optional body]
-
-[optional footer]
diff --git a/GOVERNANCE.adoc b/GOVERNANCE.adoc
index e41020d..9b836fb 100644
--- a/GOVERNANCE.adoc
+++ b/GOVERNANCE.adoc
@@ -1,162 +1,60 @@
-// SPDX-License-Identifier: CC-BY-SA-4.0
-// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell
-= Governance Model
-:toc: preamble
+== Governance
-This document describes the governance model for this repository.
+=== Overview
-== Overview
+This project is governed by the following principles and structures to
+ensure transparent, inclusive, and effective decision-making.
-This repository follows a **Sole Maintainer Governance Model**:
+=== Roles and Responsibilities
-* Single maintainer (@hyperpolymath) has full authority over the project
-* All contributions are welcome and reviewed by the maintainer
-* Decisions are made transparently through GitHub issues and discussions
-* The project adheres to the hyperpolymath estate policies where applicable
+==== Maintainers
-== Core Principles
+Maintainers are responsible for: - Reviewing and merging pull requests -
+Managing releases and versioning - Ensuring code quality and standards -
+Triaging issues and bug reports - Community engagement and support
-[cols="1,2"]
-|===
-| Principle | Description
+==== Contributors
-| **Benevolent Dictatorship** | Maintainer has final decision authority but seeks community input
+Contributors are expected to: - Follow the code of conduct - Submit
+well-documented pull requests - Write tests for new functionality -
+Maintain existing tests - Update documentation as needed
-| **Meritocracy** | Contributions are judged on technical merit, not contributor identity
+=== Decision Making
-| **Transparency** | All significant decisions are documented publicly
+==== Minor Changes
-| **Consensus-Seeking** | Maintainer prefers consensus but will decide when necessary
+* Can be made by any maintainer
+* Include bug fixes, documentation updates, dependency updates
-| **Open Contribution** | Anyone can contribute via fork and pull request
+==== Major Changes
-|===
+* Require discussion in issues or pull requests
+* Include new features, architectural changes, API changes
+* Need approval from at least 2 maintainers
-== Roles and Permissions
+==== Breaking Changes
-[cols="1,2,2"]
-|===
-| Role | Permissions | Assignment
+* Require RFC (Request for Comments) process
+* Need approval from majority of maintainers
+* Must include migration guide
-| **Maintainer** | Write access, merge rights, admin | @hyperpolymath
-| **Contributors** | Read access, fork, submit PRs | All GitHub users
-| **Users** | Use the software, report issues | All GitHub users
+=== Code of Conduct
-|===
+All participants are expected to follow our Code of Conduct. Violations
+can be reported to the maintainers.
-== Decision Making Framework
+=== Communication
-=== Routine Decisions
+* *Issues*: For bug reports and feature requests
+* *Discussions*: For questions and general discussion
+* *Pull Requests*: For code contributions
-* Bug fixes
-* Documentation improvements
-* Minor feature additions
-* Dependency updates
+=== Licensing
-**Process**: Maintainer reviews and merges PRs that meet quality standards.
+All contributions are made under the terms of the repository’s LICENSE
+file. By submitting a pull request, you agree to license your
+contributions accordingly.
-=== Significant Changes
+'''''
-* New major features
-* API changes
-* Architecture modifications
-* Breaking changes
-
-**Process**:
-. Open issue describing the change
-. Discuss with community (minimum 72 hours)
-. Maintainer makes final decision
-. Document rationale in issue/PR
-
-=== Structural Decisions
-
-* Repository purpose/renaming
-* License changes
-* Ownership transfer
-* Deprecation/archival
-
-**Process**:
-. Extended discussion (minimum 1 week)
-. Maintainer makes final decision
-. Document in CHANGELOG and governance docs
-
-== Contribution Lifecycle
-
-[cols="1,2"]
-|===
-| Stage | Process
-
-| **Ideation** | Open issue, discuss feasibility
-
-| **Development** | Fork, implement, test thoroughly
-
-| **Review** | Submit PR, maintainer reviews within 7 days
-
-| **Merge** | Maintainer merges or requests changes
-
-| **Release** | Maintainer publishes according to project conventions
-
-|===
-
-== Conflict Resolution
-
-In case of disagreements:
-
-. Discuss in the relevant GitHub issue or PR
-. Provide technical justification for positions
-. Maintainer mediates and makes final decision
-. Decision is documented and can be revisited later
-
-== Project Policies
-
-This repository adheres to hyperpolymath estate-wide policies:
-
-* **License**: MPL-2.0 for code, CC-BY-SA-4.0 for prose (per standards/LICENCE-POLICY.adoc)
-* **Code of Conduct**: Follows hyperpolymath CODE_OF_CONDUCT.md
-* **Security**: Follows hyperpolymath SECURITY.md
-* **Contributing**: Follows hyperpolymath CONTRIBUTING.adoc conventions
-
-== Repository-Specific Conventions
-
-[cols="1,2"]
-|===
-| Convention | Description
-
-| **Signing** | All commits must be signed (SSH or GPG)
-
-| **SPDX Headers** | All source files must have SPDX license identifiers
-
-| **Contractiles** | Mustfile, Trustfile, Intendfile, Adjustfile in root
-
-| **Machine Readable** | META.a2ml in .machine_readable/6a2/
-
-| **CI/CD** | GitHub Actions workflows in .github/workflows/
-
-|===
-
-== Governance Evolution
-
-As the project grows, this governance model may evolve:
-
-* **Adding Co-Maintainers**: When contribution volume warrants it
-* **Forming a Team**: For complex multi-maintainer projects
-* **Adopting TPCF**: For large, multi-repository projects (see rhodium-standard-repositories)
-
-Changes to this document require the same process as Significant Changes above.
-
-== See Also
-
-* link:MAINTAINERS.adoc[Maintainers]
-* link:CODE_OF_CONDUCT.md[Code of Conduct]
-* link:CONTRIBUTING.adoc[Contributing Guide]
-* link:https://github.com/hyperpolymath/standards/blob/main/LICENCE-POLICY.adoc[Estate License Policy]
-* link:https://github.com/hyperpolymath/standards[rhodium-standard-repositories (TPCF)]
-
-== Changelog
-
-[cols="1,1,1"]
-|===
-| Date | Change | By
-
-| 2026-06-07 | Initial governance model established | @hyperpolymath
-|===
+_Last updated: 2026-07-18_
diff --git a/GOVERNANCE.md b/GOVERNANCE.md
deleted file mode 100644
index e27364c..0000000
--- a/GOVERNANCE.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Governance
-
-## Overview
-
-This project is governed by the following principles and structures to ensure transparent, inclusive, and effective decision-making.
-
-## Roles and Responsibilities
-
-### Maintainers
-
-Maintainers are responsible for:
-- Reviewing and merging pull requests
-- Managing releases and versioning
-- Ensuring code quality and standards
-- Triaging issues and bug reports
-- Community engagement and support
-
-### Contributors
-
-Contributors are expected to:
-- Follow the code of conduct
-- Submit well-documented pull requests
-- Write tests for new functionality
-- Maintain existing tests
-- Update documentation as needed
-
-## Decision Making
-
-### Minor Changes
-- Can be made by any maintainer
-- Include bug fixes, documentation updates, dependency updates
-
-### Major Changes
-- Require discussion in issues or pull requests
-- Include new features, architectural changes, API changes
-- Need approval from at least 2 maintainers
-
-### Breaking Changes
-- Require RFC (Request for Comments) process
-- Need approval from majority of maintainers
-- Must include migration guide
-
-## Code of Conduct
-
-All participants are expected to follow our Code of Conduct. Violations can be reported to the maintainers.
-
-## Communication
-
-- **Issues**: For bug reports and feature requests
-- **Discussions**: For questions and general discussion
-- **Pull Requests**: For code contributions
-
-## Licensing
-
-All contributions are made under the terms of the repository's LICENSE file.
-By submitting a pull request, you agree to license your contributions accordingly.
-
----
-
-*Last updated: 2026-07-18*
diff --git a/REQUIRES_INITIALISATION.adoc b/REQUIRES_INITIALISATION.adoc
new file mode 100644
index 0000000..88f764c
--- /dev/null
+++ b/REQUIRES_INITIALISATION.adoc
@@ -0,0 +1,56 @@
+== REQUIRES INITIALISATION
+
+*This repository is not finished being set up.* 1 substitution token(s)
+across 1 file(s) still have no value.
+
+=== Why this is not already done
+
+This repo was created from `+hyperpolymath/rsr-template-repo+`. The mint
+(`+just repo-init+`) fills every token that has a single mechanical
+answer — owner, repo, author, dates, licence, branch — and it has done
+so here.
+
+The tokens below are the ones it _deliberately cannot_ answer. They need
+a decision or a fact that exists only in your head: what this project is
+for, what command builds it, which port the service listens on, whether
+a PGP key is held at all. The template’s own token vocabulary says as
+much — you cannot sensibly answer "`required invariants`" in a
+thirty-second bootstrap.
+
+They were left *visibly unfilled on purpose*. The alternatives were both
+worse: inventing plausible values would put confident falsehoods into a
+security policy and an architecture document, and silently deleting the
+sections would hide the fact that a decision is owed. A visible gap is
+honest; a fabricated answer is not.
+
+=== Do not delete this file until every item below is resolved
+
+This file is the only marker that the work is outstanding. Deleting it
+early does not finish the setup, it just conceals it — and the next
+person or agent to arrive will reasonably assume the repo is complete.
+
+* *If you are a person:* delete this file yourself once the last item is
+done.
+* *If you are an agent:* resolve what you legitimately can, leave the
+rest, and delete this file only when no token below remains anywhere in
+the tree. Do not delete it to make a gate go green.
+
+Re-running the estate top-up tool will remove this file automatically
+once nothing is outstanding, so the safest way to finish is to fix the
+tokens and let the check confirm it.
+
+=== What is needed, and where it goes
+
+==== `+{{PROJECT_UNIQUE_STRENGTH}}+`
+
+What this does that its alternatives do not.
+
+Appears in:
+
+* `+.machine_readable/bot_directives/methodology.a2ml+`
+
+'''''
+
+Generated by the estate top-up pass. Rationale and the governing rulings
+are in `+hyperpolymath/standards+`; the token vocabulary is
+`+.machine_readable/ai/PLACEHOLDERS.adoc+` in `+rsr-template-repo+`.
diff --git a/REQUIRES_INITIALISATION.md b/REQUIRES_INITIALISATION.md
deleted file mode 100644
index 9f1a17e..0000000
--- a/REQUIRES_INITIALISATION.md
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-# REQUIRES INITIALISATION
-
-**This repository is not finished being set up.** 1 substitution token(s) across 1 file(s) still have no value.
-
-## Why this is not already done
-
-This repo was created from `hyperpolymath/rsr-template-repo`. The mint
-(`just repo-init`) fills every token that has a single mechanical answer —
-owner, repo, author, dates, licence, branch — and it has done so here.
-
-The tokens below are the ones it *deliberately cannot* answer. They need a
-decision or a fact that exists only in your head: what this project is for,
-what command builds it, which port the service listens on, whether a PGP key
-is held at all. The template's own token vocabulary says as much — you cannot
-sensibly answer "required invariants" in a thirty-second bootstrap.
-
-They were left **visibly unfilled on purpose**. The alternatives were both
-worse: inventing plausible values would put confident falsehoods into a
-security policy and an architecture document, and silently deleting the
-sections would hide the fact that a decision is owed. A visible gap is
-honest; a fabricated answer is not.
-
-## Do not delete this file until every item below is resolved
-
-This file is the only marker that the work is outstanding. Deleting it early
-does not finish the setup, it just conceals it — and the next person or agent
-to arrive will reasonably assume the repo is complete.
-
-- **If you are a person:** delete this file yourself once the last item is done.
-- **If you are an agent:** resolve what you legitimately can, leave the rest,
- and delete this file only when no token below remains anywhere in the tree.
- Do not delete it to make a gate go green.
-
-Re-running the estate top-up tool will remove this file automatically once
-nothing is outstanding, so the safest way to finish is to fix the tokens and
-let the check confirm it.
-
-## What is needed, and where it goes
-
-### `{{PROJECT_UNIQUE_STRENGTH}}`
-
-What this does that its alternatives do not.
-
-Appears in:
-
-- `.machine_readable/bot_directives/methodology.a2ml`
-
----
-
-Generated by the estate top-up pass. Rationale and the governing rulings are
-in `hyperpolymath/standards`; the token vocabulary is
-`.machine_readable/ai/PLACEHOLDERS.adoc` in `rsr-template-repo`.
diff --git a/RSR_OUTLINE.adoc b/RSR_OUTLINE.adoc
index 78bed59..0537aeb 100644
--- a/RSR_OUTLINE.adoc
+++ b/RSR_OUTLINE.adoc
@@ -148,8 +148,8 @@ project/
=== Language Tiers
-* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript
-* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Nix
+* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript
+* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Guix
* **Infrastructure**: Guix channels, derivations
=== Required Files
@@ -163,12 +163,12 @@ project/
* `.well-known/security.txt`
* `.well-known/ai.txt`
* `.well-known/humans.txt`
-* `guix.scm` OR `flake.nix`
+* `guix.scm` OR `flake.guix`
=== Prohibited
* Python outside `salt/` directory
-* TypeScript/JavaScript (use ReScript)
+* TypeScript/JavaScript (use AffineScript)
* CUE (use Guile/Nickel)
* `Dockerfile` (use `Containerfile`)
diff --git a/SECURITY.adoc b/SECURITY.adoc
new file mode 100644
index 0000000..3ca6dfd
--- /dev/null
+++ b/SECURITY.adoc
@@ -0,0 +1,430 @@
+== Security Policy
+
+We take security seriously. We appreciate your efforts to responsibly
+disclose vulnerabilities and will make every effort to acknowledge your
+contributions.
+
+=== Table of Contents
+
+* link:#reporting-a-vulnerability[Reporting a Vulnerability]
+* link:#what-to-include[What to Include]
+* link:#response-timeline[Response Timeline]
+* link:#disclosure-policy[Disclosure Policy]
+* link:#scope[Scope]
+* link:#safe-harbour[Safe Harbour]
+* link:#recognition[Recognition]
+* link:#security-updates[Security Updates]
+* link:#security-best-practices[Security Best Practices]
+
+'''''
+
+=== Reporting a Vulnerability
+
+==== Preferred Method: GitHub Security Advisories
+
+The preferred method for reporting security vulnerabilities is through
+GitHub’s Security Advisory feature:
+
+[arabic]
+. Navigate to
+https://github.com/hyperpolymath/SMTLib.jl/security/advisories/new[Report
+a Vulnerability]
+. Click *"`Report a vulnerability`"*
+. Complete the form with as much detail as possible
+. Submit — we’ll receive a private notification
+
+This method ensures:
+
+* End-to-end encryption of your report
+* Private discussion space for collaboration
+* Coordinated disclosure tooling
+* Automatic credit when the advisory is published
+
+==== Alternative: Encrypted Email
+
+If you cannot use GitHub Security Advisories, you may email us directly:
+
+[cols=",",]
+|===
+|*Email* |j.d.a.jewell@open.ac.uk
+|===
+
+....
+
+> **⚠️ Important:** Do not report security vulnerabilities through public GitHub issues, pull requests, discussions, or social media.
+
+---
+
+## What to Include
+
+A good vulnerability report helps us understand and reproduce the issue quickly.
+
+### Required Information
+
+- **Description**: Clear explanation of the vulnerability
+- **Impact**: What an attacker could achieve (confidentiality, integrity, availability)
+- **Affected versions**: Which versions/commits are affected
+- **Reproduction steps**: Detailed steps to reproduce the issue
+
+### Helpful Additional Information
+
+- **Proof of concept**: Code, scripts, or screenshots demonstrating the vulnerability
+- **Attack scenario**: Realistic attack scenario showing exploitability
+- **CVSS score**: Your assessment of severity (use [CVSS 3.1 Calculator](https://www.first.org/cvss/calculator/3.1))
+- **CWE ID**: Common Weakness Enumeration identifier if known
+- **Suggested fix**: If you have ideas for remediation
+- **References**: Links to related vulnerabilities, research, or advisories
+
+### Example Report Structure
+
+```markdown
+## Summary
+[One-sentence description of the vulnerability]
+
+## Vulnerability Type
+[e.g., SQL Injection, XSS, SSRF, Path Traversal, etc.]
+
+## Affected Component
+[File path, function name, API endpoint, etc.]
+
+## Affected Versions
+[Version range or specific commits]
+
+## Severity Assessment
+- CVSS 3.1 Score: [X.X]
+- CVSS Vector: [CVSS:3.1/AV:X/AC:X/PR:X/UI:X/S:X/C:X/I:X/A:X]
+
+## Description
+[Detailed technical description]
+
+## Steps to Reproduce
+1. [First step]
+2. [Second step]
+3. [...]
+
+## Proof of Concept
+[Code, curl commands, screenshots, etc.]
+
+## Impact
+[What can an attacker achieve?]
+
+## Suggested Remediation
+[Optional: your ideas for fixing]
+
+## References
+[Links to related issues, CVEs, research]
+....
+
+'''''
+
+=== Response Timeline
+
+We commit to the following response times:
+
+[width="100%",cols="24%,35%,41%",options="header",]
+|===
+|Stage |Timeframe |Description
+|*Initial Response* |48 hours |We acknowledge receipt and confirm we’re
+investigating
+
+|*Triage* |7 days |We assess severity, confirm the vulnerability, and
+estimate timeline
+
+|*Status Update* |Every 7 days |Regular updates on remediation progress
+
+|*Resolution* |90 days |Target for fix development and release (complex
+issues may take longer)
+
+|*Disclosure* |90 days |Public disclosure after fix is available
+(coordinated with you)
+|===
+
+____
+*Note:* These are targets, not guarantees. Complex vulnerabilities may
+require more time. We’ll communicate openly about any delays.
+____
+
+'''''
+
+=== Disclosure Policy
+
+We follow *coordinated disclosure* (also known as responsible
+disclosure):
+
+[arabic]
+. *You report* the vulnerability privately
+. *We acknowledge* and begin investigation
+. *We develop* a fix and prepare a release
+. *We coordinate* disclosure timing with you
+. *We publish* security advisory and fix simultaneously
+. *You may publish* your research after disclosure
+
+==== Our Commitments
+
+* We will not take legal action against researchers who follow this
+policy
+* We will work with you to understand and resolve the issue
+* We will credit you in the security advisory (unless you prefer
+anonymity)
+* We will notify you before public disclosure
+* We will publish advisories with sufficient detail for users to assess
+risk
+
+==== Your Commitments
+
+* Report vulnerabilities promptly after discovery
+* Give us reasonable time to address the issue before disclosure
+* Do not access, modify, or delete data beyond what’s necessary to
+demonstrate the vulnerability
+* Do not degrade service availability (no DoS testing on production)
+* Do not share vulnerability details with others until coordinated
+disclosure
+
+==== Disclosure Timeline
+
+....
+Day 0 You report vulnerability
+Day 1-2 We acknowledge receipt
+Day 7 We confirm vulnerability and share initial assessment
+Day 7-90 We develop and test fix
+Day 90 Coordinated public disclosure
+ (earlier if fix is ready; later by mutual agreement)
+....
+
+If we cannot reach agreement on disclosure timing, we default to 90 days
+from your initial report.
+
+'''''
+
+=== Scope
+
+==== In Scope ✅
+
+The following are within scope for security research:
+
+* This repository (`+hyperpolymath/SMTLib.jl+`) and all its code
+* Official releases and packages published from this repository
+* Documentation that could lead to security issues
+* Build and deployment configurations in this repository
+* Dependencies (report here, we’ll coordinate with upstream)
+
+==== Out of Scope ❌
+
+The following are *not* in scope:
+
+* Third-party services we integrate with (report directly to them)
+* Social engineering attacks against maintainers
+* Physical security
+* Denial of service attacks against production infrastructure
+* Spam, phishing, or other non-technical attacks
+* Issues already reported or publicly known
+* Theoretical vulnerabilities without proof of concept
+
+==== Qualifying Vulnerabilities
+
+We’re particularly interested in:
+
+* Remote code execution
+* SQL injection, command injection, code injection
+* Authentication/authorisation bypass
+* Cross-site scripting (XSS) and cross-site request forgery (CSRF)
+* Server-side request forgery (SSRF)
+* Path traversal / local file inclusion
+* Information disclosure (credentials, PII, secrets)
+* Cryptographic weaknesses
+* Deserialisation vulnerabilities
+* Memory safety issues (buffer overflows, use-after-free, etc.)
+* Supply chain vulnerabilities (dependency confusion, etc.)
+* Significant logic flaws
+
+==== Non-Qualifying Issues
+
+The following generally do not qualify as security vulnerabilities:
+
+* Missing security headers on non-sensitive pages
+* Clickjacking on pages without sensitive actions
+* Self-XSS (requires victim to paste code)
+* Missing rate limiting (unless it enables a specific attack)
+* Username/email enumeration (unless high-risk context)
+* Missing cookie flags on non-sensitive cookies
+* Software version disclosure
+* Verbose error messages (unless exposing secrets)
+* Best practice deviations without demonstrable impact
+
+'''''
+
+=== Safe Harbour
+
+We support security research conducted in good faith.
+
+==== Our Promise
+
+If you conduct security research in accordance with this policy:
+
+* ✅ We will not initiate legal action against you
+* ✅ We will not report your activity to law enforcement
+* ✅ We will work with you in good faith to resolve issues
+* ✅ We consider your research authorised under the Computer Fraud and
+Abuse Act (CFAA), UK Computer Misuse Act, and similar laws
+* ✅ We waive any potential claim against you for circumvention of
+security controls
+
+==== Good Faith Requirements
+
+To qualify for safe harbour, you must:
+
+* Comply with this security policy
+* Report vulnerabilities promptly
+* Avoid privacy violations (do not access others’ data)
+* Avoid service degradation (no destructive testing)
+* Not exploit vulnerabilities beyond proof-of-concept
+* Not use vulnerabilities for profit (beyond bug bounties where offered)
+
+____
+*⚠️ Important:* This safe harbour does not extend to third-party
+systems. Always check their policies before testing.
+____
+
+'''''
+
+=== Recognition
+
+We believe in recognising security researchers who help us improve.
+
+==== Hall of Fame
+
+Researchers who report valid vulnerabilities will be acknowledged in our
+link:SECURITY-ACKNOWLEDGMENTS.md[Security Acknowledgments] (unless they
+prefer anonymity).
+
+Recognition includes:
+
+* Your name (or chosen alias)
+* Link to your website/profile (optional)
+* Brief description of the vulnerability class
+* Date of report
+
+==== What We Offer
+
+* ✅ Public credit in security advisories
+* ✅ Acknowledgment in release notes
+* ✅ Entry in our Hall of Fame
+* ✅ Reference/recommendation letter upon request (for significant
+findings)
+
+==== What We Don’t Currently Offer
+
+* ❌ Monetary bug bounties
+* ❌ Hardware or swag
+* ❌ Paid security research contracts
+
+____
+*Note:* We’re a community project with limited resources. Your
+contributions help everyone who uses this software.
+____
+
+'''''
+
+=== Security Updates
+
+==== Receiving Updates
+
+To stay informed about security updates:
+
+* *Watch this repository*: Click "`Watch`" → "`Custom`" → Select
+"`Security alerts`"
+* *GitHub Security Advisories*: Published at
+https://github.com/hyperpolymath/SMTLib.jl/security/advisories[Security
+Advisories]
+* *Release notes*: Security fixes noted in link:CHANGELOG.md[CHANGELOG]
+
+==== Update Policy
+
+[cols=",",options="header",]
+|===
+|Severity |Response
+|*Critical/High* |Patch release as soon as fix is ready
+|*Medium* |Included in next scheduled release (or earlier)
+|*Low* |Included in next scheduled release
+|===
+
+==== Supported Versions
+
+[cols=",,",options="header",]
+|===
+|Version |Supported |Notes
+|`+main+` branch |✅ Yes |Latest development
+|Latest release |✅ Yes |Current stable
+|Previous minor release |✅ Yes |Security fixes backported
+|Older versions |❌ No |Please upgrade
+|===
+
+'''''
+
+=== Security Best Practices
+
+When using SMTLib.jl, we recommend:
+
+==== General
+
+* Keep dependencies up to date
+* Use the latest stable release
+* Subscribe to security notifications
+* Review configuration against security documentation
+* Follow principle of least privilege
+
+==== For Contributors
+
+* Never commit secrets, credentials, or API keys
+* Use signed commits (`+git config commit.gpgsign true+`)
+* Review dependencies before adding them
+* Run security linters locally before pushing
+* Report any concerns about existing code
+
+'''''
+
+=== Additional Resources
+
+* https://github.com/hyperpolymath/SMTLib.jl/security/advisories[Security
+Advisories]
+* link:CHANGELOG.md[Changelog]
+* link:CONTRIBUTING.md[Contributing Guidelines]
+* https://cve.mitre.org/[CVE Database]
+* https://www.first.org/cvss/calculator/3.1[CVSS Calculator]
+
+'''''
+
+=== Contact
+
+[width="100%",cols="50%,50%",options="header",]
+|===
+|Purpose |Contact
+|*Security issues*
+|https://github.com/hyperpolymath/SMTLib.jl/security/advisories/new[Report
+via GitHub] or j.d.a.jewell@open.ac.uk
+
+|*General questions*
+|https://github.com/hyperpolymath/SMTLib.jl/discussions[GitHub
+Discussions]
+
+|*Other enquiries* |See link:README.md[README] for contact information
+|===
+
+'''''
+
+=== Policy Changes
+
+This security policy may be updated from time to time. Significant
+changes will be:
+
+* Committed to this repository with a clear commit message
+* Noted in the changelog
+* Announced via GitHub Discussions (for major changes)
+
+'''''
+
+_Thank you for helping keep SMTLib.jl and its users safe._ 🛡️
+
+'''''
+
+Last updated: 2026 · Policy version: 1.0.0
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index 0447cbf..0000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,380 +0,0 @@
-
-# Security Policy
-
-
-We take security seriously. We appreciate your efforts to responsibly disclose vulnerabilities and will make every effort to acknowledge your contributions.
-
-## Table of Contents
-
-- [Reporting a Vulnerability](#reporting-a-vulnerability)
-- [What to Include](#what-to-include)
-- [Response Timeline](#response-timeline)
-- [Disclosure Policy](#disclosure-policy)
-- [Scope](#scope)
-- [Safe Harbour](#safe-harbour)
-- [Recognition](#recognition)
-- [Security Updates](#security-updates)
-- [Security Best Practices](#security-best-practices)
-
----
-
-## Reporting a Vulnerability
-
-### Preferred Method: GitHub Security Advisories
-
-The preferred method for reporting security vulnerabilities is through GitHub's Security Advisory feature:
-
-1. Navigate to [Report a Vulnerability](https://github.com/hyperpolymath/SMTLib.jl/security/advisories/new)
-2. Click **"Report a vulnerability"**
-3. Complete the form with as much detail as possible
-4. Submit — we'll receive a private notification
-
-This method ensures:
-
-- End-to-end encryption of your report
-- Private discussion space for collaboration
-- Coordinated disclosure tooling
-- Automatic credit when the advisory is published
-
-### Alternative: Encrypted Email
-
-If you cannot use GitHub Security Advisories, you may email us directly:
-
-| | |
-|---|---|
-| **Email** | j.d.a.jewell@open.ac.uk |
-```
-
-> **⚠️ Important:** Do not report security vulnerabilities through public GitHub issues, pull requests, discussions, or social media.
-
----
-
-## What to Include
-
-A good vulnerability report helps us understand and reproduce the issue quickly.
-
-### Required Information
-
-- **Description**: Clear explanation of the vulnerability
-- **Impact**: What an attacker could achieve (confidentiality, integrity, availability)
-- **Affected versions**: Which versions/commits are affected
-- **Reproduction steps**: Detailed steps to reproduce the issue
-
-### Helpful Additional Information
-
-- **Proof of concept**: Code, scripts, or screenshots demonstrating the vulnerability
-- **Attack scenario**: Realistic attack scenario showing exploitability
-- **CVSS score**: Your assessment of severity (use [CVSS 3.1 Calculator](https://www.first.org/cvss/calculator/3.1))
-- **CWE ID**: Common Weakness Enumeration identifier if known
-- **Suggested fix**: If you have ideas for remediation
-- **References**: Links to related vulnerabilities, research, or advisories
-
-### Example Report Structure
-
-```markdown
-## Summary
-[One-sentence description of the vulnerability]
-
-## Vulnerability Type
-[e.g., SQL Injection, XSS, SSRF, Path Traversal, etc.]
-
-## Affected Component
-[File path, function name, API endpoint, etc.]
-
-## Affected Versions
-[Version range or specific commits]
-
-## Severity Assessment
-- CVSS 3.1 Score: [X.X]
-- CVSS Vector: [CVSS:3.1/AV:X/AC:X/PR:X/UI:X/S:X/C:X/I:X/A:X]
-
-## Description
-[Detailed technical description]
-
-## Steps to Reproduce
-1. [First step]
-2. [Second step]
-3. [...]
-
-## Proof of Concept
-[Code, curl commands, screenshots, etc.]
-
-## Impact
-[What can an attacker achieve?]
-
-## Suggested Remediation
-[Optional: your ideas for fixing]
-
-## References
-[Links to related issues, CVEs, research]
-```
-
----
-
-## Response Timeline
-
-We commit to the following response times:
-
-| Stage | Timeframe | Description |
-|-------|-----------|-------------|
-| **Initial Response** | 48 hours | We acknowledge receipt and confirm we're investigating |
-| **Triage** | 7 days | We assess severity, confirm the vulnerability, and estimate timeline |
-| **Status Update** | Every 7 days | Regular updates on remediation progress |
-| **Resolution** | 90 days | Target for fix development and release (complex issues may take longer) |
-| **Disclosure** | 90 days | Public disclosure after fix is available (coordinated with you) |
-
-> **Note:** These are targets, not guarantees. Complex vulnerabilities may require more time. We'll communicate openly about any delays.
-
----
-
-## Disclosure Policy
-
-We follow **coordinated disclosure** (also known as responsible disclosure):
-
-1. **You report** the vulnerability privately
-2. **We acknowledge** and begin investigation
-3. **We develop** a fix and prepare a release
-4. **We coordinate** disclosure timing with you
-5. **We publish** security advisory and fix simultaneously
-6. **You may publish** your research after disclosure
-
-### Our Commitments
-
-- We will not take legal action against researchers who follow this policy
-- We will work with you to understand and resolve the issue
-- We will credit you in the security advisory (unless you prefer anonymity)
-- We will notify you before public disclosure
-- We will publish advisories with sufficient detail for users to assess risk
-
-### Your Commitments
-
-- Report vulnerabilities promptly after discovery
-- Give us reasonable time to address the issue before disclosure
-- Do not access, modify, or delete data beyond what's necessary to demonstrate the vulnerability
-- Do not degrade service availability (no DoS testing on production)
-- Do not share vulnerability details with others until coordinated disclosure
-
-### Disclosure Timeline
-
-```
-Day 0 You report vulnerability
-Day 1-2 We acknowledge receipt
-Day 7 We confirm vulnerability and share initial assessment
-Day 7-90 We develop and test fix
-Day 90 Coordinated public disclosure
- (earlier if fix is ready; later by mutual agreement)
-```
-
-If we cannot reach agreement on disclosure timing, we default to 90 days from your initial report.
-
----
-
-## Scope
-
-### In Scope ✅
-
-The following are within scope for security research:
-
-- This repository (`hyperpolymath/SMTLib.jl`) and all its code
-- Official releases and packages published from this repository
-- Documentation that could lead to security issues
-- Build and deployment configurations in this repository
-- Dependencies (report here, we'll coordinate with upstream)
-
-### Out of Scope ❌
-
-The following are **not** in scope:
-
-- Third-party services we integrate with (report directly to them)
-- Social engineering attacks against maintainers
-- Physical security
-- Denial of service attacks against production infrastructure
-- Spam, phishing, or other non-technical attacks
-- Issues already reported or publicly known
-- Theoretical vulnerabilities without proof of concept
-
-### Qualifying Vulnerabilities
-
-We're particularly interested in:
-
-- Remote code execution
-- SQL injection, command injection, code injection
-- Authentication/authorisation bypass
-- Cross-site scripting (XSS) and cross-site request forgery (CSRF)
-- Server-side request forgery (SSRF)
-- Path traversal / local file inclusion
-- Information disclosure (credentials, PII, secrets)
-- Cryptographic weaknesses
-- Deserialisation vulnerabilities
-- Memory safety issues (buffer overflows, use-after-free, etc.)
-- Supply chain vulnerabilities (dependency confusion, etc.)
-- Significant logic flaws
-
-### Non-Qualifying Issues
-
-The following generally do not qualify as security vulnerabilities:
-
-- Missing security headers on non-sensitive pages
-- Clickjacking on pages without sensitive actions
-- Self-XSS (requires victim to paste code)
-- Missing rate limiting (unless it enables a specific attack)
-- Username/email enumeration (unless high-risk context)
-- Missing cookie flags on non-sensitive cookies
-- Software version disclosure
-- Verbose error messages (unless exposing secrets)
-- Best practice deviations without demonstrable impact
-
----
-
-## Safe Harbour
-
-We support security research conducted in good faith.
-
-### Our Promise
-
-If you conduct security research in accordance with this policy:
-
-- ✅ We will not initiate legal action against you
-- ✅ We will not report your activity to law enforcement
-- ✅ We will work with you in good faith to resolve issues
-- ✅ We consider your research authorised under the Computer Fraud and Abuse Act (CFAA), UK Computer Misuse Act, and similar laws
-- ✅ We waive any potential claim against you for circumvention of security controls
-
-### Good Faith Requirements
-
-To qualify for safe harbour, you must:
-
-- Comply with this security policy
-- Report vulnerabilities promptly
-- Avoid privacy violations (do not access others' data)
-- Avoid service degradation (no destructive testing)
-- Not exploit vulnerabilities beyond proof-of-concept
-- Not use vulnerabilities for profit (beyond bug bounties where offered)
-
-> **⚠️ Important:** This safe harbour does not extend to third-party systems. Always check their policies before testing.
-
----
-
-## Recognition
-
-We believe in recognising security researchers who help us improve.
-
-### Hall of Fame
-
-Researchers who report valid vulnerabilities will be acknowledged in our [Security Acknowledgments](SECURITY-ACKNOWLEDGMENTS.md) (unless they prefer anonymity).
-
-Recognition includes:
-
-- Your name (or chosen alias)
-- Link to your website/profile (optional)
-- Brief description of the vulnerability class
-- Date of report
-
-### What We Offer
-
-- ✅ Public credit in security advisories
-- ✅ Acknowledgment in release notes
-- ✅ Entry in our Hall of Fame
-- ✅ Reference/recommendation letter upon request (for significant findings)
-
-### What We Don't Currently Offer
-
-- ❌ Monetary bug bounties
-- ❌ Hardware or swag
-- ❌ Paid security research contracts
-
-> **Note:** We're a community project with limited resources. Your contributions help everyone who uses this software.
-
----
-
-## Security Updates
-
-### Receiving Updates
-
-To stay informed about security updates:
-
-- **Watch this repository**: Click "Watch" → "Custom" → Select "Security alerts"
-- **GitHub Security Advisories**: Published at [Security Advisories](https://github.com/hyperpolymath/SMTLib.jl/security/advisories)
-- **Release notes**: Security fixes noted in [CHANGELOG](CHANGELOG.md)
-
-### Update Policy
-
-| Severity | Response |
-|----------|----------|
-| **Critical/High** | Patch release as soon as fix is ready |
-| **Medium** | Included in next scheduled release (or earlier) |
-| **Low** | Included in next scheduled release |
-
-### Supported Versions
-
-
-
-| Version | Supported | Notes |
-|---------|-----------|-------|
-| `main` branch | ✅ Yes | Latest development |
-| Latest release | ✅ Yes | Current stable |
-| Previous minor release | ✅ Yes | Security fixes backported |
-| Older versions | ❌ No | Please upgrade |
-
----
-
-## Security Best Practices
-
-When using SMTLib.jl, we recommend:
-
-### General
-
-- Keep dependencies up to date
-- Use the latest stable release
-- Subscribe to security notifications
-- Review configuration against security documentation
-- Follow principle of least privilege
-
-### For Contributors
-
-- Never commit secrets, credentials, or API keys
-- Use signed commits (`git config commit.gpgsign true`)
-- Review dependencies before adding them
-- Run security linters locally before pushing
-- Report any concerns about existing code
-
----
-
-## Additional Resources
-
-- [Security Advisories](https://github.com/hyperpolymath/SMTLib.jl/security/advisories)
-- [Changelog](CHANGELOG.md)
-- [Contributing Guidelines](CONTRIBUTING.md)
-- [CVE Database](https://cve.mitre.org/)
-- [CVSS Calculator](https://www.first.org/cvss/calculator/3.1)
-
----
-
-## Contact
-
-| Purpose | Contact |
-|---------|---------|
-| **Security issues** | [Report via GitHub](https://github.com/hyperpolymath/SMTLib.jl/security/advisories/new) or j.d.a.jewell@open.ac.uk |
-| **General questions** | [GitHub Discussions](https://github.com/hyperpolymath/SMTLib.jl/discussions) |
-| **Other enquiries** | See [README](README.md) for contact information |
-
----
-
-## Policy Changes
-
-This security policy may be updated from time to time. Significant changes will be:
-
-- Committed to this repository with a clear commit message
-- Noted in the changelog
-- Announced via GitHub Discussions (for major changes)
-
----
-
-*Thank you for helping keep SMTLib.jl and its users safe.* 🛡️
-
----
-
-Last updated: 2026 · Policy version: 1.0.0
diff --git a/TEST-NEEDS.adoc b/TEST-NEEDS.adoc
new file mode 100644
index 0000000..637d825
--- /dev/null
+++ b/TEST-NEEDS.adoc
@@ -0,0 +1,56 @@
+== TEST-NEEDS: SMTLib.jl
+
+=== CRG Grade: C — ACHIEVED 2026-04-04
+
+=== Current State
+
+[cols=",,",options="header",]
+|===
+|Category |Count |Details
+|*Source modules* |12 |3,586 lines
+|*Test files* |1 |1,578 lines, 650 @test/@testset
+|*Benchmarks* |0 |None
+|*E2E tests* |0 |None
+|===
+
+=== What’s Missing
+
+==== E2E Tests
+
+* [ ] No test running SMTLib against actual SMT solvers (Z3, CVC5)
+* [ ] No roundtrip test (generate SMTLib2 -> parse back)
+
+==== Aspect Tests
+
+* [ ] *Performance*: SMT solving is performance-critical, 0 benchmarks
+* [ ] *Error handling*: No tests for unsatisfiable formulas, timeout,
+solver crashes
+* [ ] *Concurrency*: No parallel solving tests
+
+==== Benchmarks Needed (CRITICAL)
+
+* [ ] Formula generation throughput
+* [ ] Solver invocation latency
+* [ ] Scaling with formula complexity
+
+==== Self-Tests
+
+* [ ] No solver availability self-check
+
+=== FLAGGED ISSUES
+
+* *650 tests is excellent* – second highest test count
+* *Single test file for 12 modules* – should be split
+* *0 benchmarks for performance-critical SMT library* – major gap
+* *No solver integration tests* – generates SMTLib2 but never verifies
+it works
+
+=== Priority: P2 (MEDIUM) – strong unit tests, needs benchmarks and solver E2E
+
+=== FAKE-FUZZ ALERT
+
+* `+tests/fuzz/placeholder.txt+` is a scorecard placeholder inherited
+from rsr-template-repo — it does NOT provide real fuzz testing
+* Replace with an actual fuzz harness (see
+rsr-template-repo/tests/fuzz/README.adoc) or remove the file
+* Priority: P2 — creates false impression of fuzz coverage
diff --git a/TEST-NEEDS.md b/TEST-NEEDS.md
deleted file mode 100644
index 5f82616..0000000
--- a/TEST-NEEDS.md
+++ /dev/null
@@ -1,49 +0,0 @@
-
-# TEST-NEEDS: SMTLib.jl
-
-## CRG Grade: C — ACHIEVED 2026-04-04
-
-## Current State
-
-| Category | Count | Details |
-|----------|-------|---------|
-| **Source modules** | 12 | 3,586 lines |
-| **Test files** | 1 | 1,578 lines, 650 @test/@testset |
-| **Benchmarks** | 0 | None |
-| **E2E tests** | 0 | None |
-
-## What's Missing
-
-### E2E Tests
-- [ ] No test running SMTLib against actual SMT solvers (Z3, CVC5)
-- [ ] No roundtrip test (generate SMTLib2 -> parse back)
-
-### Aspect Tests
-- [ ] **Performance**: SMT solving is performance-critical, 0 benchmarks
-- [ ] **Error handling**: No tests for unsatisfiable formulas, timeout, solver crashes
-- [ ] **Concurrency**: No parallel solving tests
-
-### Benchmarks Needed (CRITICAL)
-- [ ] Formula generation throughput
-- [ ] Solver invocation latency
-- [ ] Scaling with formula complexity
-
-### Self-Tests
-- [ ] No solver availability self-check
-
-## FLAGGED ISSUES
-- **650 tests is excellent** -- second highest test count
-- **Single test file for 12 modules** -- should be split
-- **0 benchmarks for performance-critical SMT library** -- major gap
-- **No solver integration tests** -- generates SMTLib2 but never verifies it works
-
-## Priority: P2 (MEDIUM) -- strong unit tests, needs benchmarks and solver E2E
-
-## FAKE-FUZZ ALERT
-
-- `tests/fuzz/placeholder.txt` is a scorecard placeholder inherited from rsr-template-repo — it does NOT provide real fuzz testing
-- Replace with an actual fuzz harness (see rsr-template-repo/tests/fuzz/README.adoc) or remove the file
-- Priority: P2 — creates false impression of fuzz coverage
diff --git a/TOPOLOGY.md b/TOPOLOGY.adoc
similarity index 90%
rename from TOPOLOGY.md
rename to TOPOLOGY.adoc
index c03ebd7..60c9a6e 100644
--- a/TOPOLOGY.md
+++ b/TOPOLOGY.adoc
@@ -1,15 +1,8 @@
-
-
-
+== SMTLib.jl — Project Topology
-# SMTLib.jl — Project Topology
+=== System Architecture
-## System Architecture
-
-```
+....
┌─────────────────────────────────────────┐
│ EXTERNALS / ECOSYSTEM │
├─────────────────────────────────────────┤
@@ -56,11 +49,11 @@ Copyright (c) Jonathan D.A. Jewell
│ .github/workflows/ (RSR Gate) │
│ scripts/ (readiness) │
└─────────────────────────────────────────┘
-```
+....
-## Completion Dashboard
+=== Completion Dashboard
-```
+....
COMPONENT STATUS NOTES
───────────────────────────────── ────────────────── ─────────────────────────────────
CORE LOGIC
@@ -82,24 +75,25 @@ REPO INFRASTRUCTURE
─────────────────────────────────────────────────────────────────────────────
OVERALL: █████████░ ~93% Stable, near production
-```
+....
-## Key Dependencies
+=== Key Dependencies
-```
+....
Solver Discovery ──────► Context Management ──────► Expr Generation
│
Parser (from_smtlib) ◀───── Result Handling ◀──────────┘
-```
+....
-## Update Protocol
+=== Update Protocol
This file is maintained by both humans and AI agents. When updating:
-1. **After completing a component**: Change its bar and percentage
-2. **After adding a component**: Add a new row in the appropriate section
-3. **After architectural changes**: Update the ASCII diagram
-4. **Date**: Update the `Last updated` comment at the top of this file
+[arabic]
+. *After completing a component*: Change its bar and percentage
+. *After adding a component*: Add a new row in the appropriate section
+. *After architectural changes*: Update the ASCII diagram
+. *Date*: Update the `+Last updated+` comment at the top of this file
-Progress bars use: `█` (filled) and `░` (empty), 10 characters wide.
-Percentages: 0%, 10%, 20%, ... 100% (in 10% increments).
+Progress bars use: `+█+` (filled) and `+░+` (empty), 10 characters wide.
+Percentages: 0%, 10%, 20%, … 100% (in 10% increments).
diff --git a/docs/src/api.md b/docs/src/api.adoc
similarity index 50%
rename from docs/src/api.md
rename to docs/src/api.adoc
index bcef236..76c88ae 100644
--- a/docs/src/api.md
+++ b/docs/src/api.adoc
@@ -1,57 +1,60 @@
-
-# API Reference
+== API Reference
-## Types
+=== Types
-```@docs
+[source,@docs]
+----
SMTLib.SMTSolver
SMTLib.SMTResult
SMTLib.SMTContext
-```
+----
-## Solver Discovery
+=== Solver Discovery
-```@docs
+[source,@docs]
+----
SMTLib.available_solvers
SMTLib.find_solver
-```
+----
-## Context Management
+=== Context Management
-```@docs
+[source,@docs]
+----
SMTLib.SMTContext
SMTLib.declare
SMTLib.assert!
SMTLib.check_sat
SMTLib.get_model
SMTLib.reset!
-```
+----
-## Incremental Solving
+=== Incremental Solving
-```@docs
+[source,@docs]
+----
Base.push!(::SMTLib.SMTContext)
Base.pop!(::SMTLib.SMTContext)
-```
+----
-## Conversion
+=== Conversion
-```@docs
+[source,@docs]
+----
SMTLib.to_smtlib
SMTLib.from_smtlib
-```
+----
-## Macros
+=== Macros
-```@docs
+[source,@docs]
+----
SMTLib.@smt
-```
+----
-## Constants
+=== Constants
-```@docs
+[source,@docs]
+----
SMTLib.LOGICS
-```
+----
diff --git a/docs/src/examples.md b/docs/src/examples.adoc
similarity index 83%
rename from docs/src/examples.md
rename to docs/src/examples.adoc
index e145725..545ff7e 100644
--- a/docs/src/examples.md
+++ b/docs/src/examples.adoc
@@ -1,12 +1,9 @@
-
-# Examples
+== Examples
-## Basic Constraint Solving
+=== Basic Constraint Solving
-```julia
+[source,julia]
+----
using SMTLib
# Linear integer arithmetic
@@ -19,11 +16,12 @@ assert!(ctx, :(y >= 0))
result = check_sat(ctx)
@show result.model # Dict(:x => 4, :y => 3) or similar
-```
+----
-## Incremental Solving
+=== Incremental Solving
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_LIA)
declare(ctx, :x, Int)
assert!(ctx, :(x > 5))
@@ -39,11 +37,12 @@ result2 = check_sat(ctx) # unsat
# Backtrack
pop!(ctx)
result3 = check_sat(ctx) # sat again
-```
+----
-## Bitvector Constraints
+=== Bitvector Constraints
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_BV)
declare(ctx, :a, BitVec{8})
declare(ctx, :b, BitVec{8})
@@ -53,11 +52,12 @@ assert!(ctx, :(bvadd(a, b) == 0xFF))
assert!(ctx, :(bvand(a, b) == 0x00))
result = check_sat(ctx)
-```
+----
-## Real Arithmetic
+=== Real Arithmetic
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_LRA)
declare(ctx, :x, Real)
declare(ctx, :y, Real)
@@ -67,11 +67,12 @@ assert!(ctx, :(x - y < 2.0))
assert!(ctx, :(x > 0))
result = check_sat(ctx)
-```
+----
-## Array Theory
+=== Array Theory
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_AUFLIA)
declare(ctx, :arr, Array{Int,Int})
declare(ctx, :i, Int)
@@ -83,11 +84,12 @@ assert!(ctx, :(select(store(arr, j, 100), j) == 100))
assert!(ctx, :(i != j))
result = check_sat(ctx)
-```
+----
-## Unsat Core
+=== Unsat Core
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_LIA)
declare(ctx, :x, Int)
@@ -98,11 +100,12 @@ assert!(ctx, :(x >= 0), name=:c3)
result = check_sat(ctx, unsat_core=true)
@show result.unsat_core # [:c1, :c2] - conflicting constraints
-```
+----
-## Timeout Handling
+=== Timeout Handling
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_NRA, timeout=5000) # 5 second timeout
declare(ctx, :x, Real)
assert!(ctx, :(x^5 + x^3 + x == 42)) # Hard nonlinear constraint
@@ -111,11 +114,12 @@ result = check_sat(ctx)
if result.status == :timeout
println("Solver timed out")
end
-```
+----
-## Using the @smt Macro
+=== Using the @smt Macro
-```julia
+[source,julia]
+----
# Convenient syntax for simple queries
result = @smt begin
x::Int
@@ -129,11 +133,12 @@ if result.status == :sat
println("x = ", result.model[:x])
println("y = ", result.model[:y])
end
-```
+----
-## Multiple Solvers
+=== Multiple Solvers
-```julia
+[source,julia]
+----
# Find all available solvers
solvers = available_solvers()
for solver in solvers
@@ -143,11 +148,12 @@ end
# Use a specific solver
z3 = find_solver(:z3)
ctx = SMTContext(solver=z3, logic=:QF_LIA)
-```
+----
-## Complex Constraints
+=== Complex Constraints
-```julia
+[source,julia]
+----
ctx = SMTContext(logic=:QF_NIA)
declare(ctx, :x, Int)
declare(ctx, :y, Int)
@@ -162,4 +168,4 @@ result = check_sat(ctx)
if result.status == :sat
@show result.model
end
-```
+----
diff --git a/docs/src/index.adoc b/docs/src/index.adoc
new file mode 100644
index 0000000..a353cac
--- /dev/null
+++ b/docs/src/index.adoc
@@ -0,0 +1,106 @@
+== SMTLib.jl
+
+A lightweight Julia interface to SMT solvers via SMT-LIB2 format.
+
+=== Features
+
+* *Auto-detection* of installed SMT solvers (Z3, CVC5, Yices, MathSAT)
+* *Julia expression to SMT-LIB2* conversion
+* *Multiple logics*: QF_LIA, QF_LRA, QF_NRA, QF_BV, arrays, and more
+* *Model parsing* and counterexample extraction
+* *Timeout support*
+* *Incremental solving* with push/pop semantics
+* *Zero dependencies* - pure Julia
+
+=== Quick Start
+
+[source,julia]
+----
+using SMTLib
+
+# Create an SMT context
+ctx = SMTContext(logic=:QF_LIA)
+
+# Declare variables
+declare(ctx, :x, Int)
+declare(ctx, :y, Int)
+
+# Add constraints
+assert!(ctx, :(x + y == 10))
+assert!(ctx, :(x > 0))
+assert!(ctx, :(y > 0))
+
+# Check satisfiability
+result = check_sat(ctx)
+
+if result.status == :sat
+ println("Solution found:")
+ println("x = ", result.model[:x])
+ println("y = ", result.model[:y])
+end
+----
+
+=== Installation
+
+[source,julia]
+----
+using Pkg
+Pkg.add(url="https://github.com/hyperpolymath/SMTLib.jl")
+----
+
+==== Prerequisites
+
+Install at least one SMT solver:
+
+[source,bash]
+----
+# Z3 (recommended)
+brew install z3 # macOS
+apt install z3 # Ubuntu/Debian
+pacman -S z3 # Arch
+
+# CVC5
+brew install cvc5 # macOS
+apt install cvc5 # Ubuntu/Debian
+----
+
+=== What is SMT?
+
+*Satisfiability Modulo Theories (SMT)* extends boolean satisfiability
+(SAT) with theories like arithmetic, arrays, and bitvectors. SMT solvers
+are used for:
+
+* *Formal verification* - proving program correctness
+* *Symbolic execution* - exploring execution paths
+* *Constraint solving* - finding solutions to complex constraints
+* *Test generation* - generating inputs that trigger bugs
+* *Program synthesis* - generating programs from specifications
+
+=== Supported Solvers
+
+* *Z3* (Microsoft Research) - Most feature-complete
+* *CVC5* - Strong theory support
+* *Yices* - Fast for linear arithmetic
+* *MathSAT* - Good for optimization
+
+=== Supported Logics
+
+[width="100%",cols="35%,65%",options="header",]
+|===
+|Logic |Description
+|QF_LIA |Quantifier-free linear integer arithmetic
+|QF_LRA |Quantifier-free linear real arithmetic
+|QF_NIA |Quantifier-free nonlinear integer arithmetic
+|QF_NRA |Quantifier-free nonlinear real arithmetic
+|QF_BV |Quantifier-free bitvectors
+|QF_AUFLIA |Arrays, uninterpreted functions, linear integer arithmetic
+|LIA |Linear integer arithmetic with quantifiers
+|LRA |Linear real arithmetic with quantifiers
+|AUFLIRA |Arrays, uninterpreted functions, linear arithmetic
+|ALL |All supported theories
+|===
+
+=== License
+
+SMTLib.jl is licensed under the
+https://github.com/hyperpolymath/palimpsest-license[MPL-2.0] license.
diff --git a/docs/src/index.md b/docs/src/index.md
deleted file mode 100644
index b976e99..0000000
--- a/docs/src/index.md
+++ /dev/null
@@ -1,102 +0,0 @@
-
-# SMTLib.jl
-
-A lightweight Julia interface to SMT solvers via SMT-LIB2 format.
-
-## Features
-
-- **Auto-detection** of installed SMT solvers (Z3, CVC5, Yices, MathSAT)
-- **Julia expression to SMT-LIB2** conversion
-- **Multiple logics**: QF_LIA, QF_LRA, QF_NRA, QF_BV, arrays, and more
-- **Model parsing** and counterexample extraction
-- **Timeout support**
-- **Incremental solving** with push/pop semantics
-- **Zero dependencies** - pure Julia
-
-## Quick Start
-
-```julia
-using SMTLib
-
-# Create an SMT context
-ctx = SMTContext(logic=:QF_LIA)
-
-# Declare variables
-declare(ctx, :x, Int)
-declare(ctx, :y, Int)
-
-# Add constraints
-assert!(ctx, :(x + y == 10))
-assert!(ctx, :(x > 0))
-assert!(ctx, :(y > 0))
-
-# Check satisfiability
-result = check_sat(ctx)
-
-if result.status == :sat
- println("Solution found:")
- println("x = ", result.model[:x])
- println("y = ", result.model[:y])
-end
-```
-
-## Installation
-
-```julia
-using Pkg
-Pkg.add(url="https://github.com/hyperpolymath/SMTLib.jl")
-```
-
-### Prerequisites
-
-Install at least one SMT solver:
-
-```bash
-# Z3 (recommended)
-brew install z3 # macOS
-apt install z3 # Ubuntu/Debian
-pacman -S z3 # Arch
-
-# CVC5
-brew install cvc5 # macOS
-apt install cvc5 # Ubuntu/Debian
-```
-
-## What is SMT?
-
-**Satisfiability Modulo Theories (SMT)** extends boolean satisfiability (SAT) with theories like arithmetic, arrays, and bitvectors. SMT solvers are used for:
-
-- **Formal verification** - proving program correctness
-- **Symbolic execution** - exploring execution paths
-- **Constraint solving** - finding solutions to complex constraints
-- **Test generation** - generating inputs that trigger bugs
-- **Program synthesis** - generating programs from specifications
-
-## Supported Solvers
-
-- **Z3** (Microsoft Research) - Most feature-complete
-- **CVC5** - Strong theory support
-- **Yices** - Fast for linear arithmetic
-- **MathSAT** - Good for optimization
-
-## Supported Logics
-
-| Logic | Description |
-|-------|-------------|
-| QF_LIA | Quantifier-free linear integer arithmetic |
-| QF_LRA | Quantifier-free linear real arithmetic |
-| QF_NIA | Quantifier-free nonlinear integer arithmetic |
-| QF_NRA | Quantifier-free nonlinear real arithmetic |
-| QF_BV | Quantifier-free bitvectors |
-| QF_AUFLIA | Arrays, uninterpreted functions, linear integer arithmetic |
-| LIA | Linear integer arithmetic with quantifiers |
-| LRA | Linear real arithmetic with quantifiers |
-| AUFLIRA | Arrays, uninterpreted functions, linear arithmetic |
-| ALL | All supported theories |
-
-## License
-
-SMTLib.jl is licensed under the [MPL-2.0](https://github.com/hyperpolymath/palimpsest-license) license.
diff --git a/docs/src/solvers.md b/docs/src/solvers.adoc
similarity index 50%
rename from docs/src/solvers.md
rename to docs/src/solvers.adoc
index 66bb812..88e1040 100644
--- a/docs/src/solvers.md
+++ b/docs/src/solvers.adoc
@@ -1,26 +1,22 @@
-
-# Solver Support
+== Solver Support
-SMTLib.jl auto-detects installed SMT solvers and provides a unified interface.
+SMTLib.jl auto-detects installed SMT solvers and provides a unified
+interface.
-## Supported Solvers
+=== Supported Solvers
-### Z3 (Recommended)
+==== Z3 (Recommended)
-**Developer:** Microsoft Research
-**Website:** https://github.com/Z3Prover/z3
+*Developer:* Microsoft Research *Website:*
+https://github.com/Z3Prover/z3
-**Strengths:**
-- Most comprehensive theory support
-- Excellent documentation
-- Active development
-- Good performance across all logics
+*Strengths:* - Most comprehensive theory support - Excellent
+documentation - Active development - Good performance across all logics
-**Installation:**
-```bash
+*Installation:*
+
+[source,bash]
+----
# macOS
brew install z3
@@ -33,20 +29,20 @@ pacman -S z3
# From source
git clone https://github.com/Z3Prover/z3
cd z3 && python scripts/mk_make.py && cd build && make
-```
+----
+
+==== CVC5
-### CVC5
+*Developer:* Stanford, University of Iowa, others *Website:*
+https://cvc5.github.io/
-**Developer:** Stanford, University of Iowa, others
-**Website:** https://cvc5.github.io/
+*Strengths:* - Strong theory combinations - Good for arrays and
+datatypes - Formal verification focus
-**Strengths:**
-- Strong theory combinations
-- Good for arrays and datatypes
-- Formal verification focus
+*Installation:*
-**Installation:**
-```bash
+[source,bash]
+----
# macOS
brew install cvc5
@@ -57,20 +53,19 @@ apt install cvc5
wget https://github.com/cvc5/cvc5/releases/latest/download/cvc5-Linux
chmod +x cvc5-Linux
sudo mv cvc5-Linux /usr/local/bin/cvc5
-```
+----
-### Yices 2
+==== Yices 2
-**Developer:** SRI International
-**Website:** https://yices.csl.sri.com/
+*Developer:* SRI International *Website:* https://yices.csl.sri.com/
-**Strengths:**
-- Very fast for linear arithmetic
-- Low memory footprint
-- Good for embedded/resource-constrained use
+*Strengths:* - Very fast for linear arithmetic - Low memory footprint -
+Good for embedded/resource-constrained use
-**Installation:**
-```bash
+*Installation:*
+
+[source,bash]
+----
# macOS
brew install yices
@@ -81,31 +76,32 @@ apt install yices2
wget https://yices.csl.sri.com/releases/2.6.4/yices-2.6.4-x86_64-pc-linux-gnu.tar.gz
tar xzf yices-2.6.4-x86_64-pc-linux-gnu.tar.gz
sudo cp yices-2.6.4/bin/yices-smt2 /usr/local/bin/
-```
+----
+
+==== MathSAT
-### MathSAT
+*Developer:* FBK and University of Trento *Website:*
+https://mathsat.fbk.eu/
-**Developer:** FBK and University of Trento
-**Website:** https://mathsat.fbk.eu/
+*Strengths:* - Optimization (MaxSMT) - Interpolation - UNSAT core
+generation
-**Strengths:**
-- Optimization (MaxSMT)
-- Interpolation
-- UNSAT core generation
+*Installation:*
-**Installation:**
-```bash
+[source,bash]
+----
# Download from website (requires registration for academic use)
wget https://mathsat.fbk.eu/download.php?file=mathsat-5.6.10-linux-x86_64.tar.gz
tar xzf mathsat-5.6.10-linux-x86_64.tar.gz
sudo cp mathsat-5.6.10-linux-x86_64/bin/mathsat /usr/local/bin/
-```
+----
-## Solver Detection
+=== Solver Detection
-SMTLib.jl searches for solvers in your `PATH`:
+SMTLib.jl searches for solvers in your `+PATH+`:
-```julia
+[source,julia]
+----
# List all available solvers
solvers = available_solvers()
for solver in solvers
@@ -117,91 +113,100 @@ z3 = find_solver(:z3)
if isnothing(z3)
error("Z3 not found. Please install it.")
end
-```
+----
-## Choosing a Solver
+=== Choosing a Solver
-```julia
+[source,julia]
+----
# Use a specific solver
ctx = SMTContext(solver=find_solver(:z3), logic=:QF_LIA)
# Or let SMTLib.jl choose automatically (prefers Z3)
ctx = SMTContext(logic=:QF_LIA)
-```
+----
-## Solver-Specific Features
+=== Solver-Specific Features
-### Z3 Extensions
+==== Z3 Extensions
Z3 supports some extensions beyond SMT-LIB2:
-```julia
+[source,julia]
+----
# Set Z3-specific options
ctx = SMTContext(logic=:QF_LIA)
ctx.solver_options[:timeout] = 5000 # milliseconds
ctx.solver_options[:random_seed] = 42
-```
+----
-### CVC5 Options
+==== CVC5 Options
-```julia
+[source,julia]
+----
ctx = SMTContext(solver=find_solver(:cvc5), logic=:QF_LIA)
ctx.solver_options[:finite_model_find] = true
-```
+----
-## Solver Comparison
+=== Solver Comparison
-| Feature | Z3 | CVC5 | Yices | MathSAT |
-|---------|----|----|-------|---------|
-| Linear arithmetic | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
-| Nonlinear arithmetic | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐ |
-| Bitvectors | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
-| Arrays | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐ |
-| Datatypes | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐ |
-| Quantifiers | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐ |
-| Performance | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ |
-| Documentation | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ |
+[cols=",,,,",options="header",]
+|===
+|Feature |Z3 |CVC5 |Yices |MathSAT
+|Linear arithmetic |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐
+|Nonlinear arithmetic |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐ |⭐⭐ |⭐⭐⭐⭐
+|Bitvectors |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐ |⭐⭐⭐ |⭐⭐⭐⭐
+|Arrays |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐⭐ |⭐⭐⭐ |⭐⭐⭐⭐
+|Datatypes |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐⭐ |⭐⭐ |⭐⭐⭐
+|Quantifiers |⭐⭐⭐⭐ |⭐⭐⭐⭐ |⭐⭐ |⭐⭐⭐
+|Performance |⭐⭐⭐⭐ |⭐⭐⭐⭐ |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐
+|Documentation |⭐⭐⭐⭐⭐ |⭐⭐⭐⭐ |⭐⭐⭐ |⭐⭐⭐
+|===
-## Troubleshooting
+=== Troubleshooting
-### Solver Not Found
+==== Solver Not Found
-```julia
+[source,julia]
+----
# Check your PATH
println(ENV["PATH"])
# Manually specify solver path
solver = SMTSolver(:z3, "/opt/homebrew/bin/z3", "4.12.2")
ctx = SMTContext(solver=solver, logic=:QF_LIA)
-```
+----
-### Timeout Issues
+==== Timeout Issues
-```julia
+[source,julia]
+----
# Increase timeout
ctx = SMTContext(logic=:QF_NRA, timeout=30000) # 30 seconds
# Or use a faster solver for your logic
ctx = SMTContext(solver=find_solver(:yices), logic=:QF_LIA)
-```
+----
-### Memory Issues
+==== Memory Issues
-```julia
+[source,julia]
+----
# Use Yices for lower memory footprint
ctx = SMTContext(solver=find_solver(:yices), logic=:QF_LIA)
# Or limit solver memory (Z3)
ctx.solver_options[:max_memory] = 4096 # MB
-```
+----
-## Contributing Solver Support
+=== Contributing Solver Support
To add support for a new solver, implement:
-1. Detection logic in `find_solver()`
-2. SMT-LIB2 generation (usually standard)
-3. Result parsing
-4. Add to CI tests
+[arabic]
+. Detection logic in `+find_solver()+`
+. SMT-LIB2 generation (usually standard)
+. Result parsing
+. Add to CI tests
-See `src/SMTLib.jl` for details.
+See `+src/SMTLib.jl+` for details.
diff --git a/llm-warmup-dev.adoc b/llm-warmup-dev.adoc
new file mode 100644
index 0000000..1e02191
--- /dev/null
+++ b/llm-warmup-dev.adoc
@@ -0,0 +1,19 @@
+== LLM Warmup — SMTLib.jl (Developer)
+
+=== What is SMTLib.jl?
+
+See README.adoc for overview.
+
+=== Key Commands
+
+* `+just setup+` — set up development environment
+* `+just build+` — build the project
+* `+just test+` — run tests
+* `+just doctor+` — diagnose issues
+* `+just heal+` — attempt auto-repair
+
+=== Quick Context
+
+* License: MPL-2.0
+* Part of hyperpolymath ecosystem
+* See EXPLAINME.adoc for architecture
diff --git a/llm-warmup-dev.md b/llm-warmup-dev.md
deleted file mode 100644
index fc6c015..0000000
--- a/llm-warmup-dev.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# LLM Warmup — SMTLib.jl (Developer)
-
-## What is SMTLib.jl?
-See README.adoc for overview.
-
-## Key Commands
-- `just setup` — set up development environment
-- `just build` — build the project
-- `just test` — run tests
-- `just doctor` — diagnose issues
-- `just heal` — attempt auto-repair
-
-## Quick Context
-- License: MPL-2.0
-- Part of hyperpolymath ecosystem
-- See EXPLAINME.adoc for architecture
diff --git a/llm-warmup-user.adoc b/llm-warmup-user.adoc
new file mode 100644
index 0000000..ada9f33
--- /dev/null
+++ b/llm-warmup-user.adoc
@@ -0,0 +1,19 @@
+== LLM Warmup — SMTLib.jl (User)
+
+=== What is SMTLib.jl?
+
+See README.adoc for overview.
+
+=== Key Commands
+
+* `+just setup+` — set up development environment
+* `+just build+` — build the project
+* `+just test+` — run tests
+* `+just doctor+` — diagnose issues
+* `+just heal+` — attempt auto-repair
+
+=== Quick Context
+
+* License: MPL-2.0
+* Part of hyperpolymath ecosystem
+* See EXPLAINME.adoc for architecture
diff --git a/llm-warmup-user.md b/llm-warmup-user.md
deleted file mode 100644
index 96b7684..0000000
--- a/llm-warmup-user.md
+++ /dev/null
@@ -1,20 +0,0 @@
-
-# LLM Warmup — SMTLib.jl (User)
-
-## What is SMTLib.jl?
-See README.adoc for overview.
-
-## Key Commands
-- `just setup` — set up development environment
-- `just build` — build the project
-- `just test` — run tests
-- `just doctor` — diagnose issues
-- `just heal` — attempt auto-repair
-
-## Quick Context
-- License: MPL-2.0
-- Part of hyperpolymath ecosystem
-- See EXPLAINME.adoc for architecture