diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 4d9ae2f..07f9937 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -44,8 +44,8 @@ updates: schedule: interval: "weekly" - # Nix flakes - - package-ecosystem: "nix" + # Guix flakes + - package-ecosystem: "guix" directory: "/" schedule: interval: "weekly" diff --git a/deno/.machine_readable/6a2/META.a2ml b/deno/.machine_readable/6a2/META.a2ml index d9b09e6..ba3375c 100644 --- a/deno/.machine_readable/6a2/META.a2ml +++ b/deno/.machine_readable/6a2/META.a2ml @@ -22,7 +22,7 @@ author = "Jonathan D.A. Jewell (hyperpolymath)" build-tool = "just" container-runtime = "podman" ci-platform = "github-actions" -package-manager = "guix" # guix | nix | cargo | mix +package-manager = "guix" # guix | guix | cargo | mix [maintenance-axes] scoping-first = true @@ -46,7 +46,7 @@ perfective-source = "axis-1 honest state after corrective/adaptive updates" [axis-3-audit-rules] audit-focus = "systems in place, documentation explains actual state, safety/security accounted for, observed effects reviewed" compliance-focus = "seams/compromises/exception register, bounded exceptions, anti-drift checks" -drift-risk-example = "single exception broadening into policy violation (e.g. ReScript->TypeScript spread)" +drift-risk-example = "single exception broadening into policy violation (e.g. AffineScript->TypeScript spread)" effects-evidence = "benchmark execution/results and maintainer status dialogue/review" [design-rationale] diff --git a/deno/.machine_readable/6a2/STATE.a2ml b/deno/.machine_readable/6a2/STATE.a2ml index ddbfda7..66ad0ab 100644 --- a/deno/.machine_readable/6a2/STATE.a2ml +++ b/deno/.machine_readable/6a2/STATE.a2ml @@ -32,7 +32,7 @@ milestones = [ { name = "Phase 1e: Trustfile / contractiles", completion = 100 }, { name = "Phase 2: Container ecosystem templates (stapeln)", completion = 100 }, { name = "Phase 3: Multi-forge sync hardening", completion = 0 }, - { name = "Phase 4: Nix/Guix reproducible shells", completion = 50 }, + { name = "Phase 4: Guix/Guix reproducible shells", completion = 50 }, ] [blockers-and-issues] @@ -43,7 +43,7 @@ actions = [ "Container templates complete — test with `just container-init`", "Validate container templates across wolfi-base and static Chainguard images", "Harden multi-forge sync for GitLab/Bitbucket mirroring edge cases", - "Expand Nix/Guix development shell templates", + "Expand Guix/Guix development shell templates", ] [maintenance-status] diff --git a/deno/.machine_readable/ai/PLACEHOLDERS.adoc b/deno/.machine_readable/ai/PLACEHOLDERS.adoc index 02bc8b4..59b0f68 100644 --- a/deno/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/deno/.machine_readable/ai/PLACEHOLDERS.adoc @@ -48,8 +48,8 @@ sed -i "s/{{CURRENT_DATE}}/$(date +%Y-%m-%d)/g" $(grep -rl '{{CURRENT_DATE}}' .) | Placeholder | Description | Example | Files | |---|---|---|---| -| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json | -| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.nix | +| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.guix, devcontainer.json | +| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.guix | | `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig | | `{{project}}` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig | | `{{REPO}}` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml | @@ -133,7 +133,7 @@ After replacing all placeholders, verify none remain: ```bash grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \ --include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \ - --include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \ + --include='Justfile' --include='*.guix' --include='*.toml' --include='*.yml' \ --include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \ --include='*.json' --include='Containerfile' --include='dep5' \ | grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules' diff --git a/deno/.machine_readable/contractiles/dust/Dustfile.a2ml b/deno/.machine_readable/contractiles/dust/Dustfile.a2ml index 40c8482..6edc6d6 100644 --- a/deno/.machine_readable/contractiles/dust/Dustfile.a2ml +++ b/deno/.machine_readable/contractiles/dust/Dustfile.a2ml @@ -35,8 +35,8 @@ These are maintenance tasks — not blocking, but should be addressed. - run: test -z "$(git ls-files server/_build/ server/deps/ 2>/dev/null)" - severity: warning -### no-tracked-rescript-build -- description: No ReScript build artifacts tracked in git +### no-tracked-affinescript-build +- description: No AffineScript build artifacts tracked in git - run: test -z "$(git ls-files 'client/web/src/**/*.res.mjs' client/web/lib/ 2>/dev/null)" - severity: warning diff --git a/deno/.machine_readable/contractiles/must/Mustfile.a2ml b/deno/.machine_readable/contractiles/must/Mustfile.a2ml index bf03f7b..f91ed23 100644 --- a/deno/.machine_readable/contractiles/must/Mustfile.a2ml +++ b/deno/.machine_readable/contractiles/must/Mustfile.a2ml @@ -68,9 +68,9 @@ These are hard requirements — CI and pre-commit hooks fail if any check fails. ## Web Client -### rescript-json-present -- description: ReScript config exists for web client -- run: test -f client/web/rescript.json +### affinescript-json-present +- description: AffineScript config exists for web client +- run: test -f client/web/affinescript.json - severity: warning ### web-entry-point @@ -98,7 +98,7 @@ These are hard requirements — CI and pre-commit hooks fail if any check fails. - severity: critical ### no-unsafe-coerce -- description: No unsafeCoerce in ReScript/Haskell code +- description: No unsafeCoerce in AffineScript/Haskell code - run: test -z "$(find . \( -name '*.res' -o -name '*.hs' \) -not -path '*/deps/*' -not -path '*/node_modules/*' -exec grep -l 'unsafeCoerce\|Obj.magic' {} \; 2>/dev/null)" - severity: critical @@ -117,12 +117,12 @@ These are hard requirements — CI and pre-commit hooks fail if any check fails. ## Language Policy ### no-typescript -- description: No TypeScript files (use ReScript) +- description: No TypeScript files (use AffineScript) - run: test -z "$(find . -name '*.ts' -not -name '*.d.ts' -not -path '*/deps/*' -not -path '*/node_modules/*' 2>/dev/null)" - severity: warning ### no-python -- description: No Python files (use Julia/Rust/ReScript) +- description: No Python files (use Julia/Rust/AffineScript) - run: test -z "$(find . -name '*.py' -not -path '*/deps/*' -not -path '*/node_modules/*' 2>/dev/null)" - severity: warning diff --git a/deno/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml b/deno/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/deno/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml +++ b/deno/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/deno/CONTRIBUTING.md b/deno/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/deno/CONTRIBUTING.md +++ b/deno/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/deno/EXPLAINME.adoc b/deno/EXPLAINME.adoc index b20c74d..e762617 100644 --- a/deno/EXPLAINME.adoc +++ b/deno/EXPLAINME.adoc @@ -9,19 +9,19 @@ The README makes claims. This file backs them up. === Claim 1: "Complete parser and renderer for A2ML documents with attestation provenance and trust-level tracking" -**How it works:** The ReScript parser (`src/A2ML_Parser.res`) implements a line-oriented grammar recognizing: headings (`# Title`), paragraphs, inline formatting (bold `**x**`, italic `*x*`, code `` `x` ``), directives (`@key(val):`), attestation blocks (`!attest...!end`), and trust levels (`trust-level: verified|reviewed|automated|unverified`). The AST (in `src/A2ML_Types.res`) represents documents as a tree of blocks and inlines. The `A2ML_Renderer.res` walks the AST and emits back A2ML text, preserving structure (round-trip fidelity: parse then render equals original text). Trust levels are enums tracked in attestation records, enabling queries like "which claims are verified?" +**How it works:** The AffineScript parser (`src/A2ML_Parser.res`) implements a line-oriented grammar recognizing: headings (`# Title`), paragraphs, inline formatting (bold `**x**`, italic `*x*`, code `` `x` ``), directives (`@key(val):`), attestation blocks (`!attest...!end`), and trust levels (`trust-level: verified|reviewed|automated|unverified`). The AST (in `src/A2ML_Types.res`) represents documents as a tree of blocks and inlines. The `A2ML_Renderer.res` walks the AST and emits back A2ML text, preserving structure (round-trip fidelity: parse then render equals original text). Trust levels are enums tracked in attestation records, enabling queries like "which claims are verified?" **Caveat:** Trust level is metadata only—the parser doesn't cryptographically verify attestations. If a `trust-level: verified` claim is false, the parser won't detect it. Verification requires external validation (signature checking, authority lookup). The parser is linear (single pass), so it doesn't detect forward references or cross-attestation consistency. **Evidence:** `src/A2ML_Parser.res` implements parse(text): Result with explicit trust-level variants. `src/A2ML_Renderer.res` implements render(doc): String. Tests in `src/tests/` verify round-trip fidelity and all syntax forms. -=== Claim 2: "Deno-native with zero dependencies, compiled from ReScript to ES6 JavaScript modules" +=== Claim 2: "Deno-native with zero dependencies, compiled from AffineScript to ES6 JavaScript modules" -**How it works:** The library is written in ReScript (.res files) and compiled to JavaScript ES6 modules using ReScript's toolchain (invoked via `deno task build`). The generated JavaScript has no external dependencies—it uses only Deno's standard library (console for logging, Uint8Array for buffers if needed). The build output is ESM (ECMAScript Modules) with proper import/export statements. Users add the package to their Deno project via `deno add jsr:@hyperpolymath/a2ml`, and Deno's dependency resolver caches it. No package.json, no node_modules, no npm—pure Deno integration. +**How it works:** The library is written in AffineScript (.res files) and compiled to JavaScript ES6 modules using AffineScript's toolchain (invoked via `deno task build`). The generated JavaScript has no external dependencies—it uses only Deno's standard library (console for logging, Uint8Array for buffers if needed). The build output is ESM (ECMAScript Modules) with proper import/export statements. Users add the package to their Deno project via `deno add jsr:@hyperpolymath/a2ml`, and Deno's dependency resolver caches it. No package.json, no node_modules, no npm—pure Deno integration. -**Caveat:** ReScript compilation adds a build step. If Deno directly executes .res files, there's a type-checking overhead. The generated JavaScript is readable but less idiomatic than hand-written JavaScript. ReScript's error messages can be cryptic for beginners. +**Caveat:** AffineScript compilation adds a build step. If Deno directly executes .res files, there's a type-checking overhead. The generated JavaScript is readable but less idiomatic than hand-written JavaScript. AffineScript's error messages can be cryptic for beginners. -**Evidence:** `deno.json` specifies build task (`deno task build` → rescript compile); `src/A2ML.res` exports public API (`parse`, `render`, `parseErrorToString`); generated JS in `lib/` is published to JSR. +**Evidence:** `deno.json` specifies build task (`deno task build` → affinescript compile); `src/A2ML.res` exports public API (`parse`, `render`, `parseErrorToString`); generated JS in `lib/` is published to JSR. == Technology Choices @@ -29,7 +29,7 @@ The README makes claims. This file backs them up. |=== | Technology | Learn More -| **ReScript** | Compiles to ES6 JavaScript, type-safe +| **AffineScript** | Compiles to ES6 JavaScript, type-safe | **Deno** | Modern runtime (no Node/npm), JSR package registry | **A2ML Spec** | Markup language with attestation and trust levels |=== diff --git a/deno/Justfile b/deno/Justfile index 4d695f9..1daf6b9 100644 --- a/deno/Justfile +++ b/deno/Justfile @@ -235,7 +235,7 @@ init: # Check for remaining placeholders PATTERN="${LB}[A-Z_]*${RB}" - REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.nix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) + REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.guix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) if [ -n "$REMAINING" ]; then echo "WARNING: Remaining placeholders in:" echo "$REMAINING" | sed 's/^/ /' @@ -272,7 +272,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -791,7 +791,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) @@ -802,9 +802,9 @@ guix-shell: guix-build: guix build -f guix.scm -# Enter Nix development shell (fallback) -nix-shell: - @if [ -f "flake.nix" ]; then nix develop; else echo "No flake.nix"; fi +# Enter Guix development shell (fallback) +guix-shell: + @if [ -f "flake.guix" ]; then guix develop; else echo "No flake.guix"; fi # ═══════════════════════════════════════════════════════════════════════════════ # HYBRID AUTOMATION @@ -936,7 +936,7 @@ doctor: check "just" just "1.25" check "git" git "2.40" check "Deno" deno "2.0" - check "ReScript (resc)" rescript "12.0" + check "AffineScript (resc)" affinescript "12.0" # Optional tools if command -v panic-attack >/dev/null 2>&1; then echo " [OK] panic-attack — available" @@ -981,7 +981,7 @@ tour: echo " A2Ml Deno — Guided Tour" echo "═══════════════════════════════════════════════════" echo "" - echo '**Deno-native parser library for A2ML (Attested Markup Language), written in ReScript.**' + echo '**Deno-native parser library for A2ML (Attested Markup Language), written in AffineScript.**' echo "" echo "Key directories:" echo " src/ Source code" diff --git a/deno/PROOF-NEEDS.md b/deno/PROOF-NEEDS.md index 967f815..a4f2ef8 100644 --- a/deno/PROOF-NEEDS.md +++ b/deno/PROOF-NEEDS.md @@ -3,7 +3,7 @@ ## Current state - ABI directory exists (template-level) - No dangerous patterns found -- 2.2K lines; ReScript-based A2ML parser with trust-level hierarchy +- 2.2K lines; AffineScript-based A2ML parser with trust-level hierarchy ## What needs proving - **Trust-level ordering**: Prove the trust hierarchy (Unverified < Automated < Reviewed < Verified) forms a total order and that attestation operations never silently upgrade trust level diff --git a/deno/README.md b/deno/README.md index 5f2e84b..592c830 100644 --- a/deno/README.md +++ b/deno/README.md @@ -6,12 +6,12 @@ SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell # Overview **Deno-native parser library for A2ML (Attested Markup Language), -written in ReScript.** +written in AffineScript.** A2ML is a structured markup language with built-in attestation provenance, directive metadata, and trust-level tracking. This library provides a complete parser and renderer for A2ML documents, compiled -from ReScript to JavaScript ES modules for use with Deno. +from AffineScript to JavaScript ES modules for use with Deno. # Features @@ -28,12 +28,12 @@ from ReScript to JavaScript ES modules for use with Deno. - Attestation provenance chain -- Zero dependencies beyond ReScript standard library +- Zero dependencies beyond AffineScript standard library # Quick Start ```bash -# Build ReScript to JS +# Build AffineScript to JS deno task build # Use in your Deno project @@ -81,14 +81,14 @@ const result = parse("# Hello World\n\nSome **bold** text.\n"); > Block quote text - ```rescript + ```affinescript let x = 42 ``` # Development ```bash -deno task build # Compile ReScript +deno task build # Compile AffineScript deno task clean # Clean build artifacts deno task test # Run tests ``` diff --git a/deno/TEST-NEEDS.md b/deno/TEST-NEEDS.md index aa44712..7154b2f 100644 --- a/deno/TEST-NEEDS.md +++ b/deno/TEST-NEEDS.md @@ -3,7 +3,7 @@ ## CRG Grade: C — ACHIEVED 2026-04-04 ## Current State -- Unit tests: NONE (no Deno/ReScript test files found) +- Unit tests: NONE (no Deno/AffineScript test files found) - Integration tests: 1 Zig integration test (ABI/FFI template) - E2E tests: NONE - Benchmarks: NONE (benchmark dir has only README placeholder) @@ -35,7 +35,7 @@ ### Build & Execution - [ ] deno check — not verified - [ ] deno test — not verified -- [ ] ReScript build — not verified +- [ ] AffineScript build — not verified - [ ] Zig build — not verified - [ ] Self-diagnostic — none @@ -49,4 +49,4 @@ - [ ] Built-in doctor/check command (if applicable) ## Priority -- **HIGH** — A2ML is a critical format in the ecosystem. 4 ReScript source files + 3 Idris2 ABI + 2 Zig FFI files with ZERO functional tests. The fuzz directory contains only a placeholder.txt. As a library consumed by other projects, this needs comprehensive tests. +- **HIGH** — A2ML is a critical format in the ecosystem. 4 AffineScript source files + 3 Idris2 ABI + 2 Zig FFI files with ZERO functional tests. The fuzz directory contains only a placeholder.txt. As a library consumed by other projects, this needs comprehensive tests. diff --git a/deno/TOPOLOGY.md b/deno/TOPOLOGY.md index 8126648..edd533e 100644 --- a/deno/TOPOLOGY.md +++ b/deno/TOPOLOGY.md @@ -4,7 +4,7 @@ ## Purpose -Deno-native parser and renderer for A2ML (Attested Markup Language), written in ReScript and compiled to JavaScript ES modules. Provides parse-render round-trip support for A2ML documents with trust-level hierarchy and directive blocks. Consumed by Deno runtimes and published to JSR. +Deno-native parser and renderer for A2ML (Attested Markup Language), written in AffineScript and compiled to JavaScript ES modules. Provides parse-render round-trip support for A2ML documents with trust-level hierarchy and directive blocks. Consumed by Deno runtimes and published to JSR. ## Module Map @@ -12,7 +12,7 @@ Deno-native parser and renderer for A2ML (Attested Markup Language), written in a2ml-deno/ ├── src/ │ ├── A2ML.res # Main public API -│ ├── A2ML_Types.res # AST types (ReScript variants) +│ ├── A2ML_Types.res # AST types (AffineScript variants) │ ├── A2ML_Parser.res # Document parser │ ├── A2ML_Renderer.res # AST-to-surface renderer │ └── (compiled .mjs files co-located) diff --git a/deno/contractiles/intend/Intentfile.a2ml b/deno/contractiles/intend/Intentfile.a2ml index 140c017..8566c5e 100644 --- a/deno/contractiles/intend/Intentfile.a2ml +++ b/deno/contractiles/intend/Intentfile.a2ml @@ -8,7 +8,7 @@ Declared intent and purpose for A2Ml Deno. ## Purpose -A2Ml Deno — **Deno-native parser library for A2ML (Attested Markup Language), written in ReScript.** +A2Ml Deno — **Deno-native parser library for A2ML (Attested Markup Language), written in AffineScript.** ## Anti-Purpose diff --git a/deno/deno.json b/deno/deno.json index 10396f7..8afd0c4 100644 --- a/deno/deno.json +++ b/deno/deno.json @@ -5,13 +5,13 @@ ".": "./mod.ts" }, "tasks": { - "build": "deno run -A npm:rescript build", - "clean": "deno run -A npm:rescript clean", + "build": "deno run -A npm:affinescript build", + "clean": "deno run -A npm:affinescript clean", "test": "deno test --allow-read" }, "imports": { - "rescript": "npm:rescript@11.*", - "@rescript/core": "npm:@rescript/core@1.*" + "affinescript": "npm:affinescript@11.*", + "@affinescript/core": "npm:@affinescript/core@1.*" }, "nodeModulesDir": "auto" } diff --git a/deno/docs/RSR_OUTLINE.adoc b/deno/docs/RSR_OUTLINE.adoc index 0e46ef6..ce90052 100644 --- a/deno/docs/RSR_OUTLINE.adoc +++ b/deno/docs/RSR_OUTLINE.adoc @@ -204,8 +204,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript, Gleam -* **Tier 2** (Silver): Nickel, Guile Scheme, Nix, Idris2, OCaml +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript, Gleam +* **Tier 2** (Silver): Nickel, Guile Scheme, Guix, Idris2, OCaml * **Infrastructure**: Guix channels, derivations, Julia batch scripts === Required Files @@ -219,12 +219,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`) * npm, Bun, pnpm, yarn (use Deno) diff --git a/deno/docs/STATE-VISUALIZER.adoc b/deno/docs/STATE-VISUALIZER.adoc index 2af3297..f60a9d9 100644 --- a/deno/docs/STATE-VISUALIZER.adoc +++ b/deno/docs/STATE-VISUALIZER.adoc @@ -46,7 +46,7 @@ ┌─────────────────────────────────────────┐ │ PLATFORM INTEGRATION │ │ ┌───────────┐ ┌───────────┐ ┌───────┐│ - │ │ GitHub │ │ GitLab │ │ Nix / ││ + │ │ GitHub │ │ GitLab │ │ Guix / ││ │ │ Workflows │ │ CI/CD │ │ Guix ││ │ └───────────┘ └───────────┘ └───────┘│ └─────────────────────────────────────────┘ @@ -88,7 +88,7 @@ CONTAINER ECOSYSTEM (Phase 2) REPO INFRASTRUCTURE .machine_readable/ ██████████ 100% STATE/META/ECOSYSTEM active Governance & License ██████████ 100% PMPL & Ethical use verified - Development Shells (Nix/Guix) ██████████ 100% Reproducible env stable + Development Shells (Guix/Guix) ██████████ 100% Reproducible env stable ───────────────────────────────────────────────────────────────────────────── OVERALL: ██████████ 100% RSR Template Stable & Certified diff --git a/deno/docs/developer/ABI-FFI-README.adoc b/deno/docs/developer/ABI-FFI-README.adoc index 65d2afe..ecad1bb 100644 --- a/deno/docs/developer/ABI-FFI-README.adoc +++ b/deno/docs/developer/ABI-FFI-README.adoc @@ -44,7 +44,7 @@ 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. │ └─────────────────────────────────────────────┘ ``` @@ -76,7 +76,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/deno/docs/governance/MAINTENANCE-CHECKLIST.a2ml b/deno/docs/governance/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/deno/docs/governance/MAINTENANCE-CHECKLIST.a2ml +++ b/deno/docs/governance/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/deno/docs/practice/AI-CONVENTIONS.adoc b/deno/docs/practice/AI-CONVENTIONS.adoc index c77617a..f88ab67 100644 --- a/deno/docs/practice/AI-CONVENTIONS.adoc +++ b/deno/docs/practice/AI-CONVENTIONS.adoc @@ -53,7 +53,7 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | +| TypeScript | AffineScript | | Node.js / npm / bun | Deno | | Go | Rust | | Python | Julia / Rust | diff --git a/deno/docs/reports/audit/audit-2026-04-15-post.md b/deno/docs/reports/audit/audit-2026-04-15-post.md index 5dfbd08..4a41bb5 100644 --- a/deno/docs/reports/audit/audit-2026-04-15-post.md +++ b/deno/docs/reports/audit/audit-2026-04-15-post.md @@ -11,7 +11,7 @@ ## Findings Summary - 14 TODO/FIXME/HACK markers in .machine_readable/contractiles/k9/template-hunt.k9.ncl -- flake.nix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.nix +- flake.guix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.guix - 8 unsafe get calls in src/A2ML_Parser.res ## Final Grade diff --git a/deno/examples/SafeDOMExample.affine b/deno/examples/SafeDOMExample.affine index 9e0fd94..bcb9b09 100644 --- a/deno/examples/SafeDOMExample.affine +++ b/deno/examples/SafeDOMExample.affine @@ -1,7 +1,116 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module SafeDOMExample; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Example: Using SafeDOM for formally verified DOM mounting + +open SafeDOM + +// Example 1: Basic mounting with error handling +fn mountApp = () => { + mountSafe( + "#app", + "

Hello, World!

Mounted safely with proofs.

", + ~onSuccess=el => { + Console.log("✓ App mounted successfully!") + Console.log("Element:", el) + }, + ~onError=err => { + Console.error("✗ Mount failed:", err) + } + ) +} + +// Example 2: Wait for DOM ready before mounting +fn mountWhenDOMReady = () => { + mountWhenReady( + "#app", + "

App Title

", + ~onSuccess=_ => Console.log("✓ Mounted after DOM ready"), + ~onError=err => Console.error("✗ Failed:", err) + ) +} + +// Example 3: Batch mounting (atomic - all or nothing) +fn mountMultiple = () => { + fn specs = [ + {selector: "#header", html: "

Site Title

"}, + {selector: "#nav", html: ""}, + {selector: "#main", html: "

Content here

"}, + {selector: "#footer", html: "
© 2026
"} + ] + + switch mountBatch(specs) { + | Ok(elements) => { + Console.log(`✓ Successfully mounted ${Array.length(elements)} elements`) + elements->Array.forEach(el => Console.log(" -", el)) + } + | Error(err) => { + Console.error("✗ Batch mount failed:", err) + Console.error(" (None were mounted - atomic operation)") + } + } +} + +// Example 4: Explicit validation before mounting +fn mountWithValidation = () => { + // Validate selector first + switch ProvenSelector.validate("#my-app") { + | Error(e) => Console.error(`Invalid selector: ${e}`) + | Ok(validSelector) => { + // Validate HTML + switch ProvenHTML.validate("
Content
") { + | Error(e) => Console.error(`Invalid HTML: ${e}`) + | Ok(validHtml) => { + // Now mount with proven safety + switch mount(validSelector, validHtml) { + | Mounted(el) => Console.log("✓ Mounted with validated inputs:", el) + | MountPointNotFound(s) => Console.error(`✗ Element not found: ${s}`) + | InvalidSelector(_) => Console.error("Impossible - already validated") + | InvalidHTML(_) => Console.error("Impossible - already validated") + } + } + } + } +} + +// Example 5: Integration with TEA +module MyApp = { + struct model { {message: string} + struct msg { NoOp + + fn init = () => {message: "Hello from TEA"} + fn update = (model, _msg) => model + fn view = model => `

${model.message}

` +} + +fn mountTEAApp = () => { + fn model = MyApp.init() + fn html = MyApp.view(model) + + mountWhenReady( + "#tea-app", + html, + ~onSuccess=el => { + Console.log("✓ TEA app mounted") + // Set up event handlers, subscriptions here + }, + ~onError=err => Console.error(`✗ TEA mount failed: ${err}`) + ) +} + +// Entry point +fn main = () => { + Console.log("SafeDOM Examples") + Console.log("================\n") + + // Choose which example to run + mountWhenDOMReady() // Run on DOM ready +} + +// Auto-execute when module loads +main() + diff --git a/deno/examples/web-project-deno.json b/deno/examples/web-project-deno.json index 028e4f1..59b4a7c 100644 --- a/deno/examples/web-project-deno.json +++ b/deno/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true, diff --git a/deno/src/A2ML.affine b/deno/src/A2ML.affine index 1ded84a..7dba481 100644 --- a/deno/src/A2ML.affine +++ b/deno/src/A2ML.affine @@ -1,7 +1,72 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module A2ML; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) +// +// A2ML — Main module for the A2ML (Attested Markup Language) parser library. +// +// Re-exports the core structs, parser, and renderer for convenient access. +// This module serves as the primary entry point for library consumers. +// +// ## Usage +// +// ```rescript +// open A2ML +// +// fn result = A2ML_Parser.parseA2ML("# Hello\n\nSome text.") +// switch result { +// | Ok(doc) => Console.log(A2ML_Renderer.renderA2ML(doc)) +// | Error(err) => Console.error(A2ML_Types.parseErrorToString(err)) +// } +// ``` + +// Re-export structs for convenience +struct trustLevel { A2ML_Types.trustLevel +struct inline { A2ML_Types.inline +struct directive { A2ML_Types.directive +struct attestation { A2ML_Types.attestation +struct block { A2ML_Types.block +struct document { A2ML_Types.document +struct manifest { A2ML_Types.manifest +struct parseError { A2ML_Types.parseError + +/// Parse an A2ML document from a string. +fn parse = A2ML_Parser.parseA2ML + +/// Parse an A2ML document from a file path. +fn parseFile = A2ML_Parser.parseA2MLFile + +/// Render an A2ML document to text. +fn render = A2ML_Renderer.renderA2ML + +/// Render a single block to text. +fn renderBlock = A2ML_Renderer.renderBlock + +/// Render a single inline element to text. +fn renderInline = A2ML_Renderer.renderInline + +/// Create an empty document. +fn emptyDocument = A2ML_Types.emptyDocument + +/// Create a simple directive. +fn makeDirective = A2ML_Types.makeDirective + +/// Create an attestation. +fn makeAttestation = A2ML_Types.makeAttestation + +/// Extract a manifest from a document. +fn manifestFromDocument = A2ML_Types.manifestFromDocument + +/// Format a parse error as a diagnostic string. +fn parseErrorToString = A2ML_Types.parseErrorToString + +/// Parse a trust level from a string. +fn trustLevelFromString = A2ML_Types.trustLevelFromString + +/// Convert a trust level to its canonical string. +fn trustLevelToString = A2ML_Types.trustLevelToString + diff --git a/deno/src/A2ML_Parser.affine b/deno/src/A2ML_Parser.affine index cb38a3b..1e23192 100644 --- a/deno/src/A2ML_Parser.affine +++ b/deno/src/A2ML_Parser.affine @@ -1,7 +1,508 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module A2ML_Parser; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) +// +// A2ML_Parser — Parser for A2ML (Attested Markup Language) documents. +// +// Parses the A2ML surface syntax into the structd AST defined in A2ML_Types. +// The parser is line-oriented and processes: +// - Headings (# through #####) +// - Directive blocks (@name(attrs): ... @end) +// - Attestation blocks (!attest ... !end) +// - Inline formatting (**bold**, *italic*, `code`, [link](url), @ref(id)) +// - Bulfn lists (- item) +// - Code blocks (``` fenced blocks) + +open A2ML_Types + +// --------------------------------------------------------------------------- +// Inline parsing helpers +// --------------------------------------------------------------------------- + +/// Parse a single line of text into inline elements. +/// Handles **bold**, *italic*, `code`, [text](url), and @ref(id). +fn parseInlines = (text: string): array => { + fn result = [] + fn len = text->String.length + fn i = ref(0) + fn buf = ref("") + + // Flush accumulated plain text into the result array + fn flushBuf = () => { + if buf.contents->String.length > 0 { + result->Array.push(Text(buf.contents))->ignore + buf := "" + } + } + + while i.contents < len { + fn ch = text->String.charAt(i.contents) + fn remaining = text->String.sliceToEnd(~start=i.contents) + + // **bold** + if remaining->String.startsWith("**") { + flushBuf() + fn closeIdx = text->String.indexOfFrom("**", i.contents + 2) + if closeIdx >= 0 { + fn inner = text->String.slice(~start=i.contents + 2, ~end=closeIdx) + result->Array.push(Strong([Text(inner)]))->ignore + i := closeIdx + 2 + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } + // *italic* + else if ch == "*" && !(remaining->String.startsWith("**")) { + flushBuf() + fn closeIdx = text->String.indexOfFrom("*", i.contents + 1) + if closeIdx >= 0 { + fn inner = text->String.slice(~start=i.contents + 1, ~end=closeIdx) + result->Array.push(Emphasis([Text(inner)]))->ignore + i := closeIdx + 1 + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } + // `code` + else if ch == "`" { + flushBuf() + fn closeIdx = text->String.indexOfFrom("`", i.contents + 1) + if closeIdx >= 0 { + fn inner = text->String.slice(~start=i.contents + 1, ~end=closeIdx) + result->Array.push(Code(inner))->ignore + i := closeIdx + 1 + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } + // [text](url) + else if ch == "[" { + flushBuf() + fn closeBracket = text->String.indexOfFrom("]", i.contents + 1) + if closeBracket >= 0 { + fn afterBracket = text->String.charAt(closeBracket + 1) + if afterBracket == "(" { + fn closeParen = text->String.indexOfFrom(")", closeBracket + 2) + if closeParen >= 0 { + fn linkText = text->String.slice(~start=i.contents + 1, ~end=closeBracket) + fn linkUrl = text->String.slice(~start=closeBracket + 2, ~end=closeParen) + result->Array.push(Link({content: [Text(linkText)], url: linkUrl}))->ignore + i := closeParen + 1 + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } + // @ref(id) + else if remaining->String.startsWith("@ref(") { + flushBuf() + fn closeParen = text->String.indexOfFrom(")", i.contents + 5) + if closeParen >= 0 { + fn refId = text->String.slice(~start=i.contents + 5, ~end=closeParen) + result->Array.push(InlineRef(refId))->ignore + i := closeParen + 1 + } else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } + // Plain text + else { + buf := buf.contents ++ ch + i := i.contents + 1 + } + } + + flushBuf() + result +} + +// --------------------------------------------------------------------------- +// Directive attribute parsing +// --------------------------------------------------------------------------- + +/// Parse directive attributes from a parenthesised string like "(key=val, key2=val2)". +fn parseAttributes = (attrStr: string): array<(string, string)> => { + if attrStr->String.length == 0 { + [] + } else { + attrStr + ->String.split(",") + ->Array.filterMap(pair => { + fn trimmed = pair->String.trim + fn eqIdx = trimmed->String.indexOf("=") + if eqIdx >= 0 { + fn key = trimmed->String.slice(~start=0, ~end=eqIdx)->String.trim + fn value = trimmed->String.sliceToEnd(~start=eqIdx + 1)->String.trim + Some((key, value)) + } else { + None + } + }) + } +} + +// --------------------------------------------------------------------------- +// Block-level parser +// --------------------------------------------------------------------------- + +/// Internal state for the line-oriented parser. +struct parserState { { + mutable lineIndex: int, + lines: array, + blocks: array, + directives: array, + attestations: array, + mutable title: option, +} + +/// Count the number of leading '#' characters on a line. +fn countHashes = (line: string): int => { + fn count = ref(0) + fn len = line->String.length + while count.contents < len && line->String.charAt(count.contents) == "#" { + count := count.contents + 1 + } + count.contents +} + +/// Parse a directive block starting with @name or @name(attrs): +/// Reads lines until @end is encountered. +fn parseDirectiveBlock = (state: parserState): result => { + fn startLine = state.lineIndex + fn line = state.lines->Array.getUnsafe(startLine)->String.trim + + // Extract directive name and optional attributes + // Formats: @name: body or @name(attrs): body or @name:\n multi-line \n @end + fn afterAt = line->String.sliceToEnd(~start=1) + + // Check for parenthesised attributes + fn (name, attributes) = { + fn parenIdx = afterAt->String.indexOf("(") + if parenIdx >= 0 { + fn closeParenIdx = afterAt->String.indexOf(")") + if closeParenIdx > parenIdx { + fn dirName = afterAt->String.slice(~start=0, ~end=parenIdx)->String.trim + fn attrStr = afterAt->String.slice(~start=parenIdx + 1, ~end=closeParenIdx) + (dirName, parseAttributes(attrStr)) + } else { + fn colonIdx = afterAt->String.indexOf(":") + fn dirName = if colonIdx >= 0 { + afterAt->String.slice(~start=0, ~end=colonIdx)->String.trim + } else { + afterAt->String.trim + } + (dirName, []) + } + } else { + fn colonIdx = afterAt->String.indexOf(":") + fn dirName = if colonIdx >= 0 { + afterAt->String.slice(~start=0, ~end=colonIdx)->String.trim + } else { + afterAt->String.trim + } + (dirName, []) + } + } + + // Extract inline body (text after the colon on the same line) + fn colonIdx = line->String.indexOf(":") + fn inlineBody = if colonIdx >= 0 { + line->String.sliceToEnd(~start=colonIdx + 1)->String.trim + } else { + "" + } + + // Check if this is a single-line directive (no @end needed) + if inlineBody->String.length > 0 { + state.lineIndex = state.lineIndex + 1 + Ok({name, value: inlineBody, attributes}) + } else { + // Multi-line directive: read until @end + state.lineIndex = state.lineIndex + 1 + fn bodyLines = [] + fn found = ref(false) + while state.lineIndex < state.lines->Array.length && !found.contents { + fn currentLine = state.lines->Array.getUnsafe(state.lineIndex) + if currentLine->String.trim == "@end" { + found := true + state.lineIndex = state.lineIndex + 1 + } else { + bodyLines->Array.push(currentLine)->ignore + state.lineIndex = state.lineIndex + 1 + } + } + if found.contents { + Ok({name, value: bodyLines->Array.join("\n"), attributes}) + } else { + Error(UnterminatedDirective({line: startLine + 1, name})) + } + } +} + +/// Parse an attestation block starting with !attest. +/// Format: +/// !attest +/// identity: +/// role: +/// trust-level: +/// timestamp: (optional) +/// note: (optional) +/// !end +fn parseAttestationBlock = (state: parserState): result => { + fn startLine = state.lineIndex + state.lineIndex = state.lineIndex + 1 + + fn identity = ref("") + fn role = ref("") + fn trustLvl = ref(Unverified) + fn timestamp = ref(None) + fn note = ref(None) + fn found = ref(false) + + while state.lineIndex < state.lines->Array.length && !found.contents { + fn currentLine = state.lines->Array.getUnsafe(state.lineIndex)->String.trim + if currentLine == "!end" { + found := true + state.lineIndex = state.lineIndex + 1 + } else { + fn colonIdx = currentLine->String.indexOf(":") + if colonIdx >= 0 { + fn key = currentLine->String.slice(~start=0, ~end=colonIdx)->String.trim + fn value = currentLine->String.sliceToEnd(~start=colonIdx + 1)->String.trim + switch key { + | "identity" => identity := value + | "role" => role := value + | "trust-level" => + switch trustLevelFromString(value) { + | Some(lvl) => trustLvl := lvl + | None => () // Default to Unverified if unrecognised + } + | "timestamp" => timestamp := Some(value) + | "note" => note := Some(value) + | _ => () // Ignore unknown fields + } + } + state.lineIndex = state.lineIndex + 1 + } + } + + if found.contents { + Ok({ + identity: identity.contents, + role: role.contents, + trustLevel: trustLvl.contents, + timestamp: timestamp.contents, + note: note.contents, + }) + } else { + Error(UnexpectedToken({line: startLine + 1, token: "unterminated !attest block"})) + } +} + +// --------------------------------------------------------------------------- +// Public API +// --------------------------------------------------------------------------- + +/// Parse an A2ML document from a string. +/// +/// Returns either a parseError or the parsed document. +/// +/// ### Example +/// ``` +/// fn result = parseA2ML("# Hello\n\nSome text.\n") +/// ``` +fn parseA2ML = (input: string): result => { + fn trimmed = input->String.trim + if trimmed->String.length == 0 { + Error(EmptyDocument) + } else { + fn lines = input->String.split("\n") + fn state: parserState = { + lineIndex: 0, + lines, + blocks: [], + directives: [], + attestations: [], + title: None, + } + + fn error = ref(None) + + while state.lineIndex < lines->Array.length && error.contents->Option.isNone { + fn line = lines->Array.getUnsafe(state.lineIndex) + fn trimmedLine = line->String.trim + + // Blank line + if trimmedLine->String.length == 0 { + state.blocks->Array.push(BlankLine)->ignore + state.lineIndex = state.lineIndex + 1 + } + // Thematic break (--- or ***) + else if trimmedLine == "---" || trimmedLine == "***" || trimmedLine == "___" { + state.blocks->Array.push(ThematicBreak)->ignore + state.lineIndex = state.lineIndex + 1 + } + // Fenced code block (```) + else if trimmedLine->String.startsWith("```") { + fn lang = trimmedLine->String.sliceToEnd(~start=3)->String.trim + fn language = if lang->String.length > 0 { + Some(lang) + } else { + None + } + state.lineIndex = state.lineIndex + 1 + fn codeLines = [] + fn closed = ref(false) + while state.lineIndex < lines->Array.length && !closed.contents { + fn codeLine = lines->Array.getUnsafe(state.lineIndex) + if codeLine->String.trim->String.startsWith("```") { + closed := true + state.lineIndex = state.lineIndex + 1 + } else { + codeLines->Array.push(codeLine)->ignore + state.lineIndex = state.lineIndex + 1 + } + } + state.blocks + ->Array.push(CodeBlock({language, content: codeLines->Array.join("\n")})) + ->ignore + } + // Heading (# through #####) + else if trimmedLine->String.startsWith("#") { + fn level = countHashes(trimmedLine) + if level >= 1 && level <= 5 { + fn headingText = trimmedLine->String.sliceToEnd(~start=level)->String.trim + fn inlines = parseInlines(headingText) + // Extract title from first H1 heading + if level == 1 && state.title->Option.isNone { + state.title = Some(headingText) + } + state.blocks->Array.push(Heading({level, content: inlines}))->ignore + state.lineIndex = state.lineIndex + 1 + } else { + error := Some(InvalidHeadingLevel({line: state.lineIndex + 1, level})) + } + } + // Directive block (@name...) + else if trimmedLine->String.startsWith("@") && trimmedLine != "@end" { + switch parseDirectiveBlock(state) { + | Ok(dir) => + state.directives->Array.push(dir)->ignore + state.blocks->Array.push(DirectiveBlock(dir))->ignore + | Error(err) => error := Some(err) + } + } + // Attestation block (!attest) + else if trimmedLine->String.startsWith("!attest") { + switch parseAttestationBlock(state) { + | Ok(att) => + state.attestations->Array.push(att)->ignore + state.blocks->Array.push(AttestationBlock(att))->ignore + | Error(err) => error := Some(err) + } + } + // Block quote (> ...) + else if trimmedLine->String.startsWith("> ") { + fn quoteLines = [] + fn done = ref(false) + while state.lineIndex < lines->Array.length && !done.contents { + fn ql = lines->Array.getUnsafe(state.lineIndex)->String.trim + if ql->String.startsWith("> ") { + quoteLines->Array.push(ql->String.sliceToEnd(~start=2))->ignore + state.lineIndex = state.lineIndex + 1 + } else { + done := true + } + } + fn quoteText = quoteLines->Array.join("\n") + state.blocks + ->Array.push(BlockQuote([Paragraph(parseInlines(quoteText))])) + ->ignore + } + // Bulfn list (- item) + else if trimmedLine->String.startsWith("- ") || trimmedLine->String.startsWith("* ") { + fn items = [] + fn done = ref(false) + while state.lineIndex < lines->Array.length && !done.contents { + fn listLine = lines->Array.getUnsafe(state.lineIndex)->String.trim + if listLine->String.startsWith("- ") || listLine->String.startsWith("* ") { + fn itemText = listLine->String.sliceToEnd(~start=2)->String.trim + items->Array.push(parseInlines(itemText))->ignore + state.lineIndex = state.lineIndex + 1 + } else { + done := true + } + } + state.blocks->Array.push(BulletList(items))->ignore + } + // Paragraph (default) + else { + fn paraLines = [] + fn done = ref(false) + while state.lineIndex < lines->Array.length && !done.contents { + fn pl = lines->Array.getUnsafe(state.lineIndex)->String.trim + if ( + pl->String.length > 0 && + !(pl->String.startsWith("#")) && + !(pl->String.startsWith("@")) && + !(pl->String.startsWith("!attest")) && + !(pl->String.startsWith("```")) && + !(pl->String.startsWith("- ")) && + !(pl->String.startsWith("* ")) && + !(pl->String.startsWith("> ")) && + pl != "---" && + pl != "***" && + pl != "___" + ) { + paraLines->Array.push(pl)->ignore + state.lineIndex = state.lineIndex + 1 + } else { + done := true + } + } + fn paraText = paraLines->Array.join(" ") + state.blocks->Array.push(Paragraph(parseInlines(paraText)))->ignore + } + } + + switch error.contents { + | Some(err) => Error(err) + | None => + Ok({ + title: state.title, + directives: state.directives, + blocks: state.blocks, + attestations: state.attestations, + }) + } + } +} + +/// Parse an A2ML document from a file path (Deno-compatible). +/// Uses Deno.readTextFile under the hood. +/// Returns a Promise resolving to Result. +@module("node:fs") +external readFileSync: (string, string) => string = "readFileSync" + +fn parseA2MLFile = (path: string): result => { + fn content = readFileSync(path, "utf-8") + parseA2ML(content) +} + diff --git a/deno/src/A2ML_Renderer.affine b/deno/src/A2ML_Renderer.affine index b0632b9..9e4075e 100644 --- a/deno/src/A2ML_Renderer.affine +++ b/deno/src/A2ML_Renderer.affine @@ -1,7 +1,134 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module A2ML_Renderer; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) +// +// A2ML_Renderer — Render A2ML AST back to A2ML surface syntax. +// +// Converts the structd AST from A2ML_Types into A2ML text format, +// preserving structure and formatting conventions. Produces output +// compatible with the A2ML parser for round-trip fidelity. + +open A2ML_Types + +// --------------------------------------------------------------------------- +// Inline rendering +// --------------------------------------------------------------------------- + +/// Render a single inline element to A2ML text. +fn rec renderInline = (inl: inline): string => { + switch inl { + | Text(t) => t + | Emphasis(children) => "*" ++ renderInlines(children) ++ "*" + | Strong(children) => "**" ++ renderInlines(children) ++ "**" + | Code(c) => "`" ++ c ++ "`" + | Link({content, url}) => "[" ++ renderInlines(content) ++ "](" ++ url ++ ")" + | InlineRef(refId) => "@ref(" ++ refId ++ ")" + } +} + +/// Render a list of inline elements to text. +and renderInlines = (inlines: array): string => { + inlines->Array.map(renderInline)->Array.join("") +} + +// --------------------------------------------------------------------------- +// Directive rendering +// --------------------------------------------------------------------------- + +/// Render a directive to A2ML surface syntax. +/// Single-line directives use `@name: value` format. +/// Multi-line directives use `@name:\n...\n@end` format. +fn renderDirective = (dir: directive): string => { + fn attrStr = if dir.attributes->Array.length > 0 { + fn pairs = + dir.attributes + ->Array.map(((k, v)) => k ++ "=" ++ v) + ->Array.join(", ") + "(" ++ pairs ++ ")" + } else { + "" + } + + fn hasNewlines = dir.value->String.includes("\n") + if hasNewlines { + "@" ++ dir.name ++ attrStr ++ ":\n" ++ dir.value ++ "\n@end" + } else { + "@" ++ dir.name ++ attrStr ++ ": " ++ dir.value + } +} + +// --------------------------------------------------------------------------- +// Attestation rendering +// --------------------------------------------------------------------------- + +/// Render an attestation block to A2ML surface syntax. +fn renderAttestation = (att: attestation): string => { + fn lines = [ + "!attest", + "identity: " ++ att.identity, + "role: " ++ att.role, + "trust-level: " ++ trustLevelToString(att.trustLevel), + ] + + switch att.timestamp { + | Some(ts) => lines->Array.push("timestamp: " ++ ts)->ignore + | None => () + } + + switch att.note { + | Some(n) => lines->Array.push("note: " ++ n)->ignore + | None => () + } + + lines->Array.push("!end")->ignore + lines->Array.join("\n") +} + +// --------------------------------------------------------------------------- +// Block rendering +// --------------------------------------------------------------------------- + +/// Render a single block to A2ML text. +fn rec renderBlock = (blk: block): string => { + switch blk { + | Heading({level, content}) => + fn hashes = Array.make(~length=level, "#")->Array.join("") + hashes ++ " " ++ renderInlines(content) + | Paragraph(inlines) => renderInlines(inlines) + | CodeBlock({language, content}) => + fn langTag = switch language { + | Some(l) => l + | None => "" + } + "```" ++ langTag ++ "\n" ++ content ++ "\n```" + | DirectiveBlock(dir) => renderDirective(dir) + | AttestationBlock(att) => renderAttestation(att) + | ThematicBreak => "---" + | BlockQuote(blocks) => + blocks->Array.map(b => "> " ++ renderBlock(b))->Array.join("\n") + | BulletList(items) => + items->Array.map(inlines => "- " ++ renderInlines(inlines))->Array.join("\n") + | BlankLine => "" + } +} + +// --------------------------------------------------------------------------- +// Document rendering +// --------------------------------------------------------------------------- + +/// Render a complete A2ML document to text. +/// +/// ### Example +/// ``` +/// fn doc = { title: Some("Hello"), directives: [], blocks: [...], attestations: [] } +/// fn text = renderA2ML(doc) +/// ``` +fn renderA2ML = (doc: document): string => { + doc.blocks->Array.map(renderBlock)->Array.join("\n") ++ "\n" +} + diff --git a/deno/src/A2ML_Types.affine b/deno/src/A2ML_Types.affine index 0ea0073..d007fb6 100644 --- a/deno/src/A2ML_Types.affine +++ b/deno/src/A2ML_Types.affine @@ -1,7 +1,200 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module A2ML_Types; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) +// +// A2ML_Types — Core data structs for A2ML (Attested Markup Language) documents. +// +// Defines the abstract syntax tree for A2ML documents including document +// structure, block-level elements, inline formatting, directives, and +// attestation provenance records with trust levels. + +// --------------------------------------------------------------------------- +// Trust levels +// --------------------------------------------------------------------------- + +/// The degree of trust associated with an attestation. +/// Forms an ordered scale from unverified content through to formally verified. +struct trustLevel { + | Unverified + | Automated + | Reviewed + | Verified + +/// Parse a trust level from its canonical string representation. +/// Recognised values (case-insensitive): "unverified", "automated", +/// "reviewed", "verified". +fn trustLevelFromString = (s: string): option => { + switch s->String.toLowerCase { + | "unverified" => Some(Unverified) + | "automated" => Some(Automated) + | "reviewed" => Some(Reviewed) + | "verified" => Some(Verified) + | _ => None + } +} + +/// Return the canonical string representation of a trust level. +fn trustLevelToString = (level: trustLevel): string => { + switch level { + | Unverified => "unverified" + | Automated => "automated" + | Reviewed => "reviewed" + | Verified => "verified" + } +} + +// --------------------------------------------------------------------------- +// Inline-level elements +// --------------------------------------------------------------------------- + +/// An inline-level element within a block. +struct rec inline = + | Text(string) + | Emphasis(array) + | Strong(array) + | Code(string) + | Link({content: array, url: string}) + | InlineRef(string) + +// --------------------------------------------------------------------------- +// Directives +// --------------------------------------------------------------------------- + +/// A machine-readable directive that provides metadata or instructions. +/// Directives begin with `@` in the source text, e.g. +/// `@version 1.0` or `@require trust-level:high`. +struct directive { { + name: string, + value: string, + attributes: array<(string, string)>, +} + +/// Create a simple directive with a name and value, and no attributes. +fn makeDirective = (name: string, value: string): directive => { + name, + value, + attributes: [], +} + +// --------------------------------------------------------------------------- +// Attestations +// --------------------------------------------------------------------------- + +/// An attestation record capturing who produced or reviewed content. +/// Attestation blocks start with `!attest` and record identity, +/// role, trust level, and optional timestamp of an author or reviewer. +struct attestation { { + identity: string, + role: string, + trustLevel: trustLevel, + timestamp: option, + note: option, +} + +/// Create a new attestation with the minimum required fields. +fn makeAttestation = ( + ~identity: string, + ~role: string, + ~trustLevel: trustLevel, +): attestation => { + identity, + role, + trustLevel, + timestamp: None, + note: None, +} + +// --------------------------------------------------------------------------- +// Block-level elements +// --------------------------------------------------------------------------- + +/// A block-level element in an A2ML document. +/// Blocks are separated by blank lines in the source text. +struct rec block = + | Heading({level: int, content: array}) + | Paragraph(array) + | CodeBlock({language: option, content: string}) + | DirectiveBlock(directive) + | AttestationBlock(attestation) + | ThematicBreak + | BlockQuote(array) + | BulletList(array>) + | BlankLine + +// --------------------------------------------------------------------------- +// Top-level document +// --------------------------------------------------------------------------- + +/// A complete A2ML document, containing metadata and a sequence of blocks. +struct document { { + title: option, + directives: array, + blocks: array, + attestations: array, +} + +/// Create a new, empty document with no title or content. +fn emptyDocument = (): document => { + title: None, + directives: [], + blocks: [], + attestations: [], +} + +// --------------------------------------------------------------------------- +// Manifest (convenience aggregate) +// --------------------------------------------------------------------------- + +/// A high-level manifest extracted from a parsed A2ML document. +/// Collects directives and attestations for convenient programmatic access. +struct manifest { { + version: option, + title: option, + directives: array, + attestations: array, +} + +/// Extract a manifest from a parsed document. +fn manifestFromDocument = (doc: document): manifest => { + fn version = + doc.directives + ->Array.find(d => d.name == "version") + ->Option.map(d => d.value) + + { + version, + title: doc.title, + directives: doc.directives, + attestations: doc.attestations, + } +} + +// --------------------------------------------------------------------------- +// Parse errors +// --------------------------------------------------------------------------- + +/// Errors that can occur during A2ML parsing. +struct parseError { + | UnterminatedDirective({line: int, name: string}) + | InvalidHeadingLevel({line: int, level: int}) + | UnexpectedToken({line: int, token: string}) + | EmptyDocument + +/// Format a parse error as a diagnostic string. +fn parseErrorToString = (err: parseError): string => { + switch err { + | UnterminatedDirective({line, name}) => + `error[A2ML]: line ${line->Int.toString}: unterminated directive @${name}` + | InvalidHeadingLevel({line, level}) => + `error[A2ML]: line ${line->Int.toString}: invalid heading level ${level->Int.toString} (must be 1-5)` + | UnexpectedToken({line, token}) => + `error[A2ML]: line ${line->Int.toString}: unexpected token "${token}"` + | EmptyDocument => "error[A2ML]: document is empty" + } +} + diff --git a/ex/CONTRIBUTING.md b/ex/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/ex/CONTRIBUTING.md +++ b/ex/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/ex/EXPLAINME.adoc b/ex/EXPLAINME.adoc index 826d0d3..1955a11 100644 --- a/ex/EXPLAINME.adoc +++ b/ex/EXPLAINME.adoc @@ -30,7 +30,7 @@ The `A2ML.Types.TrustLevel` enum in `lib/a2ml/types.ex` defines a four-tier hier a2ml_ex is part of the A2ML ecosystem, which includes: -* link:https://github.com/hyperpolymath/a2ml-deno[a2ml-deno] — Deno/ReScript implementation (primary) +* link:https://github.com/hyperpolymath/a2ml-deno[a2ml-deno] — Deno/AffineScript implementation (primary) * link:https://github.com/hyperpolymath/tree-sitter-a2ml[tree-sitter-a2ml] — Tree-sitter grammar for syntax highlighting * link:https://github.com/hyperpolymath/a2ml-haskell[a2ml-haskell] — Haskell implementation * link:https://github.com/hyperpolymath/standards[standards] — A2ML spec (K9 service specification) diff --git a/ex/README.md b/ex/README.md index 1731866..e8d34c3 100644 --- a/ex/README.md +++ b/ex/README.md @@ -131,7 +131,7 @@ config :a2ml_ex, # Related Libraries - [a2ml-deno](https://github.com/hyperpolymath/a2ml-deno) — - Deno/ReScript implementation + Deno/AffineScript implementation - [a2ml-rs](https://github.com/hyperpolymath/a2ml-rs) — Rust implementation diff --git a/ex/a2ml_ex-0.1.0/README.adoc b/ex/a2ml_ex-0.1.0/README.adoc index 0191b94..6bc9188 100644 --- a/ex/a2ml_ex-0.1.0/README.adoc +++ b/ex/a2ml_ex-0.1.0/README.adoc @@ -143,7 +143,7 @@ config :a2ml_ex, == Related Libraries -* link:https://github.com/hyperpolymath/a2ml-deno[a2ml-deno] — Deno/ReScript implementation +* link:https://github.com/hyperpolymath/a2ml-deno[a2ml-deno] — Deno/AffineScript implementation * link:https://github.com/hyperpolymath/a2ml-rs[a2ml-rs] — Rust implementation * link:https://github.com/hyperpolymath/a2ml-haskell[a2ml-haskell] — Haskell implementation * link:https://github.com/hyperpolymath/a2ml_gleam[a2ml_gleam] — Gleam implementation diff --git a/gleam/CONTRIBUTING.md b/gleam/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/gleam/CONTRIBUTING.md +++ b/gleam/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/haskell/.machine_readable/6a2/META.a2ml b/haskell/.machine_readable/6a2/META.a2ml index d9b09e6..ba3375c 100644 --- a/haskell/.machine_readable/6a2/META.a2ml +++ b/haskell/.machine_readable/6a2/META.a2ml @@ -22,7 +22,7 @@ author = "Jonathan D.A. Jewell (hyperpolymath)" build-tool = "just" container-runtime = "podman" ci-platform = "github-actions" -package-manager = "guix" # guix | nix | cargo | mix +package-manager = "guix" # guix | guix | cargo | mix [maintenance-axes] scoping-first = true @@ -46,7 +46,7 @@ perfective-source = "axis-1 honest state after corrective/adaptive updates" [axis-3-audit-rules] audit-focus = "systems in place, documentation explains actual state, safety/security accounted for, observed effects reviewed" compliance-focus = "seams/compromises/exception register, bounded exceptions, anti-drift checks" -drift-risk-example = "single exception broadening into policy violation (e.g. ReScript->TypeScript spread)" +drift-risk-example = "single exception broadening into policy violation (e.g. AffineScript->TypeScript spread)" effects-evidence = "benchmark execution/results and maintainer status dialogue/review" [design-rationale] diff --git a/haskell/.machine_readable/6a2/STATE.a2ml b/haskell/.machine_readable/6a2/STATE.a2ml index 9e17d94..f1f9bdf 100644 --- a/haskell/.machine_readable/6a2/STATE.a2ml +++ b/haskell/.machine_readable/6a2/STATE.a2ml @@ -32,7 +32,7 @@ milestones = [ { name = "Phase 1e: Trustfile / contractiles", completion = 100 }, { name = "Phase 2: Container ecosystem templates (stapeln)", completion = 100 }, { name = "Phase 3: Multi-forge sync hardening", completion = 0 }, - { name = "Phase 4: Nix/Guix reproducible shells", completion = 50 }, + { name = "Phase 4: Guix/Guix reproducible shells", completion = 50 }, ] [blockers-and-issues] @@ -43,7 +43,7 @@ actions = [ "Container templates complete — test with `just container-init`", "Validate container templates across wolfi-base and static Chainguard images", "Harden multi-forge sync for GitLab/Bitbucket mirroring edge cases", - "Expand Nix/Guix development shell templates", + "Expand Guix/Guix development shell templates", ] [maintenance-status] diff --git a/haskell/.machine_readable/ai/PLACEHOLDERS.adoc b/haskell/.machine_readable/ai/PLACEHOLDERS.adoc index 3eb3693..1f36ec8 100644 --- a/haskell/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/haskell/.machine_readable/ai/PLACEHOLDERS.adoc @@ -48,8 +48,8 @@ sed -i "s/2026-07-08/$(date +%Y-%m-%d)/g" $(grep -rl '2026-07-08' .) | Placeholder | Description | Example | Files | |---|---|---|---| -| `a2ml-haskell` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json | -| `a2ml-haskell` | One-line description | `A tool for X` | flake.nix | +| `a2ml-haskell` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.guix, devcontainer.json | +| `a2ml-haskell` | One-line description | `A tool for X` | flake.guix | | `a2ml-haskell` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig | | `{{project}}` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig | | `a2ml-haskell` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml | @@ -133,7 +133,7 @@ After replacing all placeholders, verify none remain: ```bash grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \ --include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \ - --include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \ + --include='Justfile' --include='*.guix' --include='*.toml' --include='*.yml' \ --include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \ --include='*.json' --include='Containerfile' --include='dep5' \ | grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules' diff --git a/haskell/.machine_readable/contractiles/lust/Intentfile.a2ml b/haskell/.machine_readable/contractiles/lust/Intentfile.a2ml index f75d38e..53287e5 100644 --- a/haskell/.machine_readable/contractiles/lust/Intentfile.a2ml +++ b/haskell/.machine_readable/contractiles/lust/Intentfile.a2ml @@ -16,7 +16,7 @@ design philosophy — not current state, but target state. ### reproducible-builds - description: Builds should be bit-for-bit reproducible -- target: Guix + Nix + Containerfile +- target: Guix + Guix + Containerfile - status: aspiration ### zero-dangerous-patterns diff --git a/haskell/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml b/haskell/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/haskell/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml +++ b/haskell/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/haskell/CONTRIBUTING.md b/haskell/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/haskell/CONTRIBUTING.md +++ b/haskell/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/haskell/Justfile b/haskell/Justfile index da385a0..24db05d 100644 --- a/haskell/Justfile +++ b/haskell/Justfile @@ -235,7 +235,7 @@ init: # Check for remaining placeholders PATTERN="${LB}[A-Z_]*${RB}" - REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.nix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) + REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.guix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) if [ -n "$REMAINING" ]; then echo "WARNING: Remaining placeholders in:" echo "$REMAINING" | sed 's/^/ /' @@ -272,7 +272,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -791,7 +791,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) @@ -802,9 +802,9 @@ guix-shell: guix-build: guix build -f guix.scm -# Enter Nix development shell (fallback) -nix-shell: - @if [ -f "flake.nix" ]; then nix develop; else echo "No flake.nix"; fi +# Enter Guix development shell (fallback) +guix-shell: + @if [ -f "flake.guix" ]; then guix develop; else echo "No flake.guix"; fi # ═══════════════════════════════════════════════════════════════════════════════ # HYBRID AUTOMATION diff --git a/haskell/docs/RSR_OUTLINE.adoc b/haskell/docs/RSR_OUTLINE.adoc index 0e46ef6..ce90052 100644 --- a/haskell/docs/RSR_OUTLINE.adoc +++ b/haskell/docs/RSR_OUTLINE.adoc @@ -204,8 +204,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript, Gleam -* **Tier 2** (Silver): Nickel, Guile Scheme, Nix, Idris2, OCaml +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript, Gleam +* **Tier 2** (Silver): Nickel, Guile Scheme, Guix, Idris2, OCaml * **Infrastructure**: Guix channels, derivations, Julia batch scripts === Required Files @@ -219,12 +219,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`) * npm, Bun, pnpm, yarn (use Deno) diff --git a/haskell/docs/STATE-VISUALIZER.adoc b/haskell/docs/STATE-VISUALIZER.adoc index 2af3297..f60a9d9 100644 --- a/haskell/docs/STATE-VISUALIZER.adoc +++ b/haskell/docs/STATE-VISUALIZER.adoc @@ -46,7 +46,7 @@ ┌─────────────────────────────────────────┐ │ PLATFORM INTEGRATION │ │ ┌───────────┐ ┌───────────┐ ┌───────┐│ - │ │ GitHub │ │ GitLab │ │ Nix / ││ + │ │ GitHub │ │ GitLab │ │ Guix / ││ │ │ Workflows │ │ CI/CD │ │ Guix ││ │ └───────────┘ └───────────┘ └───────┘│ └─────────────────────────────────────────┘ @@ -88,7 +88,7 @@ CONTAINER ECOSYSTEM (Phase 2) REPO INFRASTRUCTURE .machine_readable/ ██████████ 100% STATE/META/ECOSYSTEM active Governance & License ██████████ 100% PMPL & Ethical use verified - Development Shells (Nix/Guix) ██████████ 100% Reproducible env stable + Development Shells (Guix/Guix) ██████████ 100% Reproducible env stable ───────────────────────────────────────────────────────────────────────────── OVERALL: ██████████ 100% RSR Template Stable & Certified diff --git a/haskell/docs/developer/ABI-FFI-README.adoc b/haskell/docs/developer/ABI-FFI-README.adoc index 24a07c9..1b7c53e 100644 --- a/haskell/docs/developer/ABI-FFI-README.adoc +++ b/haskell/docs/developer/ABI-FFI-README.adoc @@ -44,7 +44,7 @@ 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. │ └─────────────────────────────────────────────┘ ``` @@ -76,7 +76,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/haskell/docs/governance/MAINTENANCE-CHECKLIST.a2ml b/haskell/docs/governance/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/haskell/docs/governance/MAINTENANCE-CHECKLIST.a2ml +++ b/haskell/docs/governance/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/haskell/docs/practice/AI-CONVENTIONS.adoc b/haskell/docs/practice/AI-CONVENTIONS.adoc index 58e132b..6a3636b 100644 --- a/haskell/docs/practice/AI-CONVENTIONS.adoc +++ b/haskell/docs/practice/AI-CONVENTIONS.adoc @@ -53,7 +53,7 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | +| TypeScript | AffineScript | | Node.js / npm / bun | Deno | | Go | Rust | | Python | Julia / Rust | diff --git a/haskell/examples/SafeDOMExample.affine b/haskell/examples/SafeDOMExample.affine index 9e0fd94..bcb9b09 100644 --- a/haskell/examples/SafeDOMExample.affine +++ b/haskell/examples/SafeDOMExample.affine @@ -1,7 +1,116 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module SafeDOMExample; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Example: Using SafeDOM for formally verified DOM mounting + +open SafeDOM + +// Example 1: Basic mounting with error handling +fn mountApp = () => { + mountSafe( + "#app", + "

Hello, World!

Mounted safely with proofs.

", + ~onSuccess=el => { + Console.log("✓ App mounted successfully!") + Console.log("Element:", el) + }, + ~onError=err => { + Console.error("✗ Mount failed:", err) + } + ) +} + +// Example 2: Wait for DOM ready before mounting +fn mountWhenDOMReady = () => { + mountWhenReady( + "#app", + "

App Title

", + ~onSuccess=_ => Console.log("✓ Mounted after DOM ready"), + ~onError=err => Console.error("✗ Failed:", err) + ) +} + +// Example 3: Batch mounting (atomic - all or nothing) +fn mountMultiple = () => { + fn specs = [ + {selector: "#header", html: "

Site Title

"}, + {selector: "#nav", html: ""}, + {selector: "#main", html: "

Content here

"}, + {selector: "#footer", html: "
© 2026
"} + ] + + switch mountBatch(specs) { + | Ok(elements) => { + Console.log(`✓ Successfully mounted ${Array.length(elements)} elements`) + elements->Array.forEach(el => Console.log(" -", el)) + } + | Error(err) => { + Console.error("✗ Batch mount failed:", err) + Console.error(" (None were mounted - atomic operation)") + } + } +} + +// Example 4: Explicit validation before mounting +fn mountWithValidation = () => { + // Validate selector first + switch ProvenSelector.validate("#my-app") { + | Error(e) => Console.error(`Invalid selector: ${e}`) + | Ok(validSelector) => { + // Validate HTML + switch ProvenHTML.validate("
Content
") { + | Error(e) => Console.error(`Invalid HTML: ${e}`) + | Ok(validHtml) => { + // Now mount with proven safety + switch mount(validSelector, validHtml) { + | Mounted(el) => Console.log("✓ Mounted with validated inputs:", el) + | MountPointNotFound(s) => Console.error(`✗ Element not found: ${s}`) + | InvalidSelector(_) => Console.error("Impossible - already validated") + | InvalidHTML(_) => Console.error("Impossible - already validated") + } + } + } + } +} + +// Example 5: Integration with TEA +module MyApp = { + struct model { {message: string} + struct msg { NoOp + + fn init = () => {message: "Hello from TEA"} + fn update = (model, _msg) => model + fn view = model => `

${model.message}

` +} + +fn mountTEAApp = () => { + fn model = MyApp.init() + fn html = MyApp.view(model) + + mountWhenReady( + "#tea-app", + html, + ~onSuccess=el => { + Console.log("✓ TEA app mounted") + // Set up event handlers, subscriptions here + }, + ~onError=err => Console.error(`✗ TEA mount failed: ${err}`) + ) +} + +// Entry point +fn main = () => { + Console.log("SafeDOM Examples") + Console.log("================\n") + + // Choose which example to run + mountWhenDOMReady() // Run on DOM ready +} + +// Auto-execute when module loads +main() + diff --git a/haskell/examples/web-project-deno.json b/haskell/examples/web-project-deno.json index 5ddd3bd..ee775a4 100644 --- a/haskell/examples/web-project-deno.json +++ b/haskell/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true, diff --git a/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/META.a2ml b/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/META.a2ml index d9b09e6..ba3375c 100644 --- a/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/META.a2ml +++ b/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/META.a2ml @@ -22,7 +22,7 @@ author = "Jonathan D.A. Jewell (hyperpolymath)" build-tool = "just" container-runtime = "podman" ci-platform = "github-actions" -package-manager = "guix" # guix | nix | cargo | mix +package-manager = "guix" # guix | guix | cargo | mix [maintenance-axes] scoping-first = true @@ -46,7 +46,7 @@ perfective-source = "axis-1 honest state after corrective/adaptive updates" [axis-3-audit-rules] audit-focus = "systems in place, documentation explains actual state, safety/security accounted for, observed effects reviewed" compliance-focus = "seams/compromises/exception register, bounded exceptions, anti-drift checks" -drift-risk-example = "single exception broadening into policy violation (e.g. ReScript->TypeScript spread)" +drift-risk-example = "single exception broadening into policy violation (e.g. AffineScript->TypeScript spread)" effects-evidence = "benchmark execution/results and maintainer status dialogue/review" [design-rationale] diff --git a/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/PLAYBOOK.a2ml b/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/PLAYBOOK.a2ml index 676ec4c..cdaebfd 100644 --- a/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/PLAYBOOK.a2ml +++ b/members/tooling/a2ml-estate-normaliser/.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/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/STATE.a2ml b/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/STATE.a2ml index a76d8dd..e24912c 100644 --- a/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/STATE.a2ml +++ b/members/tooling/a2ml-estate-normaliser/.machine_readable/6a2/STATE.a2ml @@ -32,7 +32,7 @@ milestones = [ { name = "Phase 1e: Trustfile / contractiles", completion = 100 }, { name = "Phase 2: Container ecosystem templates (stapeln)", completion = 100 }, { name = "Phase 3: Multi-forge sync hardening", completion = 0 }, - { name = "Phase 4: Nix/Guix reproducible shells", completion = 50 }, + { name = "Phase 4: Guix/Guix reproducible shells", completion = 50 }, ] [blockers-and-issues] @@ -43,7 +43,7 @@ actions = [ "Container templates complete — test with `just container-init`", "Validate container templates across wolfi-base and static Chainguard images", "Harden multi-forge sync for GitLab/Bitbucket mirroring edge cases", - "Expand Nix/Guix development shell templates", + "Expand Guix/Guix development shell templates", ] [maintenance-status] diff --git a/members/tooling/a2ml-estate-normaliser/.machine_readable/contractiles/Justfile b/members/tooling/a2ml-estate-normaliser/.machine_readable/contractiles/Justfile index 2db3d94..a339fff 100644 --- a/members/tooling/a2ml-estate-normaliser/.machine_readable/contractiles/Justfile +++ b/members/tooling/a2ml-estate-normaliser/.machine_readable/contractiles/Justfile @@ -88,7 +88,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -559,7 +559,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) @@ -570,9 +570,9 @@ guix-shell: guix-build: guix build -f guix.scm -# Enter Nix development shell (fallback) -nix-shell: - @if [ -f "flake.nix" ]; then nix develop; else echo "No flake.nix"; fi +# Enter Guix development shell (fallback) +guix-shell: + @if [ -f "flake.guix" ]; then guix develop; else echo "No flake.guix"; fi # ═══════════════════════════════════════════════════════════════════════════════ # HYBRID AUTOMATION diff --git a/members/tooling/a2ml-estate-normaliser/Justfile b/members/tooling/a2ml-estate-normaliser/Justfile index 2db3d94..a339fff 100644 --- a/members/tooling/a2ml-estate-normaliser/Justfile +++ b/members/tooling/a2ml-estate-normaliser/Justfile @@ -88,7 +88,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -559,7 +559,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) @@ -570,9 +570,9 @@ guix-shell: guix-build: guix build -f guix.scm -# Enter Nix development shell (fallback) -nix-shell: - @if [ -f "flake.nix" ]; then nix develop; else echo "No flake.nix"; fi +# Enter Guix development shell (fallback) +guix-shell: + @if [ -f "flake.guix" ]; then guix develop; else echo "No flake.guix"; fi # ═══════════════════════════════════════════════════════════════════════════════ # HYBRID AUTOMATION diff --git a/members/tooling/scm2a2ml/.github/dependabot.yml b/members/tooling/scm2a2ml/.github/dependabot.yml index 4d9ae2f..07f9937 100644 --- a/members/tooling/scm2a2ml/.github/dependabot.yml +++ b/members/tooling/scm2a2ml/.github/dependabot.yml @@ -44,8 +44,8 @@ updates: schedule: interval: "weekly" - # Nix flakes - - package-ecosystem: "nix" + # Guix flakes + - package-ecosystem: "guix" directory: "/" schedule: interval: "weekly" diff --git a/members/tooling/scm2a2ml/CONTRIBUTING.md b/members/tooling/scm2a2ml/CONTRIBUTING.md index 594b265..456dcad 100644 --- a/members/tooling/scm2a2ml/CONTRIBUTING.md +++ b/members/tooling/scm2a2ml/CONTRIBUTING.md @@ -2,8 +2,8 @@ git clone https://github.com/hyperpolymath/squisher-corpus.git cd squisher-corpus -# Using Nix (recommended for reproducibility) -nix develop +# Using Guix (recommended for reproducibility) +guix develop # Or using toolbox/distrobox toolbox create squisher-corpus-dev @@ -41,7 +41,7 @@ squisher-corpus/ ├── MAINTAINERS.md ├── README.adoc ├── SECURITY.md -├── flake.nix # Nix flake (Perimeter 1) +├── flake.guix # Guix flake (Perimeter 1) └── Justfile # Task runner (Perimeter 1) ``` diff --git a/members/tooling/vscode-a2ml/.github/CONTRIBUTING.md b/members/tooling/vscode-a2ml/.github/CONTRIBUTING.md index 02758c6..a6a3709 100644 --- a/members/tooling/vscode-a2ml/.github/CONTRIBUTING.md +++ b/members/tooling/vscode-a2ml/.github/CONTRIBUTING.md @@ -2,8 +2,8 @@ git clone https://{{FORGE}}/{{OWNER}}/{{REPO}}.git cd {{REPO}} -# Using Nix (recommended for reproducibility) -nix develop +# Using Guix (recommended for reproducibility) +guix develop # Or using toolbox/distrobox toolbox create {{REPO}}-dev @@ -45,7 +45,7 @@ just test # Run test suite ├── MAINTAINERS.md ├── README.adoc ├── SECURITY.md -├── flake.nix # Nix flake — fallback (Perimeter 1) +├── flake.guix # Guix flake — fallback (Perimeter 1) ├── guix.scm # Guix package — primary (Perimeter 1) └── Justfile # Task runner (Perimeter 1) ``` diff --git a/members/tooling/vscode-a2ml/.github/copilot-instructions.md b/members/tooling/vscode-a2ml/.github/copilot-instructions.md index f3beccc..dd55d84 100644 --- a/members/tooling/vscode-a2ml/.github/copilot-instructions.md +++ b/members/tooling/vscode-a2ml/.github/copilot-instructions.md @@ -33,7 +33,7 @@ ## Banned Languages -- No TypeScript (use ReScript) +- No TypeScript (use AffineScript) - No Node.js / npm / bun (use Deno) - No Go (use Rust) - No Python (use Julia or Rust) diff --git a/members/tooling/vscode-a2ml/.github/dependabot.yml b/members/tooling/vscode-a2ml/.github/dependabot.yml index 4d9ae2f..07f9937 100644 --- a/members/tooling/vscode-a2ml/.github/dependabot.yml +++ b/members/tooling/vscode-a2ml/.github/dependabot.yml @@ -44,8 +44,8 @@ updates: schedule: interval: "weekly" - # Nix flakes - - package-ecosystem: "nix" + # Guix flakes + - package-ecosystem: "guix" directory: "/" schedule: interval: "weekly" diff --git a/members/tooling/vscode-a2ml/.github/workflows/guix-nix-policy.yml b/members/tooling/vscode-a2ml/.github/workflows/guix-nix-policy.yml index 6d54e51..0aae495 100644 --- a/members/tooling/vscode-a2ml/.github/workflows/guix-nix-policy.yml +++ b/members/tooling/vscode-a2ml/.github/workflows/guix-nix-policy.yml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -name: Guix/Nix Package Policy +name: Guix/Guix Package Policy on: push: branches: [main, master] @@ -21,11 +21,11 @@ jobs: contents: read steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Enforce Guix primary / Nix fallback + - name: Enforce Guix primary / Guix fallback run: | # Check for package manager files HAS_GUIX=$(find . -name "*.scm" -o -name ".guix-channel" -o -name "guix.scm" 2>/dev/null | head -1) - HAS_NIX=$(find . -name "*.nix" 2>/dev/null | head -1) + HAS_NIX=$(find . -name "*.guix" 2>/dev/null | head -1) # Block new package-lock.json, yarn.lock, Gemfile.lock, etc. NEW_LOCKS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E 'package-lock\.json|yarn\.lock|Gemfile\.lock|Pipfile\.lock|poetry\.lock|cargo\.lock' || true) @@ -33,13 +33,13 @@ jobs: echo "⚠️ Lock files detected. Prefer Guix manifests for reproducibility." fi - # Prefer Guix, fallback to Nix + # Prefer Guix, fallback to Guix if [ -n "$HAS_GUIX" ]; then echo "✅ Guix package management detected (primary)" elif [ -n "$HAS_NIX" ]; then - echo "✅ Nix package management detected (fallback)" + echo "✅ Guix package management detected (fallback)" else - echo "ℹ️ Consider adding guix.scm or flake.nix for reproducible builds" + echo "ℹ️ Consider adding guix.scm or flake.guix for reproducible builds" fi echo "✅ Package policy check passed" diff --git a/members/tooling/vscode-a2ml/.github/workflows/rsr-antipattern.yml b/members/tooling/vscode-a2ml/.github/workflows/rsr-antipattern.yml index 220feb3..b8d4a23 100644 --- a/members/tooling/vscode-a2ml/.github/workflows/rsr-antipattern.yml +++ b/members/tooling/vscode-a2ml/.github/workflows/rsr-antipattern.yml @@ -3,7 +3,7 @@ # SPDX-License-Identifier: MPL-2.0 # # Enforces: No TypeScript, No Go, No Python (except SaltStack), No npm -# Allows: ReScript, Deno, WASM, Rust, OCaml, Haskell, Guile/Scheme +# Allows: AffineScript, Deno, WASM, Rust, OCaml, Haskell, Guile/Scheme name: RSR Anti-Pattern Check @@ -28,10 +28,10 @@ jobs: - name: Check for TypeScript run: | # Exclude bindings/deno/ - those are Deno FFI files using Deno.dlopen, not plain TypeScript - # Exclude .d.ts files - those are TypeScript type declarations for ReScript FFI + # Exclude .d.ts files - those are TypeScript type declarations for AffineScript FFI TS_FILES=$(find . \( -name "*.ts" -o -name "*.tsx" \) | grep -v node_modules | grep -v 'bindings/deno' | grep -v '\.d\.ts$' || true) if [ -n "$TS_FILES" ]; then - echo "❌ TypeScript files detected - use ReScript instead" + echo "❌ TypeScript files detected - use AffineScript instead" echo "$TS_FILES" exit 1 fi @@ -67,7 +67,7 @@ jobs: - name: Check for tsconfig run: | if [ -f "tsconfig.json" ]; then - echo "❌ tsconfig.json detected - use ReScript instead" + echo "❌ tsconfig.json detected - use AffineScript instead" exit 1 fi echo "✅ No tsconfig.json" @@ -86,7 +86,7 @@ jobs: echo "╔════════════════════════════════════════════════════════════╗" echo "║ RSR Anti-Pattern Check Passed ✅ ║" echo "║ ║" - echo "║ Allowed: ReScript, Deno, WASM, Rust, OCaml, Haskell, ║" + echo "║ Allowed: AffineScript, Deno, WASM, Rust, OCaml, Haskell, ║" echo "║ Guile/Scheme, SaltStack (Python) ║" echo "║ ║" echo "║ Blocked: TypeScript, Go, npm, Python (non-Salt) ║" diff --git a/members/tooling/vscode-a2ml/.github/workflows/ts-blocker.yml b/members/tooling/vscode-a2ml/.github/workflows/ts-blocker.yml index 71f8282..ae165d2 100644 --- a/members/tooling/vscode-a2ml/.github/workflows/ts-blocker.yml +++ b/members/tooling/vscode-a2ml/.github/workflows/ts-blocker.yml @@ -27,9 +27,9 @@ jobs: NEW_JS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(js|jsx)$' | grep -v '\.res\.js$' | grep -v '\.gen\.' | grep -v 'node_modules' || true) if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then - echo "❌ New TS/JS files detected. Use ReScript instead." + echo "❌ New TS/JS files detected. Use AffineScript instead." [ -n "$NEW_TS" ] && echo "$NEW_TS" [ -n "$NEW_JS" ] && echo "$NEW_JS" exit 1 fi - echo "✅ ReScript policy enforced" + echo "✅ AffineScript policy enforced" diff --git a/members/tooling/vscode-a2ml/.machine_readable/6a2/META.a2ml b/members/tooling/vscode-a2ml/.machine_readable/6a2/META.a2ml index d9b09e6..ba3375c 100644 --- a/members/tooling/vscode-a2ml/.machine_readable/6a2/META.a2ml +++ b/members/tooling/vscode-a2ml/.machine_readable/6a2/META.a2ml @@ -22,7 +22,7 @@ author = "Jonathan D.A. Jewell (hyperpolymath)" build-tool = "just" container-runtime = "podman" ci-platform = "github-actions" -package-manager = "guix" # guix | nix | cargo | mix +package-manager = "guix" # guix | guix | cargo | mix [maintenance-axes] scoping-first = true @@ -46,7 +46,7 @@ perfective-source = "axis-1 honest state after corrective/adaptive updates" [axis-3-audit-rules] audit-focus = "systems in place, documentation explains actual state, safety/security accounted for, observed effects reviewed" compliance-focus = "seams/compromises/exception register, bounded exceptions, anti-drift checks" -drift-risk-example = "single exception broadening into policy violation (e.g. ReScript->TypeScript spread)" +drift-risk-example = "single exception broadening into policy violation (e.g. AffineScript->TypeScript spread)" effects-evidence = "benchmark execution/results and maintainer status dialogue/review" [design-rationale] diff --git a/members/tooling/vscode-a2ml/.machine_readable/6a2/STATE.a2ml b/members/tooling/vscode-a2ml/.machine_readable/6a2/STATE.a2ml index f9a1e1d..9ebc6b4 100644 --- a/members/tooling/vscode-a2ml/.machine_readable/6a2/STATE.a2ml +++ b/members/tooling/vscode-a2ml/.machine_readable/6a2/STATE.a2ml @@ -32,7 +32,7 @@ milestones = [ { name = "Phase 1e: Trustfile / contractiles", completion = 100 }, { name = "Phase 2: Container ecosystem templates (stapeln)", completion = 100 }, { name = "Phase 3: Multi-forge sync hardening", completion = 0 }, - { name = "Phase 4: Nix/Guix reproducible shells", completion = 50 }, + { name = "Phase 4: Guix/Guix reproducible shells", completion = 50 }, ] [blockers-and-issues] @@ -43,7 +43,7 @@ actions = [ "Container templates complete — test with `just container-init`", "Validate container templates across wolfi-base and static Chainguard images", "Harden multi-forge sync for GitLab/Bitbucket mirroring edge cases", - "Expand Nix/Guix development shell templates", + "Expand Guix/Guix development shell templates", ] [maintenance-status] diff --git a/members/tooling/vscode-a2ml/.machine_readable/ai/PLACEHOLDERS.adoc b/members/tooling/vscode-a2ml/.machine_readable/ai/PLACEHOLDERS.adoc index 02bc8b4..59b0f68 100644 --- a/members/tooling/vscode-a2ml/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/members/tooling/vscode-a2ml/.machine_readable/ai/PLACEHOLDERS.adoc @@ -48,8 +48,8 @@ sed -i "s/{{CURRENT_DATE}}/$(date +%Y-%m-%d)/g" $(grep -rl '{{CURRENT_DATE}}' .) | Placeholder | Description | Example | Files | |---|---|---|---| -| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json | -| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.nix | +| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.guix, devcontainer.json | +| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.guix | | `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig | | `{{project}}` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig | | `{{REPO}}` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml | @@ -133,7 +133,7 @@ After replacing all placeholders, verify none remain: ```bash grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \ --include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \ - --include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \ + --include='Justfile' --include='*.guix' --include='*.toml' --include='*.yml' \ --include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \ --include='*.json' --include='Containerfile' --include='dep5' \ | grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules' diff --git a/members/tooling/vscode-a2ml/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml b/members/tooling/vscode-a2ml/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/members/tooling/vscode-a2ml/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml +++ b/members/tooling/vscode-a2ml/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/members/tooling/vscode-a2ml/CONTRIBUTING.md b/members/tooling/vscode-a2ml/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/members/tooling/vscode-a2ml/CONTRIBUTING.md +++ b/members/tooling/vscode-a2ml/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/members/tooling/vscode-a2ml/Justfile b/members/tooling/vscode-a2ml/Justfile index 65c8fdf..4f9913c 100644 --- a/members/tooling/vscode-a2ml/Justfile +++ b/members/tooling/vscode-a2ml/Justfile @@ -235,7 +235,7 @@ init: # Check for remaining placeholders PATTERN="${LB}[A-Z_]*${RB}" - REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.nix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) + REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.guix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) if [ -n "$REMAINING" ]; then echo "WARNING: Remaining placeholders in:" echo "$REMAINING" | sed 's/^/ /' @@ -272,7 +272,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -791,7 +791,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) @@ -802,9 +802,9 @@ guix-shell: guix-build: guix build -f guix.scm -# Enter Nix development shell (fallback) -nix-shell: - @if [ -f "flake.nix" ]; then nix develop; else echo "No flake.nix"; fi +# Enter Guix development shell (fallback) +guix-shell: + @if [ -f "flake.guix" ]; then guix develop; else echo "No flake.guix"; fi # ═══════════════════════════════════════════════════════════════════════════════ # HYBRID AUTOMATION diff --git a/members/tooling/vscode-a2ml/QUICKSTART-DEV.adoc b/members/tooling/vscode-a2ml/QUICKSTART-DEV.adoc index f1112df..dba2a96 100644 --- a/members/tooling/vscode-a2ml/QUICKSTART-DEV.adoc +++ b/members/tooling/vscode-a2ml/QUICKSTART-DEV.adoc @@ -18,11 +18,11 @@ guix shell ---- -=== Option B: Nix (fallback) +=== Option B: Guix (fallback) [source,bash] ---- -nix develop +guix develop ---- === Option C: Manual @@ -61,7 +61,7 @@ vscode-a2ml/ ├── .machine_readable/ # Checkpoint files (STATE, META, ECOSYSTEM) ├── Justfile # Task runner recipes ├── guix.scm # Guix environment -├── flake.nix # Nix environment (fallback) +├── flake.guix # Guix environment (fallback) └── 0-AI-MANIFEST.a2ml # AI agent entry point ---- diff --git a/members/tooling/vscode-a2ml/QUICKSTART-MAINTAINER.adoc b/members/tooling/vscode-a2ml/QUICKSTART-MAINTAINER.adoc index f65b7f9..ae4ea99 100644 --- a/members/tooling/vscode-a2ml/QUICKSTART-MAINTAINER.adoc +++ b/members/tooling/vscode-a2ml/QUICKSTART-MAINTAINER.adoc @@ -34,11 +34,11 @@ Output: `{{BUILD_OUTPUT_PATH}}` guix build -f guix.scm ---- -=== Nix +=== Guix [source,bash] ---- -nix build +guix build ---- === Container (Stapeln) diff --git a/members/tooling/vscode-a2ml/docs/RSR_OUTLINE.adoc b/members/tooling/vscode-a2ml/docs/RSR_OUTLINE.adoc index 014b21c..36211b0 100644 --- a/members/tooling/vscode-a2ml/docs/RSR_OUTLINE.adoc +++ b/members/tooling/vscode-a2ml/docs/RSR_OUTLINE.adoc @@ -204,8 +204,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript, Gleam -* **Tier 2** (Silver): Nickel, Guile Scheme, Nix, Idris2, OCaml +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript, Gleam +* **Tier 2** (Silver): Nickel, Guile Scheme, Guix, Idris2, OCaml * **Infrastructure**: Guix channels, derivations, Julia batch scripts === Required Files @@ -219,12 +219,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`) * npm, Bun, pnpm, yarn (use Deno) diff --git a/members/tooling/vscode-a2ml/docs/STATE-VISUALIZER.adoc b/members/tooling/vscode-a2ml/docs/STATE-VISUALIZER.adoc index 2af3297..f60a9d9 100644 --- a/members/tooling/vscode-a2ml/docs/STATE-VISUALIZER.adoc +++ b/members/tooling/vscode-a2ml/docs/STATE-VISUALIZER.adoc @@ -46,7 +46,7 @@ ┌─────────────────────────────────────────┐ │ PLATFORM INTEGRATION │ │ ┌───────────┐ ┌───────────┐ ┌───────┐│ - │ │ GitHub │ │ GitLab │ │ Nix / ││ + │ │ GitHub │ │ GitLab │ │ Guix / ││ │ │ Workflows │ │ CI/CD │ │ Guix ││ │ └───────────┘ └───────────┘ └───────┘│ └─────────────────────────────────────────┘ @@ -88,7 +88,7 @@ CONTAINER ECOSYSTEM (Phase 2) REPO INFRASTRUCTURE .machine_readable/ ██████████ 100% STATE/META/ECOSYSTEM active Governance & License ██████████ 100% PMPL & Ethical use verified - Development Shells (Nix/Guix) ██████████ 100% Reproducible env stable + Development Shells (Guix/Guix) ██████████ 100% Reproducible env stable ───────────────────────────────────────────────────────────────────────────── OVERALL: ██████████ 100% RSR Template Stable & Certified diff --git a/members/tooling/vscode-a2ml/docs/developer/ABI-FFI-README.adoc b/members/tooling/vscode-a2ml/docs/developer/ABI-FFI-README.adoc index 65d2afe..ecad1bb 100644 --- a/members/tooling/vscode-a2ml/docs/developer/ABI-FFI-README.adoc +++ b/members/tooling/vscode-a2ml/docs/developer/ABI-FFI-README.adoc @@ -44,7 +44,7 @@ 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. │ └─────────────────────────────────────────────┘ ``` @@ -76,7 +76,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/members/tooling/vscode-a2ml/docs/governance/MAINTENANCE-CHECKLIST.a2ml b/members/tooling/vscode-a2ml/docs/governance/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/members/tooling/vscode-a2ml/docs/governance/MAINTENANCE-CHECKLIST.a2ml +++ b/members/tooling/vscode-a2ml/docs/governance/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/members/tooling/vscode-a2ml/docs/practice/AI-CONVENTIONS.adoc b/members/tooling/vscode-a2ml/docs/practice/AI-CONVENTIONS.adoc index c77617a..f88ab67 100644 --- a/members/tooling/vscode-a2ml/docs/practice/AI-CONVENTIONS.adoc +++ b/members/tooling/vscode-a2ml/docs/practice/AI-CONVENTIONS.adoc @@ -53,7 +53,7 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | +| TypeScript | AffineScript | | Node.js / npm / bun | Deno | | Go | Rust | | Python | Julia / Rust | diff --git a/members/tooling/vscode-a2ml/docs/reports/audit/audit-2026-04-15-post.md b/members/tooling/vscode-a2ml/docs/reports/audit/audit-2026-04-15-post.md index 4652f3b..2da1e7b 100644 --- a/members/tooling/vscode-a2ml/docs/reports/audit/audit-2026-04-15-post.md +++ b/members/tooling/vscode-a2ml/docs/reports/audit/audit-2026-04-15-post.md @@ -22,10 +22,10 @@ Remaining findings: { }, { "category": "SupplyChain", - "location": "flake.nix", - "file": "flake.nix", + "location": "flake.guix", + "file": "flake.guix", "severity": "High", - "description": "flake.nix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.nix", + "description": "flake.guix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.guix", "recommended_attack": [] } ], @@ -40,7 +40,7 @@ Remaining findings: { }, "file_statistics": [ { - "file_path": "flake.nix", + "file_path": "flake.guix", "lines": 170, "unsafe_blocks": 0, "panic_sites": 0, @@ -86,7 +86,7 @@ Remaining findings: { "dependency_graph": { "edges": [ { - "from": "flake.nix", + "from": "flake.guix", "to": "setup.sh", "relation": "shared_dir:", "weight": 1.0 diff --git a/members/tooling/vscode-a2ml/examples/web-project-deno.json b/members/tooling/vscode-a2ml/examples/web-project-deno.json index 028e4f1..59b4a7c 100644 --- a/members/tooling/vscode-a2ml/examples/web-project-deno.json +++ b/members/tooling/vscode-a2ml/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true, diff --git a/rs/.machine_readable/6a2/META.a2ml b/rs/.machine_readable/6a2/META.a2ml index d9b09e6..ba3375c 100644 --- a/rs/.machine_readable/6a2/META.a2ml +++ b/rs/.machine_readable/6a2/META.a2ml @@ -22,7 +22,7 @@ author = "Jonathan D.A. Jewell (hyperpolymath)" build-tool = "just" container-runtime = "podman" ci-platform = "github-actions" -package-manager = "guix" # guix | nix | cargo | mix +package-manager = "guix" # guix | guix | cargo | mix [maintenance-axes] scoping-first = true @@ -46,7 +46,7 @@ perfective-source = "axis-1 honest state after corrective/adaptive updates" [axis-3-audit-rules] audit-focus = "systems in place, documentation explains actual state, safety/security accounted for, observed effects reviewed" compliance-focus = "seams/compromises/exception register, bounded exceptions, anti-drift checks" -drift-risk-example = "single exception broadening into policy violation (e.g. ReScript->TypeScript spread)" +drift-risk-example = "single exception broadening into policy violation (e.g. AffineScript->TypeScript spread)" effects-evidence = "benchmark execution/results and maintainer status dialogue/review" [design-rationale] diff --git a/rs/.machine_readable/6a2/STATE.a2ml b/rs/.machine_readable/6a2/STATE.a2ml index 7937b3f..373a96c 100644 --- a/rs/.machine_readable/6a2/STATE.a2ml +++ b/rs/.machine_readable/6a2/STATE.a2ml @@ -32,7 +32,7 @@ milestones = [ { name = "Phase 1e: Trustfile / contractiles", completion = 100 }, { name = "Phase 2: Container ecosystem templates (stapeln)", completion = 100 }, { name = "Phase 3: Multi-forge sync hardening", completion = 0 }, - { name = "Phase 4: Nix/Guix reproducible shells", completion = 50 }, + { name = "Phase 4: Guix/Guix reproducible shells", completion = 50 }, ] [blockers-and-issues] @@ -43,7 +43,7 @@ actions = [ "Container templates complete — test with `just container-init`", "Validate container templates across wolfi-base and static Chainguard images", "Harden multi-forge sync for GitLab/Bitbucket mirroring edge cases", - "Expand Nix/Guix development shell templates", + "Expand Guix/Guix development shell templates", ] [maintenance-status] diff --git a/rs/.machine_readable/ai/PLACEHOLDERS.adoc b/rs/.machine_readable/ai/PLACEHOLDERS.adoc index 02bc8b4..59b0f68 100644 --- a/rs/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/rs/.machine_readable/ai/PLACEHOLDERS.adoc @@ -48,8 +48,8 @@ sed -i "s/{{CURRENT_DATE}}/$(date +%Y-%m-%d)/g" $(grep -rl '{{CURRENT_DATE}}' .) | Placeholder | Description | Example | Files | |---|---|---|---| -| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json | -| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.nix | +| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.guix, devcontainer.json | +| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.guix | | `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig | | `{{project}}` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig | | `{{REPO}}` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml | @@ -133,7 +133,7 @@ After replacing all placeholders, verify none remain: ```bash grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \ --include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \ - --include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \ + --include='Justfile' --include='*.guix' --include='*.toml' --include='*.yml' \ --include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \ --include='*.json' --include='Containerfile' --include='dep5' \ | grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules' diff --git a/rs/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml b/rs/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/rs/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml +++ b/rs/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/rs/CONTRIBUTING.md b/rs/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/rs/CONTRIBUTING.md +++ b/rs/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/rs/Justfile b/rs/Justfile index 31e5724..0aecfd5 100644 --- a/rs/Justfile +++ b/rs/Justfile @@ -235,7 +235,7 @@ init: # Check for remaining placeholders PATTERN="${LB}[A-Z_]*${RB}" - REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.nix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) + REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.guix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) if [ -n "$REMAINING" ]; then echo "WARNING: Remaining placeholders in:" echo "$REMAINING" | sed 's/^/ /' @@ -272,7 +272,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -791,7 +791,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) @@ -802,9 +802,9 @@ guix-shell: guix-build: guix build -f guix.scm -# Enter Nix development shell (fallback) -nix-shell: - @if [ -f "flake.nix" ]; then nix develop; else echo "No flake.nix"; fi +# Enter Guix development shell (fallback) +guix-shell: + @if [ -f "flake.guix" ]; then guix develop; else echo "No flake.guix"; fi # ═══════════════════════════════════════════════════════════════════════════════ # HYBRID AUTOMATION diff --git a/rs/docs/RSR_OUTLINE.adoc b/rs/docs/RSR_OUTLINE.adoc index 014b21c..36211b0 100644 --- a/rs/docs/RSR_OUTLINE.adoc +++ b/rs/docs/RSR_OUTLINE.adoc @@ -204,8 +204,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript, Gleam -* **Tier 2** (Silver): Nickel, Guile Scheme, Nix, Idris2, OCaml +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript, Gleam +* **Tier 2** (Silver): Nickel, Guile Scheme, Guix, Idris2, OCaml * **Infrastructure**: Guix channels, derivations, Julia batch scripts === Required Files @@ -219,12 +219,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`) * npm, Bun, pnpm, yarn (use Deno) diff --git a/rs/docs/STATE-VISUALIZER.adoc b/rs/docs/STATE-VISUALIZER.adoc index 2af3297..f60a9d9 100644 --- a/rs/docs/STATE-VISUALIZER.adoc +++ b/rs/docs/STATE-VISUALIZER.adoc @@ -46,7 +46,7 @@ ┌─────────────────────────────────────────┐ │ PLATFORM INTEGRATION │ │ ┌───────────┐ ┌───────────┐ ┌───────┐│ - │ │ GitHub │ │ GitLab │ │ Nix / ││ + │ │ GitHub │ │ GitLab │ │ Guix / ││ │ │ Workflows │ │ CI/CD │ │ Guix ││ │ └───────────┘ └───────────┘ └───────┘│ └─────────────────────────────────────────┘ @@ -88,7 +88,7 @@ CONTAINER ECOSYSTEM (Phase 2) REPO INFRASTRUCTURE .machine_readable/ ██████████ 100% STATE/META/ECOSYSTEM active Governance & License ██████████ 100% PMPL & Ethical use verified - Development Shells (Nix/Guix) ██████████ 100% Reproducible env stable + Development Shells (Guix/Guix) ██████████ 100% Reproducible env stable ───────────────────────────────────────────────────────────────────────────── OVERALL: ██████████ 100% RSR Template Stable & Certified diff --git a/rs/docs/developer/ABI-FFI-README.adoc b/rs/docs/developer/ABI-FFI-README.adoc index 65d2afe..ecad1bb 100644 --- a/rs/docs/developer/ABI-FFI-README.adoc +++ b/rs/docs/developer/ABI-FFI-README.adoc @@ -44,7 +44,7 @@ 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. │ └─────────────────────────────────────────────┘ ``` @@ -76,7 +76,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/rs/docs/governance/MAINTENANCE-CHECKLIST.a2ml b/rs/docs/governance/MAINTENANCE-CHECKLIST.a2ml index eaee720..698f4d0 100644 --- a/rs/docs/governance/MAINTENANCE-CHECKLIST.a2ml +++ b/rs/docs/governance/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/rs/docs/practice/AI-CONVENTIONS.adoc b/rs/docs/practice/AI-CONVENTIONS.adoc index c77617a..f88ab67 100644 --- a/rs/docs/practice/AI-CONVENTIONS.adoc +++ b/rs/docs/practice/AI-CONVENTIONS.adoc @@ -53,7 +53,7 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | +| TypeScript | AffineScript | | Node.js / npm / bun | Deno | | Go | Rust | | Python | Julia / Rust | diff --git a/rs/examples/SafeDOMExample.affine b/rs/examples/SafeDOMExample.affine index 9e0fd94..bcb9b09 100644 --- a/rs/examples/SafeDOMExample.affine +++ b/rs/examples/SafeDOMExample.affine @@ -1,7 +1,116 @@ // SPDX-License-Identifier: MPL-2.0 // SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -// Ported via Harvard Engine +// Ported via Harvard Engine (Semantic pass) module SafeDOMExample; -// TODO: Complete semantic implementation +// SPDX-License-Identifier: MPL-2.0 +// Example: Using SafeDOM for formally verified DOM mounting + +open SafeDOM + +// Example 1: Basic mounting with error handling +fn mountApp = () => { + mountSafe( + "#app", + "

Hello, World!

Mounted safely with proofs.

", + ~onSuccess=el => { + Console.log("✓ App mounted successfully!") + Console.log("Element:", el) + }, + ~onError=err => { + Console.error("✗ Mount failed:", err) + } + ) +} + +// Example 2: Wait for DOM ready before mounting +fn mountWhenDOMReady = () => { + mountWhenReady( + "#app", + "

App Title

", + ~onSuccess=_ => Console.log("✓ Mounted after DOM ready"), + ~onError=err => Console.error("✗ Failed:", err) + ) +} + +// Example 3: Batch mounting (atomic - all or nothing) +fn mountMultiple = () => { + fn specs = [ + {selector: "#header", html: "

Site Title

"}, + {selector: "#nav", html: ""}, + {selector: "#main", html: "

Content here

"}, + {selector: "#footer", html: "
© 2026
"} + ] + + switch mountBatch(specs) { + | Ok(elements) => { + Console.log(`✓ Successfully mounted ${Array.length(elements)} elements`) + elements->Array.forEach(el => Console.log(" -", el)) + } + | Error(err) => { + Console.error("✗ Batch mount failed:", err) + Console.error(" (None were mounted - atomic operation)") + } + } +} + +// Example 4: Explicit validation before mounting +fn mountWithValidation = () => { + // Validate selector first + switch ProvenSelector.validate("#my-app") { + | Error(e) => Console.error(`Invalid selector: ${e}`) + | Ok(validSelector) => { + // Validate HTML + switch ProvenHTML.validate("
Content
") { + | Error(e) => Console.error(`Invalid HTML: ${e}`) + | Ok(validHtml) => { + // Now mount with proven safety + switch mount(validSelector, validHtml) { + | Mounted(el) => Console.log("✓ Mounted with validated inputs:", el) + | MountPointNotFound(s) => Console.error(`✗ Element not found: ${s}`) + | InvalidSelector(_) => Console.error("Impossible - already validated") + | InvalidHTML(_) => Console.error("Impossible - already validated") + } + } + } + } +} + +// Example 5: Integration with TEA +module MyApp = { + struct model { {message: string} + struct msg { NoOp + + fn init = () => {message: "Hello from TEA"} + fn update = (model, _msg) => model + fn view = model => `

${model.message}

` +} + +fn mountTEAApp = () => { + fn model = MyApp.init() + fn html = MyApp.view(model) + + mountWhenReady( + "#tea-app", + html, + ~onSuccess=el => { + Console.log("✓ TEA app mounted") + // Set up event handlers, subscriptions here + }, + ~onError=err => Console.error(`✗ TEA mount failed: ${err}`) + ) +} + +// Entry point +fn main = () => { + Console.log("SafeDOM Examples") + Console.log("================\n") + + // Choose which example to run + mountWhenDOMReady() // Run on DOM ready +} + +// Auto-execute when module loads +main() + diff --git a/rs/examples/web-project-deno.json b/rs/examples/web-project-deno.json index 028e4f1..59b4a7c 100644 --- a/rs/examples/web-project-deno.json +++ b/rs/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true, diff --git a/showcase/CONTRIBUTING.md b/showcase/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/showcase/CONTRIBUTING.md +++ b/showcase/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/showcase/EXPLAINME.adoc b/showcase/EXPLAINME.adoc index 0e5511a..e3f92ee 100644 --- a/showcase/EXPLAINME.adoc +++ b/showcase/EXPLAINME.adoc @@ -185,7 +185,7 @@ document structures. | `deno.json` / `deno.lock` | Deno runtime config and lockfile. -| `guix.scm` / `flake.nix` +| `guix.scm` / `flake.guix` | Reproducible build environment declarations. | `stapeln.toml` diff --git a/showcase/TEST-NEEDS.md b/showcase/TEST-NEEDS.md index aaeb65d..5604bec 100644 --- a/showcase/TEST-NEEDS.md +++ b/showcase/TEST-NEEDS.md @@ -32,7 +32,7 @@ - File: `/var/mnt/eclipse/repos/gossamer/0-AI-MANIFEST.a2ml` - Result: FULL COMPLIANCE. All 8 structural fields present. Proper S-expression format with identity, purpose, context-tiers, canonical-locations, and invariants. -**2. boj-server (ReScript/Deno — MCP server)** +**2. boj-server (AffineScript/Deno — MCP server)** - File: `/var/mnt/eclipse/repos/boj-server/0-AI-MANIFEST.a2ml` - Result: FULL COMPLIANCE. All 8 structural fields present. Well-structured manifest with 110 lines. diff --git a/validate-action/.machine_readable/ai/PLACEHOLDERS.adoc b/validate-action/.machine_readable/ai/PLACEHOLDERS.adoc index 515a515..f02d8e4 100644 --- a/validate-action/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/validate-action/.machine_readable/ai/PLACEHOLDERS.adoc @@ -48,8 +48,8 @@ sed -i "s/2026-03-16/$(date +%Y-%m-%d)/g" $(grep -rl '2026-03-16' .) | Placeholder | Description | Example | Files | |---|---|---|---| -| `a2ml-validate-action` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json | -| `` | One-line description | `A tool for X` | flake.nix | +| `a2ml-validate-action` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.guix, devcontainer.json | +| `` | One-line description | `A tool for X` | flake.guix | | `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig | | `{{project}}` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig | | `a2ml-validate-action` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml | @@ -133,7 +133,7 @@ After replacing all placeholders, verify none remain: ```bash grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \ --include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \ - --include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \ + --include='Justfile' --include='*.guix' --include='*.toml' --include='*.yml' \ --include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \ --include='*.json' --include='Containerfile' --include='dep5' \ | grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules' diff --git a/validate-action/.machine_readable/descriptiles/META.a2ml b/validate-action/.machine_readable/descriptiles/META.a2ml index a7d64e3..275e693 100644 --- a/validate-action/.machine_readable/descriptiles/META.a2ml +++ b/validate-action/.machine_readable/descriptiles/META.a2ml @@ -22,7 +22,7 @@ author = "Jonathan D.A. Jewell (hyperpolymath)" build-tool = "just" container-runtime = "podman" ci-platform = "github-actions" -package-manager = "guix" # guix | nix | cargo | mix +package-manager = "guix" # guix | guix | cargo | mix [maintenance-axes] scoping-first = true @@ -46,7 +46,7 @@ perfective-source = "axis-1 honest state after corrective/adaptive updates" [axis-3-audit-rules] audit-focus = "systems in place, documentation explains actual state, safety/security accounted for, observed effects reviewed" compliance-focus = "seams/compromises/exception register, bounded exceptions, anti-drift checks" -drift-risk-example = "single exception broadening into policy violation (e.g. ReScript->TypeScript spread)" +drift-risk-example = "single exception broadening into policy violation (e.g. AffineScript->TypeScript spread)" effects-evidence = "benchmark execution/results and maintainer status dialogue/review" [design-rationale] diff --git a/validate-action/.machine_readable/descriptiles/STATE.a2ml b/validate-action/.machine_readable/descriptiles/STATE.a2ml index 32a17c5..e534a5a 100644 --- a/validate-action/.machine_readable/descriptiles/STATE.a2ml +++ b/validate-action/.machine_readable/descriptiles/STATE.a2ml @@ -32,7 +32,7 @@ milestones = [ { name = "Phase 1e: Trustfile / contractiles", completion = 100 }, { name = "Phase 2: Container ecosystem templates (stapeln)", completion = 100 }, { name = "Phase 3: Multi-forge sync hardening", completion = 0 }, - { name = "Phase 4: Nix/Guix reproducible shells", completion = 50 }, + { name = "Phase 4: Guix/Guix reproducible shells", completion = 50 }, ] [blockers-and-issues] @@ -43,7 +43,7 @@ actions = [ "Container templates complete — test with `just container-init`", "Validate container templates across wolfi-base and static Chainguard images", "Harden multi-forge sync for GitLab/Bitbucket mirroring edge cases", - "Expand Nix/Guix development shell templates", + "Expand Guix/Guix development shell templates", ] [maintenance-status] diff --git a/validate-action/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml b/validate-action/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml index 4abd5e4..a2b8caa 100644 --- a/validate-action/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml +++ b/validate-action/.machine_readable/policies/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/validate-action/CONTRIBUTING.md b/validate-action/CONTRIBUTING.md index 80ecdac..90e87dc 100644 --- a/validate-action/CONTRIBUTING.md +++ b/validate-action/CONTRIBUTING.md @@ -15,7 +15,7 @@ We welcome contributions in many forms: ## Getting Started 1. **Read the AI Manifest:** Start with `0-AI-MANIFEST.a2ml` (if present) to understand the repository structure. -2. **Environment:** Use `nix develop` or `direnv allow` to set up your tools. +2. **Environment:** Use `guix develop` or `direnv allow` to set up your tools. 3. **Task Runner:** Use `just` to see available commands (`just --list`). ## Development Workflow diff --git a/validate-action/Justfile b/validate-action/Justfile index e5ebb04..2a32f74 100644 --- a/validate-action/Justfile +++ b/validate-action/Justfile @@ -233,7 +233,7 @@ init: # Check for remaining placeholders PATTERN="${LB}[A-Z_]*${RB}" - REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.nix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) + REMAINING=$(grep -rl "$PATTERN" . --include='*.md' --include='*.adoc' --include='*.yml' --include='*.yaml' --include='*.a2ml' --include='*.toml' --include='*.scm' --include='*.ncl' --include='*.guix' --include='*.json' --include='*.sh' 2>/dev/null | grep -v '.git/' | grep -v '.machine_readable/ai/PLACEHOLDERS.adoc' || true) if [ -n "$REMAINING" ]; then echo "WARNING: Remaining placeholders in:" echo "$REMAINING" | sed 's/^/ /' @@ -270,7 +270,7 @@ build *args: # cargo build {{args}} # Rust # mix compile {{args}} # Elixir # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript + # deno task build {{args}} # Deno/AffineScript @echo "Build complete" # Build in release mode with optimizations @@ -789,7 +789,7 @@ state-phase: @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/descriptiles/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ -# GUIX & NIX +# GUIX & GUIX # ═══════════════════════════════════════════════════════════════════════════════ # Enter Guix development shell (primary) diff --git a/validate-action/docs/RSR_OUTLINE.adoc b/validate-action/docs/RSR_OUTLINE.adoc index 014b21c..36211b0 100644 --- a/validate-action/docs/RSR_OUTLINE.adoc +++ b/validate-action/docs/RSR_OUTLINE.adoc @@ -204,8 +204,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript, Gleam -* **Tier 2** (Silver): Nickel, Guile Scheme, Nix, Idris2, OCaml +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript, Gleam +* **Tier 2** (Silver): Nickel, Guile Scheme, Guix, Idris2, OCaml * **Infrastructure**: Guix channels, derivations, Julia batch scripts === Required Files @@ -219,12 +219,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`) * npm, Bun, pnpm, yarn (use Deno) diff --git a/validate-action/docs/STATE-VISUALIZER.adoc b/validate-action/docs/STATE-VISUALIZER.adoc index 2af3297..f60a9d9 100644 --- a/validate-action/docs/STATE-VISUALIZER.adoc +++ b/validate-action/docs/STATE-VISUALIZER.adoc @@ -46,7 +46,7 @@ ┌─────────────────────────────────────────┐ │ PLATFORM INTEGRATION │ │ ┌───────────┐ ┌───────────┐ ┌───────┐│ - │ │ GitHub │ │ GitLab │ │ Nix / ││ + │ │ GitHub │ │ GitLab │ │ Guix / ││ │ │ Workflows │ │ CI/CD │ │ Guix ││ │ └───────────┘ └───────────┘ └───────┘│ └─────────────────────────────────────────┘ @@ -88,7 +88,7 @@ CONTAINER ECOSYSTEM (Phase 2) REPO INFRASTRUCTURE .machine_readable/ ██████████ 100% STATE/META/ECOSYSTEM active Governance & License ██████████ 100% PMPL & Ethical use verified - Development Shells (Nix/Guix) ██████████ 100% Reproducible env stable + Development Shells (Guix/Guix) ██████████ 100% Reproducible env stable ───────────────────────────────────────────────────────────────────────────── OVERALL: ██████████ 100% RSR Template Stable & Certified diff --git a/validate-action/docs/developer/ABI-FFI-README.adoc b/validate-action/docs/developer/ABI-FFI-README.adoc index 59b32dd..e973b47 100644 --- a/validate-action/docs/developer/ABI-FFI-README.adoc +++ b/validate-action/docs/developer/ABI-FFI-README.adoc @@ -44,7 +44,7 @@ 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. │ └─────────────────────────────────────────────┘ ``` @@ -76,7 +76,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/validate-action/docs/governance/MAINTENANCE-CHECKLIST.a2ml b/validate-action/docs/governance/MAINTENANCE-CHECKLIST.a2ml index 4abd5e4..a2b8caa 100644 --- a/validate-action/docs/governance/MAINTENANCE-CHECKLIST.a2ml +++ b/validate-action/docs/governance/MAINTENANCE-CHECKLIST.a2ml @@ -67,7 +67,7 @@ compliance-seams-check = true exception-register-required = true exception-bounded-scope-required = true policy-drift-contamination-check = true -example-drift-risk = "single TypeScript exception causing broad ReScript->TypeScript migration" +example-drift-risk = "single TypeScript exception causing broad AffineScript->TypeScript migration" compliance-tooling = "panic-attack" effects-tooling = "ecological checking with sustainabot guidance" diff --git a/validate-action/docs/practice/AI-CONVENTIONS.adoc b/validate-action/docs/practice/AI-CONVENTIONS.adoc index fcdd523..cbaaed0 100644 --- a/validate-action/docs/practice/AI-CONVENTIONS.adoc +++ b/validate-action/docs/practice/AI-CONVENTIONS.adoc @@ -53,7 +53,7 @@ MAINTENANCE-CHECKLIST.a2ml, or SOFTWARE-DEVELOPMENT-APPROACH.a2ml in the reposit | Banned | Use Instead | |---------------------|--------------------| -| TypeScript | ReScript | +| TypeScript | AffineScript | | Node.js / npm / bun | Deno | | Go | Rust | | Python | Julia / Rust | diff --git a/validate-action/examples/web-project-deno.json b/validate-action/examples/web-project-deno.json index 5ddd3bd..ee775a4 100644 --- a/validate-action/examples/web-project-deno.json +++ b/validate-action/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true,