Skip to content

Commit 1288263

Browse files
hyperpolymathclaude
andcommitted
docs(oblibeniser): replace template placeholders with bespoke reversible computing content
All Idris2 ABI files now define ReversibleOperation, InverseProof, AuditEntry, StateSnapshot, and UndoStack types with layout proofs. Zig FFI implements operation recording, inverse computation, hash-chained audit trail, and bounded undo stack. README, ROADMAP, TOPOLOGY, and all machine-readable metadata updated for reversible computing domain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent aaae8d4 commit 1288263

18 files changed

Lines changed: 1559 additions & 439 deletions

File tree

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
#
4-
# AGENTIC.a2ml — AI agent constraints and capabilities
4+
# AGENTIC.a2ml — AI agent constraints and capabilities for oblibeniser
55
# Defines what AI agents can and cannot do in this repository.
66

77
[metadata]
88
version = "0.1.0"
9-
last-updated = "{{CURRENT_DATE}}"
9+
last-updated = "2026-03-21"
1010

1111
[agent-permissions]
1212
can-edit-source = true
@@ -22,6 +22,9 @@ can-create-files = true
2222
# - Never use banned languages (TypeScript, Python, Go, etc.)
2323
# - Never place state files in repository root (must be in .machine_readable/)
2424
# - Never use AGPL license (use PMPL-1.0-or-later)
25+
# - Never break the reversibility invariant: every ReversibleOperation must have an inverse
26+
# - Never break audit chain integrity: prevHash must always link correctly
27+
# - Never use unbounded data structures for undo (UndoStack must have maxDepth)
2528

2629
[maintenance-integrity]
2730
fail-closed = true

.machine_readable/6a2/ECOSYSTEM.a2ml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
(version "0.1.0")
77
(name "oblibeniser")
88
(type "tool")
9-
(purpose "Make operations reversible and auditable via Oblíbený")
9+
(purpose "Make operations reversible and auditable via Oblibeny — every mutation has a provable inverse")
10+
(domain "reversible-computing")
1011

1112
(position-in-ecosystem
1213
(family "-iser acceleration frameworks")
1314
(meta-framework "iseriser")
1415
(relationship "sibling")
15-
(top-3 ("typedqliser" "chapeliser" "verisimiser")))
16+
(top-3 ("typedqliser" "chapeliser" "verisimiser"))
17+
(unique-value "Only -iser focused on operation reversibility, undo, and audit trails"))
1618

1719
(related-projects
1820
(project "iseriser"
@@ -27,12 +29,18 @@
2729
(project "verisimiser"
2830
(relationship "sibling-priority-3")
2931
(description "VeriSimDB octad database augmentation"))
32+
(project "oblibeny"
33+
(relationship "target-language")
34+
(description "Nextgen reversible computing language — source of reversibility semantics"))
3035
(project "squeakwell"
3136
(relationship "sibling")
32-
(description "Database recovery via constraint propagation"))
37+
(description "Database recovery via constraint propagation — complementary to reversible operations"))
3338
(project "proven"
3439
(relationship "dependency")
3540
(description "Shared Idris2 verified library"))
3641
(project "typell"
3742
(relationship "dependency")
38-
(description "Type theory engine"))))
43+
(description "Type theory engine"))
44+
(project "verisimdb"
45+
(relationship "potential-consumer")
46+
(description "Could use oblibeniser for reversible database operations and audit trails"))))

.machine_readable/6a2/META.a2ml

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,61 @@
44

55
(meta
66
(version "0.1.0")
7-
(last-updated "2026-03-20")
7+
(last-updated "2026-03-21")
88

99
(architecture-decisions
1010
(adr "001-iser-pattern"
1111
(status "accepted")
12-
(context "Need to make powerful languages accessible without steep learning curves")
13-
(decision "Use manifest-driven code generation: user describes WHAT, tool generates HOW")
14-
(consequences "Users write zero target language code; all complexity in the -iser"))
12+
(context "Need to make reversible computing accessible without users learning Oblibeny")
13+
(decision "Use manifest-driven code generation: user describes WHAT operations to make reversible, tool generates HOW")
14+
(consequences "Users write zero Oblibeny code; all reversibility logic generated by oblibeniser"))
1515

1616
(adr "002-abi-ffi-standard"
1717
(status "accepted")
18-
(context "Need verified interop between Rust CLI, target language, and user code")
19-
(decision "Idris2 ABI for formal proofs, Zig FFI for C-ABI bridge")
18+
(context "Need verified interop between Rust CLI, Oblibeny codegen, and user code")
19+
(decision "Idris2 ABI for formal proofs (InverseProof, AuditEntry layout), Zig FFI for C-ABI bridge")
2020
(consequences "Compile-time correctness guarantees; zero runtime overhead from proofs"))
2121

2222
(adr "003-rsr-template"
2323
(status "accepted")
2424
(context "Need consistent project structure across 29+ -iser repos")
2525
(decision "All repos cloned from rsr-template-repo with full CI/CD and governance")
26-
(consequences "17 workflows, SECURITY.md, CONTRIBUTING, bot directives from day one")))
26+
(consequences "17 workflows, SECURITY.md, CONTRIBUTING, bot directives from day one"))
27+
28+
(adr "004-reversible-computing-core"
29+
(status "accepted")
30+
(context "Every mutation in the system must be undoable with formal guarantees")
31+
(decision "ReversibleOperation type pairs forward+inverse; InverseProof proves inverse(forward(x))=x")
32+
(consequences "All operations auditable and undoable; enables time-travel debugging"))
33+
34+
(adr "005-hash-chained-audit"
35+
(status "accepted")
36+
(context "Audit trail must be tamper-evident for compliance and security")
37+
(decision "AuditEntry records are hash-chained; each entry's prevHash links to the previous entryHash")
38+
(consequences "Any tampering breaks the chain; integrity verifiable in O(n) time"))
39+
40+
(adr "006-bounded-undo-stack"
41+
(status "accepted")
42+
(context "Unbounded undo history would consume unbounded memory")
43+
(decision "UndoStack has a configurable maxDepth; oldest entries evicted when full")
44+
(consequences "Predictable memory usage; time-travel limited to maxDepth operations")))
2745

2846
(development-practices
29-
(language "Rust" (purpose "CLI and orchestration"))
30-
(language "Idris2" (purpose "ABI formal proofs"))
31-
(language "Zig" (purpose "FFI C-ABI bridge"))
47+
(language "Rust" (purpose "CLI orchestration, manifest parsing, build coordination"))
48+
(language "Idris2" (purpose "ABI formal proofs — ReversibleOperation, InverseProof, AuditEntry layout"))
49+
(language "Zig" (purpose "FFI C-ABI bridge — operation recording, inverse computation, audit, undo"))
50+
(language "Oblibeny" (purpose "Target language for generated reversible wrappers (future)"))
3251
(build-tool "cargo")
3352
(ci "GitHub Actions (17 workflows)"))
3453

3554
(design-rationale
55+
(principle "Every operation is reversible"
56+
(explanation "The core guarantee: for any forward(x), there exists inverse such that inverse(forward(x)) = x"))
57+
(principle "Every state change is auditable"
58+
(explanation "Hash-chained audit entries record actor, authorisation, timestamp, and operation for compliance"))
3659
(principle "Manifest-driven"
3760
(explanation "User intent captured in TOML; all generation is deterministic and reproducible"))
3861
(principle "Formally verified bridges"
39-
(explanation "Idris2 dependent types prove interface correctness at compile time"))
62+
(explanation "Idris2 dependent types prove interface correctness — InverseProof, struct layouts"))
4063
(principle "Zero target language exposure"
41-
(explanation "Users never write Chapel/Julia/Futhark/etc. — the -iser handles everything"))))
64+
(explanation "Users never write Oblibeny directly — the -iser handles everything"))))

.machine_readable/6a2/NEUROSYM.a2ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
#
4-
# NEUROSYM.a2ml — Neurosymbolic integration metadata
4+
# NEUROSYM.a2ml — Neurosymbolic integration metadata for oblibeniser
55
# Configuration for Hypatia scanning and symbolic reasoning.
66

77
[metadata]
88
version = "0.1.0"
9-
last-updated = "{{CURRENT_DATE}}"
9+
last-updated = "2026-03-21"
1010

1111
[hypatia-config]
1212
scan-enabled = true
1313
scan-depth = "standard" # quick | standard | deep
1414
report-format = "logtalk"
1515

1616
[symbolic-rules]
17-
# Custom symbolic rules for this project
17+
# Custom symbolic rules for oblibeniser
1818
# - { name = "no-unsafe-ffi", pattern = "believe_me|unsafeCoerce", severity = "critical" }
19+
# - { name = "inverse-proof-required", pattern = "ReversibleOperation.*inverse_verified.*false", severity = "warning" }
20+
# - { name = "audit-chain-integrity", pattern = "prev_hash.*=.*0.*sequence_no.*>.*1", severity = "critical" }
1921

2022
[neural-config]
2123
# Neural pattern detection settings

.machine_readable/6a2/PLAYBOOK.a2ml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
#
4-
# PLAYBOOK.a2ml — Operational playbook
4+
# PLAYBOOK.a2ml — Operational playbook for oblibeniser
55
# Runbooks, incident response, deployment procedures.
66

77
[metadata]
88
version = "0.1.0"
9-
last-updated = "{{CURRENT_DATE}}"
9+
last-updated = "2026-03-21"
1010

1111
[deployment]
12-
# method = "gitops" # gitops | manual | ci-triggered
13-
# target = "container" # container | binary | library | wasm
12+
method = "ci-triggered"
13+
target = "binary" # Rust CLI binary + Zig shared library
1414

1515
[incident-response]
16-
# 1. Check .machine_readable/STATE.a2ml for current status
16+
# 1. Check .machine_readable/6a2/STATE.a2ml for current status
1717
# 2. Review recent commits and CI results
1818
# 3. Run `just validate` to check compliance
1919
# 4. Run `just security` to audit for vulnerabilities
20+
# 5. Verify audit chain integrity: `oblibeniser verify-audit`
2021

2122
[release-process]
22-
# 1. Update version in STATE.a2ml, META.a2ml, Justfile
23+
# 1. Update version in STATE.a2ml, META.a2ml, Cargo.toml, Justfile
2324
# 2. Run `just release-preflight` (validate + quality + security + maint-hard-pass)
2425
# 3. Optional local permission hardening: `just perms-snapshot && just perms-lock`
2526
# 4. Tag and push

.machine_readable/6a2/STATE.a2ml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,34 @@
55
(state
66
(metadata
77
(version "0.1.0")
8-
(last-updated "2026-03-20")
8+
(last-updated "2026-03-21")
99
(author "Jonathan D.A. Jewell"))
1010

1111
(project-context
1212
(name "oblibeniser")
13-
(description "Make operations reversible and auditable via Oblíbený")
14-
(status "scaffold")
13+
(description "Make operations reversible and auditable via Oblibeny")
14+
(domain "reversible-computing")
15+
(status "scaffold-documented")
1516
(priority "—")
1617
(ecosystem "-iser family (https://github.com/hyperpolymath/iseriser)"))
1718

1819
(current-position
19-
(phase "initial-scaffold")
20-
(completion-percentage 5)
21-
(milestone "Architecture defined, CLI scaffolded, RSR template complete"))
20+
(phase "scaffold-with-bespoke-abi")
21+
(completion-percentage 15)
22+
(milestone "Bespoke Idris2 ABI types (ReversibleOperation, InverseProof, AuditEntry, StateSnapshot, UndoStack), Zig FFI with operation recording/inverse/audit/undo, integration tests, documentation"))
2223

2324
(route-to-mvp
24-
(step 1 "Replace codegen stubs with target-language-specific generation")
25-
(step 2 "Implement Idris2 ABI proofs for core invariants")
26-
(step 3 "Build Zig FFI bridge")
27-
(step 4 "Integration tests with real-world examples")
28-
(step 5 "Documentation and examples"))
25+
(step 1 "Wire Rust CLI codegen to emit Oblibeny reversible wrappers")
26+
(step 2 "Implement domain-specific inverse computation (file, SQL, config)")
27+
(step 3 "Cryptographic audit trail (hash-chain with post-quantum signing)")
28+
(step 4 "Time-travel debugging (replay/reverse from snapshots)")
29+
(step 5 "Integration tests with real-world use cases (DB migration, config rollback)")
30+
(step 6 "PanLL panel and BoJ-server cartridge"))
2931

3032
(blockers-and-issues
3133
(none "Project is in scaffold phase — no blockers yet"))
3234

3335
(critical-next-actions
34-
(action "Implement codegen for primary use case")
35-
(action "Write first working example end-to-end")))
36+
(action "Implement codegen for reversible wrappers (Phase 1)")
37+
(action "Write first end-to-end example: file mutation with undo")
38+
(action "Connect Rust manifest parser to Zig FFI via generated C headers")))

.machine_readable/ai/AI.a2ml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
1-
2-
# AI Assistant Instructions
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# AI Assistant Instructions for oblibeniser
35

46
## Repository Focus
5-
- `rsr-template-repo` is treated as a Rhodium Standard Repository; obey the Rhodium policies and keep `.machine_readable/` authoritative.
6-
- All machine-readable content lives under `.machine_readable/` — state files (a2ml), bot directives, and contractiles.
7-
- Prefer to keep generated files out of source control, and regenerate them with the documented commands before committing.
7+
- `oblibeniser` makes operations reversible and auditable via Oblibeny
8+
- Core abstraction: ReversibleOperation (forward + inverse + proof)
9+
- Domain types: InverseProof, AuditEntry, StateSnapshot, UndoStack
10+
- Follows the -iser pattern: manifest -> Idris2 ABI -> Zig FFI -> codegen
11+
- All machine-readable content lives under `.machine_readable/` — state files (a2ml), bot directives, and contractiles
12+
13+
## Key Invariants
14+
- Every ReversibleOperation MUST have a provable inverse
15+
- Audit trail entries MUST be hash-chained (prevHash links to prior entryHash)
16+
- UndoStack MUST be bounded (maxDepth prevents unbounded memory growth)
17+
- InverseProof MUST verify: inverse(forward(x)) = x
18+
19+
## Architecture
20+
- Rust CLI (src/main.rs) — orchestrates manifest parsing and codegen
21+
- Idris2 ABI (src/interface/abi/) — formal proofs of reversibility and layout
22+
- Zig FFI (src/interface/ffi/) — C-ABI bridge with operation recording, audit, undo
23+
- Codegen (src/codegen/) — generates Oblibeny reversible wrappers
824

925
## Workflow
10-
1. Inspect `.machine_readable/STATE.a2ml` for blockers and next actions.
11-
2. Respect any constraints listed inside `.machine_readable/AGENTIC.a2ml` when tooling changes are requested.
26+
1. Inspect `.machine_readable/6a2/STATE.a2ml` for blockers and next actions.
27+
2. Respect any constraints listed inside `.machine_readable/6a2/AGENTIC.a2ml`.
1228
3. After finishing edits, update STATE with your outcomes and commit with a concise, imperative message.
1329

1430
## Delivery Promises

0-AI-MANIFEST.a2ml

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
# ⚠️ STOP - CRITICAL READING REQUIRED
2-
3-
**THIS FILE MUST BE READ FIRST BY ALL AI AGENTS**
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# STOP - CRITICAL READING REQUIRED
5+
#
6+
# THIS FILE MUST BE READ FIRST BY ALL AI AGENTS
47

58
## WHAT IS THIS?
69

7-
This is the AI manifest for **[YOUR-REPO-NAME]**. It declares:
8-
- Canonical file locations (where things MUST be, and nowhere else)
9-
- Critical invariants (rules that must NEVER be violated)
10-
- Repository structure and organization
10+
This is the AI manifest for **oblibeniser** — a tool that makes operations
11+
reversible and auditable via Oblibeny (Czech: "favourite"), a nextgen language
12+
for reversible computing.
13+
14+
Core concept: every forward operation has a provable inverse, enabling undo,
15+
audit trails, and time-travel debugging.
1116

1217
## CANONICAL LOCATIONS (UNIVERSAL RULE)
1318

1419
### Machine-Readable Metadata: `.machine_readable/` ONLY
1520

16-
These 6 a2ml files MUST exist in `.machine_readable/` directory ONLY:
21+
These 6 a2ml files MUST exist in `.machine_readable/6a2/` directory ONLY:
1722
1. **STATE.a2ml** - Project state, progress, blockers
1823
2. **META.a2ml** - Architecture decisions, governance
1924
3. **ECOSYSTEM.a2ml** - Position in ecosystem, relationships
@@ -55,7 +60,7 @@ Policy enforcement contracts (k9, dust, lust, must, trust).
5560
### AI Configuration & Guides: `.machine_readable/ai/` ONLY
5661

5762
- `AI.a2ml` - Language-specific or LLM-specific patterns
58-
- `PLACEHOLDERS.md` - Bootstrap guide
63+
- `PLACEHOLDERS.adoc` - Bootstrap guide
5964

6065
### Community & Forge Metadata: `.github/` ONLY
6166

@@ -80,41 +85,61 @@ Policy enforcement contracts (k9, dust, lust, must, trust).
8085
6. **Container images** - MUST use Chainguard base (`cgr.dev/chainguard/wolfi-base:latest` or `cgr.dev/chainguard/static:latest`)
8186
7. **Container runtime** - Podman, never Docker. Files are `Containerfile`, never `Dockerfile`
8287
8. **Container orchestration** - `selur-compose`, never `docker-compose`
88+
9. **Reversibility invariant** - Every ReversibleOperation MUST have a provable inverse
89+
10. **Audit chain integrity** - Audit entries MUST be hash-chained; breaks are critical errors
8390

8491
## REPOSITORY STRUCTURE
8592

8693
This repo follows the **Dual-Track** architecture:
8794

8895
```
89-
[YOUR-REPO-NAME]/
96+
oblibeniser/
9097
├── 0-AI-MANIFEST.a2ml # THIS FILE (start here)
9198
├── README.adoc # High-level orientation (Rich Human)
9299
├── ROADMAP.adoc # Future direction
93100
├── CONTRIBUTING.adoc # Human contribution guide
94-
├── GOVERNANCE.adoc # Decision-making model
101+
├── Cargo.toml # Rust CLI project
95102
├── Justfile # Task runner
96103
├── Containerfile # OCI build
97-
├── LICENSE # Primary license
104+
├── LICENSE # Primary license (PMPL-1.0-or-later)
98105
├── src/ # Source code
106+
│ ├── main.rs # CLI entrypoint
107+
│ ├── lib.rs # Library root
108+
│ ├── manifest/ # oblibeniser.toml parser
109+
│ ├── codegen/ # Oblibeny reversible wrapper codegen
99110
│ └── interface/ # Verified Interface Seams
100-
│ ├── abi/ # Idris2 ABI (The Spec)
111+
│ ├── abi/ # Idris2 ABI (Types, Layout, Foreign)
112+
│ │ ├── Types.idr # ReversibleOperation, InverseProof, AuditEntry, etc.
113+
│ │ ├── Layout.idr # C-ABI struct layouts with proofs
114+
│ │ └── Foreign.idr # FFI declarations for all operations
101115
│ ├── ffi/ # Zig FFI (The Bridge)
116+
│ │ ├── build.zig
117+
│ │ ├── src/main.zig # FFI implementation
118+
│ │ └── test/ # Integration tests
102119
│ └── generated/ # C Headers (The Result)
103120
├── container/ # Stapeln container ecosystem
104121
├── docs/ # Technical depths
105-
│ ├── attribution/ # Citations, owners, maintainers (adoc)
122+
│ ├── attribution/ # Citations, owners, maintainers
106123
│ ├── architecture/ # Topology, diagrams
107-
│ ├── theory/ # Domain theory
124+
│ ├── theory/ # Domain theory (reversible computing)
108125
│ └── practice/ # Manuals
109-
├── docs/legal/ # Legal exhibits and full texts
110126
└── .machine_readable/ # ALL machine-readable metadata
127+
└── 6a2/ # STATE, META, ECOSYSTEM, etc.
111128
```
112129

130+
## DOMAIN CONCEPTS
131+
132+
- **ReversibleOperation**: A forward operation paired with its inverse
133+
- **InverseProof**: Dependent-type proof that `inverse(forward(x)) = x`
134+
- **AuditEntry**: Hash-chained record of who did what, when
135+
- **StateSnapshot**: Serialised system state before/after an operation
136+
- **UndoStack**: Bounded LIFO stack of operations for time-travel
137+
113138
## SESSION STARTUP CHECKLIST
114139

115-
Read THIS file (0-AI-MANIFEST.a2ml) first
116-
Understand canonical location: `.machine_readable/`
117-
State understanding of canonical locations
140+
Read THIS file (0-AI-MANIFEST.a2ml) first
141+
Understand canonical location: `.machine_readable/`
142+
State understanding of canonical locations
118143

119144
## ATTESTATION PROOF
120145

0 commit comments

Comments
 (0)