Skip to content

Commit 7c63636

Browse files
hyperpolymathclaude
andcommitted
docs: bespoke iseriser documentation — meta-framework identity, Idris2 ABI types, Zig FFI engine
Replace all template placeholders with iseriser-specific content: - README.adoc: full architecture, generated artifacts table, 28-repo family, use cases - ROADMAP.adoc: Phase 0-6 (scaffold through ecosystem integration, including self-hosting) - TOPOLOGY.md: architectural topology with data flow and module structure - Idris2 ABI: LanguageModel, TypeSystemFeature, CompilationTarget, IserTemplate, GeneratedArtifact types with formal proofs of generation completeness - Layout.idr: LanguageModelData, TemplateData, GenerationContext struct layouts - Foreign.idr: iseriser_* FFI declarations for generation pipeline - Zig FFI: GenerationContext, language model loading, template expansion, repo generation - Integration tests: full coverage of lifecycle, language model, templates, generation - Machine-readable: STATE, META, ECOSYSTEM, AGENTIC, NEUROSYM, PLAYBOOK, ANCHOR, AI.a2ml - 0-AI-MANIFEST.a2ml: bespoke with iseriser repo structure and invariants Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a057ac2 commit 7c63636

18 files changed

Lines changed: 1344 additions & 698 deletions

File tree

.machine_readable/6a2/AGENTIC.a2ml

Lines changed: 5 additions & 3 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
5-
# Defines what AI agents can and cannot do in this repository.
4+
# AGENTIC.a2ml — AI agent constraints and capabilities for iseriser
5+
# Iseriser is the meta-framework that generates new -iser projects.
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,8 @@ 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 hardcode per-language logic in templates — always derive from LanguageModel
26+
# - Never generate repos outside the canonical ~/Documents/hyperpolymath-repos/ location
2527

2628
[maintenance-integrity]
2729
fail-closed = true

.machine_readable/6a2/ECOSYSTEM.a2ml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,47 @@
55
(ecosystem
66
(version "0.1.0")
77
(name "iseriser")
8-
(type "tool")
9-
(purpose "Meta-framework that generates new -iser projects")
8+
(type "meta-framework")
9+
(purpose "Generates new -iser projects from language descriptions — the factory that makes all other -isers")
1010

1111
(position-in-ecosystem
1212
(family "-iser acceleration frameworks")
13-
(meta-framework "iseriser")
14-
(relationship "sibling")
13+
(role "meta-framework — generates all sibling -isers")
14+
(generates-count 28)
15+
(relationship "parent-generator")
1516
(top-3 ("typedqliser" "chapeliser" "verisimiser")))
1617

1718
(related-projects
18-
(project "iseriser"
19-
(relationship "meta-framework")
20-
(description "Generates new -iser project scaffolding"))
2119
(project "typedqliser"
22-
(relationship "sibling-priority-1")
20+
(relationship "generated-sibling-priority-1")
2321
(description "Formal type safety for any query language"))
2422
(project "chapeliser"
25-
(relationship "sibling-priority-2")
23+
(relationship "generated-sibling-priority-2")
2624
(description "Chapel distributed computing acceleration"))
2725
(project "verisimiser"
28-
(relationship "sibling-priority-3")
26+
(relationship "generated-sibling-priority-3")
2927
(description "VeriSimDB octad database augmentation"))
28+
(project "julianiser"
29+
(relationship "generated-sibling")
30+
(description "Julia scientific computing acceleration"))
31+
(project "futharkiser"
32+
(relationship "generated-sibling")
33+
(description "Futhark GPU computing acceleration"))
34+
(project "idrisiser"
35+
(relationship "generated-sibling")
36+
(description "Idris2 formal verification acceleration"))
3037
(project "squeakwell"
31-
(relationship "sibling")
38+
(relationship "generated-sibling")
3239
(description "Database recovery via constraint propagation"))
3340
(project "proven"
3441
(relationship "dependency")
35-
(description "Shared Idris2 verified library"))
42+
(description "Shared Idris2 verified library for ABI proofs"))
3643
(project "typell"
3744
(relationship "dependency")
38-
(description "Type theory engine"))))
45+
(description "Type theory engine used in language model analysis"))
46+
(project "rsr-template-repo"
47+
(relationship "dependency")
48+
(description "Source templates for generated RSR governance files"))
49+
(project "nextgen-languages"
50+
(relationship "upstream")
51+
(description "Language ecosystem that iseriser scaffolds -isers for"))))

.machine_readable/6a2/META.a2ml

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

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

99
(architecture-decisions
10-
(adr "001-iser-pattern"
10+
(adr "001-meta-framework"
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 a factory to generate consistent -iser repos for each new language")
13+
(decision "Iseriser takes a language description and scaffolds a complete -iser repo")
14+
(consequences "Adding a new language to the ecosystem takes minutes not days; all -isers share identical structure"))
1515

16-
(adr "002-abi-ffi-standard"
16+
(adr "002-language-model"
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 a structured representation of a target language's interop surface")
19+
(decision "LanguageModel captures name, type system features, compilation target, primitives, calling convention")
20+
(consequences "Template engine can make decisions based on language features (e.g., deeper ABI proofs for dependent types)"))
21+
22+
(adr "003-abi-ffi-standard"
23+
(status "accepted")
24+
(context "Need verified interop between Rust CLI, generation engine, and generated output")
25+
(decision "Idris2 ABI for formal proofs of generation correctness, Zig FFI for C-ABI bridge")
2026
(consequences "Compile-time correctness guarantees; zero runtime overhead from proofs"))
2127

22-
(adr "003-rsr-template"
28+
(adr "004-template-engine"
2329
(status "accepted")
24-
(context "Need consistent project structure across 29+ -iser repos")
25-
(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")))
30+
(context "Need a flexible template system for generating diverse file types")
31+
(decision "Handlebars templates with language-model variables")
32+
(consequences "Templates are readable and maintainable; language-specific logic via conditionals"))
33+
34+
(adr "005-self-hosting"
35+
(status "proposed")
36+
(context "Iseriser should be able to generate itself to prove completeness")
37+
(decision "Phase 4 roadmap: iseriser generates iseriser, diff converges to zero")
38+
(consequences "Ultimate validation that the template set is complete and correct")))
2739

2840
(development-practices
2941
(language "Rust" (purpose "CLI and orchestration"))
30-
(language "Idris2" (purpose "ABI formal proofs"))
31-
(language "Zig" (purpose "FFI C-ABI bridge"))
42+
(language "Idris2" (purpose "ABI formal proofs — LanguageModel, TypeSystemFeature, GeneratedArtifact types"))
43+
(language "Zig" (purpose "FFI C-ABI generation engine"))
3244
(build-tool "cargo")
45+
(template-engine "Handlebars (handlebars crate)")
3346
(ci "GitHub Actions (17 workflows)"))
3447

3548
(design-rationale
36-
(principle "Manifest-driven"
37-
(explanation "User intent captured in TOML; all generation is deterministic and reproducible"))
38-
(principle "Formally verified bridges"
39-
(explanation "Idris2 dependent types prove interface correctness at compile time"))
40-
(principle "Zero target language exposure"
41-
(explanation "Users never write Chapel/Julia/Futhark/etc. — the -iser handles everything"))))
49+
(principle "Language-model-driven"
50+
(explanation "All generation decisions flow from the language model — no hardcoded per-language logic in templates"))
51+
(principle "Formally verified generation"
52+
(explanation "Idris2 dependent types prove that templates expand to well-typed output and ABI layouts are consistent"))
53+
(principle "Complete repo generation"
54+
(explanation "Generated -isers include source, tests, CI/CD, documentation, and RSR governance — ready to cargo build from day one"))
55+
(principle "Self-hosting as proof"
56+
(explanation "If iseriser can generate itself, the template set is provably complete"))))
Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
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 iseriser
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 iseriser:
18+
# - Verify generated Idris2 files have no unresolved {{placeholders}}
19+
# - Verify generated Zig files compile against declared ABI
20+
# - Verify generated Cargo.toml has correct dependencies for target language
1821
# - { name = "no-unsafe-ffi", pattern = "believe_me|unsafeCoerce", severity = "critical" }
22+
# - { name = "no-unresolved-templates", pattern = "\\{\\{[A-Z_]+\\}\\}", severity = "error" }
1923

2024
[neural-config]
21-
# Neural pattern detection settings
25+
# Neural pattern detection settings for generated code quality
2226
# confidence-threshold = 0.85
2327
# model = "hypatia-v2"

.machine_readable/6a2/PLAYBOOK.a2ml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,47 @@
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
5-
# Runbooks, incident response, deployment procedures.
4+
# PLAYBOOK.a2ml — Operational playbook for iseriser
5+
# Runbooks, generation procedures, batch operations.
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 = "binary" # iseriser ships as a Rust CLI binary
13+
# target = "binary" # Primary: cargo install; secondary: container
14+
15+
[generation-runbook]
16+
# How to generate a new -iser:
17+
# 1. Create iseriser.toml with target language description
18+
# 2. Run `iseriser validate -m iseriser.toml` to check the manifest
19+
# 3. Run `iseriser generate -m iseriser.toml -o ../new-language-iser/`
20+
# 4. cd into generated repo, run `cargo build` to verify
21+
# 5. Run `cargo test` to verify generated tests pass
22+
# 6. Customise codegen stubs for domain-specific logic
23+
24+
[batch-regeneration]
25+
# To regenerate all 28 -iser repos from updated templates:
26+
# 1. Update templates in iseriser
27+
# 2. Run `iseriser batch-generate --manifest-dir manifests/ --output-dir ../`
28+
# 3. Review diffs in each generated repo
29+
# 4. Commit and push each repo
1430

1531
[incident-response]
16-
# 1. Check .machine_readable/STATE.a2ml for current status
32+
# 1. Check .machine_readable/6a2/STATE.a2ml for current status
1733
# 2. Review recent commits and CI results
1834
# 3. Run `just validate` to check compliance
1935
# 4. Run `just security` to audit for vulnerabilities
2036

2137
[release-process]
22-
# 1. Update version in STATE.a2ml, META.a2ml, Justfile
38+
# 1. Update version in STATE.a2ml, META.a2ml, Cargo.toml, Justfile
2339
# 2. Run `just release-preflight` (validate + quality + security + maint-hard-pass)
24-
# 3. Optional local permission hardening: `just perms-snapshot && just perms-lock`
25-
# 4. Tag and push
26-
# 5. Restore local permissions if needed: `just perms-restore`
27-
# 6. Run `just container-push` if applicable
40+
# 3. Tag and push
41+
# 4. Publish to crates.io: `cargo publish`
2842

2943
[maintenance-operations]
3044
# Baseline audit:
3145
# just maint-audit
3246
# Hard release gate:
3347
# just maint-hard-pass
34-
# Permission audit:
35-
# just perms-audit

.machine_readable/6a2/STATE.a2ml

Lines changed: 17 additions & 14 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 "iseriser")
13-
(description "Meta-framework that generates new -iser projects")
14-
(status "scaffold")
15-
(priority "")
13+
(description "Meta-framework that generates new -iser projects from language descriptions")
14+
(status "codebase-in-progress")
15+
(priority "critical — tooling foundation for all 28 -iser repos")
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 12)
21+
(milestone "Architecture defined, CLI scaffolded, bespoke Idris2 ABI and Zig FFI written, TOPOLOGY and ROADMAP complete"))
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 "Implement LanguageDescription parser in manifest/mod.rs")
25+
(step 2 "Build Handlebars template set for all generated artifact types")
26+
(step 3 "Wire template engine to language model in codegen/mod.rs")
27+
(step 4 "Write Idris2 ABI proofs for template expansion correctness")
28+
(step 5 "End-to-end test: iseriser generates chapeliser, passes cargo test")
29+
(step 6 "Self-hosting: iseriser generates iseriser")
30+
(step 7 "Batch mode: regenerate all 28 -iser repos from updated templates"))
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 LanguageDescription struct and TOML parsing")
37+
(action "Create Handlebars template files for Cargo.toml, main.rs, lib.rs")
38+
(action "First end-to-end generation test")))

.machine_readable/ai/AI.a2ml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11

2-
# AI Assistant Instructions
2+
# AI Assistant Instructions for Iseriser
33

44
## Repository Focus
5-
- `rsr-template-repo` is treated as a Rhodium Standard Repository; obey the Rhodium policies and keep `.machine_readable/` authoritative.
5+
- **Iseriser** is the meta-framework that generates new -iser projects from language descriptions.
6+
- It is the most important -iser from a tooling perspective: it is the factory that makes all other -isers.
67
- All machine-readable content lives under `.machine_readable/` — state files (a2ml), bot directives, and contractiles.
78
- Prefer to keep generated files out of source control, and regenerate them with the documented commands before committing.
89

10+
## Key Architecture
11+
- **Manifest** (`iseriser.toml`): describes target language (name, type system features, compilation target, primitives)
12+
- **Language Model**: internal representation parsed from manifest
13+
- **Idris2 ABI** (`src/interface/abi/`): Types.idr (LanguageModel, TypeSystemFeature, etc.), Layout.idr (generation struct layouts), Foreign.idr (generation engine FFI)
14+
- **Zig FFI** (`src/interface/ffi/`): C-ABI generation engine (libiseriser)
15+
- **Template Engine**: Handlebars-based, expands language model into complete -iser repos
16+
- **Rust CLI** (`src/main.rs`): orchestrates init, validate, generate, build, run
17+
918
## 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.
19+
1. Inspect `.machine_readable/6a2/STATE.a2ml` for blockers and next actions.
20+
2. Respect any constraints listed inside `.machine_readable/6a2/AGENTIC.a2ml`.
1221
3. After finishing edits, update STATE with your outcomes and commit with a concise, imperative message.
1322

1423
## Delivery Promises

0 commit comments

Comments
 (0)