Skip to content

Commit d224009

Browse files
hyperpolymathclaude
andcommitted
docs: bespoke verisimiser content — replace all template placeholders
Replace generic template placeholders with verisimiser-specific content: - Idris2 ABI (Types.idr): OctadDimension (8 dims), DatabaseBackend (5 backends), DriftCategory (8 cats), AccessPolicy, Tier, SidecarIsolation proof - Idris2 ABI (Layout.idr): OctadRecord (80B), ProvenanceEntry (88B), DriftMeasurement (88B), TemporalSnapshot (48B) with C-ABI proofs - Idris2 ABI (Foreign.idr): lifecycle, database connect, octad overlay, provenance tracking, temporal versioning, drift detection, VQL-UT query FFI - Zig FFI: full implementation stubs matching Idris2 ABI declarations - ROADMAP.adoc: Phase 0-6 with PostgreSQL MVP, multi-backend, Tier 2 overlays, VQL-UT integration, production hardening, ecosystem milestones - TOPOLOGY.md: component map, data flow diagram, invariants, memory layouts - THREAT-MODEL.adoc: sidecar isolation, hash chain integrity, drift detection - 0-AI-MANIFEST.a2ml: verisimiser-specific invariants and repo structure - Machine-readable (AGENTIC, NEUROSYM, PLAYBOOK, STATE): bespoke content Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 31de6cb commit d224009

14 files changed

Lines changed: 1735 additions & 611 deletions

File tree

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
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 verisimiser
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"
10+
project = "verisimiser"
1011

1112
[agent-permissions]
1213
can-edit-source = true
@@ -22,6 +23,18 @@ can-create-files = true
2223
# - Never use banned languages (TypeScript, Python, Go, etc.)
2324
# - Never place state files in repository root (must be in .machine_readable/)
2425
# - Never use AGPL license (use PMPL-1.0-or-later)
26+
# - Never generate code that writes to the target database from Tier 1
27+
# - Never break provenance hash chain ordering (append-only)
28+
# - Never bypass sidecar isolation guarantees
29+
30+
[verisimiser-constraints]
31+
# Tier 1 sidecar isolation is a hard invariant:
32+
# - Drift detection: read-path observer ONLY
33+
# - Provenance: write to sidecar ONLY, never target DB
34+
# - Temporal: write to sidecar ONLY, never target DB
35+
tier1-never-writes-target-db = true
36+
provenance-chain-append-only = true
37+
hash-algorithm = "SHA-256"
2538

2639
[maintenance-integrity]
2740
fail-closed = true
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
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 verisimiser
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"
10+
project = "verisimiser"
1011

1112
[hypatia-config]
1213
scan-enabled = true
1314
scan-depth = "standard" # quick | standard | deep
1415
report-format = "logtalk"
1516

1617
[symbolic-rules]
17-
# Custom symbolic rules for this project
18-
# - { name = "no-unsafe-ffi", pattern = "believe_me|unsafeCoerce", severity = "critical" }
18+
# Custom symbolic rules for verisimiser:
19+
# - Provenance hash chains must be append-only
20+
# - Tier 1 operations must never write to the target database
21+
# - Drift detection must be read-path only (no mutation)
22+
# - OctadDimension enum must always have exactly 8 variants
23+
# - DriftCategory enum must always have exactly 8 variants
24+
rules = [
25+
{ name = "no-unsafe-ffi", pattern = "believe_me|unsafeCoerce|assert_total|Admitted|sorry", severity = "critical" },
26+
{ name = "tier1-sidecar-isolation", pattern = "target_db.*write|target_db.*insert|target_db.*update|target_db.*delete", severity = "critical" },
27+
{ name = "octad-completeness", pattern = "OctadDimension", check = "exactly-8-variants", severity = "high" },
28+
{ name = "drift-completeness", pattern = "DriftCategory", check = "exactly-8-variants", severity = "high" },
29+
]
1930

2031
[neural-config]
2132
# Neural pattern detection settings
22-
# confidence-threshold = 0.85
33+
confidence-threshold = 0.85
2334
# model = "hypatia-v2"
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
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 verisimiser
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"
10+
project = "verisimiser"
1011

1112
[deployment]
12-
# method = "gitops" # gitops | manual | ci-triggered
13-
# target = "container" # container | binary | library | wasm
13+
method = "ci-triggered"
14+
target = "binary" # Rust CLI binary + Zig shared library
15+
container = "optional" # Chainguard-based Containerfile available
1416

1517
[incident-response]
16-
# 1. Check .machine_readable/STATE.a2ml for current status
18+
# 1. Check .machine_readable/6a2/STATE.a2ml for current status
1719
# 2. Review recent commits and CI results
1820
# 3. Run `just validate` to check compliance
1921
# 4. Run `just security` to audit for vulnerabilities
22+
# 5. If provenance chain corruption suspected: run `verisimiser provenance --verify <entity>`
23+
# 6. If drift detection failing: check sidecar connectivity and drift index
2024

2125
[release-process]
22-
# 1. Update version in STATE.a2ml, META.a2ml, Justfile
26+
# 1. Update version in STATE.a2ml, META.a2ml, Cargo.toml, Justfile
2327
# 2. Run `just release-preflight` (validate + quality + security + maint-hard-pass)
2428
# 3. Optional local permission hardening: `just perms-snapshot && just perms-lock`
2529
# 4. Tag and push
@@ -33,3 +37,7 @@ last-updated = "{{CURRENT_DATE}}"
3337
# just maint-hard-pass
3438
# Permission audit:
3539
# just perms-audit
40+
# Verify Zig FFI tests pass:
41+
# cd src/interface/ffi && zig build test
42+
# Verify Rust tests pass:
43+
# cargo test

.machine_readable/6a2/STATE.a2ml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
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
@@ -16,20 +16,34 @@
1616
(ecosystem "-iser family (https://github.com/hyperpolymath/iseriser)"))
1717

1818
(current-position
19-
(phase "initial-scaffold")
20-
(completion-percentage 5)
21-
(milestone "Architecture defined, CLI scaffolded, RSR template complete"))
19+
(phase "scaffold-documented")
20+
(completion-percentage 10)
21+
(milestone "Architecture defined, CLI scaffolded, RSR template complete, ABI/FFI bespoke"))
2222

2323
(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"))
24+
(step 1 "PostgreSQL Tier 1 MVP: logical replication interception")
25+
(step 2 "Provenance sidecar (SQLite): SHA-256 hash-chain write-path observer")
26+
(step 3 "Temporal versioning sidecar: point-in-time queries")
27+
(step 4 "Cross-modal drift detection: read-path observer with 8-category index")
28+
(step 5 "Idris2 ABI proofs: sidecar isolation, hash-chain integrity, version ordering")
29+
(step 6 "Zig FFI bridge: compile and link against Idris2 ABI")
30+
(step 7 "End-to-end integration test: PostgreSQL -> verisimiser -> VQL-UT query"))
31+
32+
(completed-actions
33+
(action "Bespoke Idris2 ABI: Types.idr (OctadDimension, DatabaseBackend, DriftCategory, AccessPolicy, SidecarIsolation)")
34+
(action "Bespoke Idris2 ABI: Layout.idr (OctadRecord 80B, ProvenanceEntry 88B, DriftMeasurement 88B, TemporalSnapshot 48B)")
35+
(action "Bespoke Idris2 ABI: Foreign.idr (lifecycle, connect, overlay, provenance, temporal, drift, VQL-UT)")
36+
(action "Bespoke Zig FFI: main.zig, build.zig, integration_test.zig")
37+
(action "ROADMAP.adoc: Phase 0-6 with database-specific milestones")
38+
(action "TOPOLOGY.md: component map, data flow, invariants, memory layouts")
39+
(action "0-AI-MANIFEST.a2ml: verisimiser-specific invariants and structure")
40+
(action "THREAT-MODEL.adoc: sidecar isolation, hash chain integrity, drift detection")
41+
(action "Machine-readable files: AGENTIC, NEUROSYM, PLAYBOOK updated"))
2942

3043
(blockers-and-issues
31-
(none "Project is in scaffold phase — no blockers yet"))
44+
(none "Project is in documented scaffold phase — no blockers yet"))
3245

3346
(critical-next-actions
34-
(action "Implement codegen for primary use case")
35-
(action "Write first working example end-to-end")))
47+
(action "Implement PostgreSQL logical replication interception")
48+
(action "Build provenance sidecar with SQLite backend")
49+
(action "First working end-to-end test with real PostgreSQL instance")))

0-AI-MANIFEST.a2ml

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
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:
10+
This is the AI manifest for **verisimiser**. It declares:
811
- Canonical file locations (where things MUST be, and nowhere else)
912
- Critical invariants (rules that must NEVER be violated)
1013
- Repository structure and organization
1114

15+
**verisimiser** augments existing databases with VeriSimDB octad capabilities.
16+
It wraps PostgreSQL, SQLite, MongoDB, Redis, and other backends to add eight
17+
octad dimensions (data, metadata, provenance, lineage, constraints, access
18+
control, temporal, simulation) without requiring database migration.
19+
1220
## CANONICAL LOCATIONS (UNIVERSAL RULE)
1321

1422
### Machine-Readable Metadata: `.machine_readable/` ONLY
1523

16-
These 6 a2ml files MUST exist in `.machine_readable/` directory ONLY:
24+
These 6 a2ml files MUST exist in `.machine_readable/6a2/` directory ONLY:
1725
1. **STATE.a2ml** - Project state, progress, blockers
1826
2. **META.a2ml** - Architecture decisions, governance
1927
3. **ECOSYSTEM.a2ml** - Position in ecosystem, relationships
@@ -55,7 +63,7 @@ Policy enforcement contracts (k9, dust, lust, must, trust).
5563
### AI Configuration & Guides: `.machine_readable/ai/` ONLY
5664

5765
- `AI.a2ml` - Language-specific or LLM-specific patterns
58-
- `PLACEHOLDERS.md` - Bootstrap guide
66+
- `PLACEHOLDERS.adoc` - Bootstrap guide
5967

6068
### Community & Forge Metadata: `.github/` ONLY
6169

@@ -80,42 +88,73 @@ Policy enforcement contracts (k9, dust, lust, must, trust).
8088
6. **Container images** - MUST use Chainguard base (`cgr.dev/chainguard/wolfi-base:latest` or `cgr.dev/chainguard/static:latest`)
8189
7. **Container runtime** - Podman, never Docker. Files are `Containerfile`, never `Dockerfile`
8290
8. **Container orchestration** - `selur-compose`, never `docker-compose`
91+
9. **Tier isolation** - Tier 1 capabilities NEVER write to the target database
92+
10. **Sidecar integrity** - Provenance hash chains are append-only and tamper-evident
93+
94+
## VERISIMISER-SPECIFIC INVARIANTS
95+
96+
- **Octad dimensions**: data, metadata, provenance, lineage, constraints, access-control, temporal, simulation
97+
- **Tier 1 (piggybacks)**: drift detection, provenance tracking, temporal versioning -- sidecar-only
98+
- **Tier 2 (overlays)**: graph, vector, tensor, semantic, document, spatial -- additional storage
99+
- **Supported backends**: PostgreSQL, SQLite, MongoDB, Redis (extensible)
100+
- **VQL-UT**: Type-safe query interface for octad queries
83101

84102
## REPOSITORY STRUCTURE
85103

86104
This repo follows the **Dual-Track** architecture:
87105

88106
```
89-
[YOUR-REPO-NAME]/
107+
verisimiser/
90108
├── 0-AI-MANIFEST.a2ml # THIS FILE (start here)
91109
├── README.adoc # High-level orientation (Rich Human)
92110
├── ROADMAP.adoc # Future direction
93111
├── CONTRIBUTING.adoc # Human contribution guide
94-
├── GOVERNANCE.adoc # Decision-making model
95112
├── Justfile # Task runner
96113
├── Containerfile # OCI build
97-
├── LICENSE # Primary license
114+
├── Cargo.toml # Rust build config
115+
├── LICENSE # Primary license (PMPL-1.0-or-later)
98116
├── src/ # Source code
117+
│ ├── main.rs # CLI entry point (clap subcommands)
118+
│ ├── lib.rs # Library root
119+
│ ├── manifest/ # TOML manifest parsing
120+
│ ├── tier1/ # Tier 1 piggyback capabilities
121+
│ │ ├── drift.rs # Cross-modal drift detection
122+
│ │ ├── provenance.rs # SHA-256 hash-chain provenance
123+
│ │ └── temporal.rs # Temporal versioning sidecar
124+
│ ├── tier2/ # Tier 2 augmentation overlays
125+
│ ├── abi/ # ABI module (Rust side)
126+
│ ├── intercept/ # Per-database interception strategies
99127
│ └── interface/ # Verified Interface Seams
100128
│ ├── abi/ # Idris2 ABI (The Spec)
129+
│ │ ├── Types.idr # OctadDimension, DatabaseBackend, etc.
130+
│ │ ├── Layout.idr # Octad record memory layout
131+
│ │ └── Foreign.idr # Database connection, overlay, VQL-UT FFI
101132
│ ├── ffi/ # Zig FFI (The Bridge)
133+
│ │ ├── build.zig
134+
│ │ ├── src/main.zig
135+
│ │ └── test/integration_test.zig
102136
│ └── generated/ # C Headers (The Result)
103137
├── container/ # Stapeln container ecosystem
104138
├── docs/ # Technical depths
105139
│ ├── attribution/ # Citations, owners, maintainers (adoc)
106-
│ ├── architecture/ # Topology, diagrams
140+
│ ├── architecture/ # Topology, diagrams, threat model
107141
│ ├── theory/ # Domain theory
108-
│ └── practice/ # Manuals
109-
├── docs/legal/ # Legal exhibits and full texts
142+
│ └── legal/ # Legal exhibits and full texts
110143
└── .machine_readable/ # ALL machine-readable metadata
144+
└── 6a2/ # STATE, META, ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK
111145
```
112146

113147
## SESSION STARTUP CHECKLIST
114148

115-
✅ Read THIS file (0-AI-MANIFEST.a2ml) first
116-
✅ Understand canonical location: `.machine_readable/`
117-
✅ State understanding of canonical locations
149+
1. Read THIS file (0-AI-MANIFEST.a2ml) first
150+
2. Understand canonical location: `.machine_readable/`
151+
3. State understanding of canonical locations
152+
4. Read `.machine_readable/6a2/STATE.a2ml` for current project state
118153

119154
## ATTESTATION PROOF
120155

121-
**"I have read the AI manifest. All machine-readable content (state files, anchors, policies, bot directives, contractiles, AI guides) is located in `.machine_readable/` ONLY, and community metadata is in `.github/`. I will not create duplicate files in the root directory."**
156+
**"I have read the AI manifest for verisimiser. All machine-readable content
157+
(state files, anchors, policies, bot directives, contractiles, AI guides) is
158+
located in `.machine_readable/` ONLY, and community metadata is in `.github/`.
159+
I will not create duplicate files in the root directory. Tier 1 capabilities
160+
never write to the target database."**

ROADMAP.adoc

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,66 @@
11
// SPDX-License-Identifier: PMPL-1.0-or-later
2-
= verisimiser Roadmap
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
= VeriSimiser Roadmap
34
:toc:
45
:icons: font
56

67
== Phase 0: Scaffold (COMPLETE)
7-
* [x] RSR template with full CI/CD
8-
* [x] CLI with subcommands
9-
* [x] Manifest parser
10-
* [x] Codegen stubs
11-
* [x] ABI module stubs
12-
* [x] README with architecture
8+
* [x] RSR template with full CI/CD (17 workflows)
9+
* [x] CLI with subcommands (init, start, drift, provenance, history, status, octad)
10+
* [x] Manifest parser (verisimiser.toml with tier1/tier2 config)
11+
* [x] Tier 1 data types (DriftReport, ProvenanceRecord, TemporalVersion)
12+
* [x] ABI module stubs (Idris2 + Zig FFI)
13+
* [x] README with two-tier architecture and honest framing
1314

14-
== Phase 1: Core Implementation
15-
* [ ] Implement target-language-specific code generation
16-
* [ ] Write Idris2 ABI proofs for core invariants
17-
* [ ] Build Zig FFI bridge
18-
* [ ] First working end-to-end example
19-
* [ ] Integration tests
15+
== Phase 1: PostgreSQL Tier 1 MVP
16+
* [ ] PostgreSQL logical replication interception
17+
* [ ] Provenance sidecar (SQLite) — write-path observer
18+
* [ ] SHA-256 hash-chain integrity for provenance records
19+
* [ ] Temporal versioning sidecar — point-in-time queries
20+
* [ ] Cross-modal drift detection — read-path observer
21+
* [ ] Drift index with 8-category classification
22+
* [ ] Idris2 ABI proofs: sidecar isolation, hash-chain integrity, version ordering
23+
* [ ] Zig FFI bridge: database connection, overlay operations, VQL-UT queries
24+
* [ ] End-to-end test: PostgreSQL -> verisimiser overlay -> VQL-UT query
2025

21-
== Phase 2: Polish
22-
* [ ] Error messages and diagnostics
26+
== Phase 2: Multi-Backend Support
27+
* [ ] SQLite interception via sqlite3_update_hook / WAL monitoring
28+
* [ ] MongoDB interception via change streams
29+
* [ ] Redis interception via keyspace notifications
30+
* [ ] MySQL interception via binlog CDC
31+
* [ ] Application-level middleware / ORM hooks
32+
* [ ] Backend-agnostic interception trait abstraction
33+
* [ ] Per-backend integration tests
34+
35+
== Phase 3: Tier 2 Overlays
36+
* [ ] Graph overlay (RDF triples / property graph edges)
37+
* [ ] Vector overlay (HNSW embedding similarity search)
38+
* [ ] Tensor overlay (ndarray multi-dimensional numeric data)
39+
* [ ] Semantic overlay (CBOR type annotations + proof blobs)
40+
* [ ] Document overlay (Tantivy full-text search)
41+
* [ ] Spatial overlay (R-tree geospatial coordinates)
42+
* [ ] Independent enable/disable per overlay via manifest
43+
44+
== Phase 4: VQL-UT Integration
45+
* [ ] VQL-UT type-safe query parsing
46+
* [ ] Cross-tier queries (Tier 1 + Tier 2 in single query)
47+
* [ ] TypedQLiser integration for compile-time query validation
48+
* [ ] Query planner for multi-sidecar operations
49+
* [ ] Performance benchmarks: overhead of augmentation layer
50+
51+
== Phase 5: Production Hardening
52+
* [ ] Retention policies (auto-prune temporal history)
53+
* [ ] Sidecar compaction and garbage collection
54+
* [ ] Concurrent access safety (multi-writer provenance chains)
55+
* [ ] Backup and restore for sidecars
56+
* [ ] Monitoring and alerting integration
57+
* [ ] Error recovery and graceful degradation
2358
* [ ] Shell completions (bash, zsh, fish)
24-
* [ ] CI/CD for the generated artifacts
25-
* [ ] Performance benchmarks
26-
* [ ] Additional examples
2759

28-
== Phase 3: Ecosystem
29-
* [ ] PanLL panel integration
30-
* [ ] BoJ-server cartridge
31-
* [ ] VeriSimDB backing store for results
60+
== Phase 6: Ecosystem
61+
* [ ] PanLL panel for drift monitoring dashboard
62+
* [ ] BoJ-server cartridge (MCP integration)
63+
* [ ] SqueakWell integration (database recovery via cross-modal constraint propagation)
64+
* [ ] Migration tooling: Tier 1 -> Tier 2 -> full VeriSimDB
3265
* [ ] Publish to crates.io
66+
* [ ] Chainguard container image

0 commit comments

Comments
 (0)