diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 89f298f..d796c8a 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -74,7 +74,7 @@ Both are FOSS with independent governance (no Big Tech). ### Package Management - **Primary**: Guix (guix.scm) -- **Fallback**: Nix (flake.nix) +- **Fallback**: Guix (flake.guix) - **JS deps**: Deno (deno.json imports) ### Security Requirements diff --git a/.machine_readable/contractiles/Justfile b/.machine_readable/contractiles/Justfile index e572789..6799dfe 100644 --- a/.machine_readable/contractiles/Justfile +++ b/.machine_readable/contractiles/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/^/ /' @@ -377,7 +377,7 @@ self-assess: # Detect project characteristics HAS_RUST=false; [ -f "Cargo.toml" ] && HAS_RUST=true HAS_ELIXIR=false; [ -f "mix.exs" ] && HAS_ELIXIR=true - HAS_RESCRIPT=false; [ -f "rescript.json" ] || [ -f "bsconfig.json" ] && HAS_RESCRIPT=true + HAS_RESCRIPT=false; [ -f "affinescript.json" ] || [ -f "bsconfig.json" ] && HAS_RESCRIPT=true HAS_IDRIS=false; ls *.ipkg >/dev/null 2>&1 && HAS_IDRIS=true HAS_ZIG=false; [ -f "build.zig" ] || [ -d "ffi/zig" ] && HAS_ZIG=true HAS_GLEAM=false; [ -f "gleam.toml" ] && HAS_GLEAM=true @@ -386,7 +386,7 @@ self-assess: HAS_API=false; grep -rq 'port\|listen\|endpoint' --include="*.exs" --include="*.rs" --include="*.toml" . 2>/dev/null && HAS_API=true IS_LIBRARY=false; [ -f "Cargo.toml" ] && grep -q '\[lib\]' Cargo.toml 2>/dev/null && IS_LIBRARY=true - echo "Detected: Rust=$HAS_RUST Elixir=$HAS_ELIXIR ReScript=$HAS_RESCRIPT" + echo "Detected: Rust=$HAS_RUST Elixir=$HAS_ELIXIR AffineScript=$HAS_RESCRIPT" echo " Idris=$HAS_IDRIS Zig=$HAS_ZIG Gleam=$HAS_GLEAM" echo " Container=$HAS_CONTAINER Tests=$HAS_TESTS API=$HAS_API" echo "" @@ -464,16 +464,16 @@ self-assess: echo "" if ! $HAS_RESCRIPT && [ -d "examples" ] && ls examples/*.res >/dev/null 2>&1; then - echo " ○ examples/*.res — Template ReScript examples. Not your code." + echo " ○ examples/*.res — Template AffineScript examples. Not your code." fi if [ -f ".machine_readable/ai/PLACEHOLDERS.adoc" ]; then echo " ○ .machine_readable/ai/PLACEHOLDERS.adoc — Template doc. Remove after init." fi - if [ -f "flake.nix" ] && ! command -v nix >/dev/null 2>&1; then - echo " ○ flake.nix — Nix flake. Safe to remove if you don't use Nix." - echo " → KEEP if others might build with Nix." + if [ -f "flake.guix" ] && ! command -v guix >/dev/null 2>&1; then + echo " ○ flake.guix — Guix flake. Safe to remove if you don't use Guix." + echo " → KEEP if others might build with Guix." fi if [ -f "guix.scm" ] && ! command -v guix >/dev/null 2>&1; then @@ -592,7 +592,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 @@ -1155,7 +1155,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) @@ -1166,9 +1166,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/ABI-FFI-README.md b/ABI-FFI-README.adoc similarity index 54% rename from ABI-FFI-README.md rename to ABI-FFI-README.adoc index bbf13b1..8a5f1a8 100644 --- a/ABI-FFI-README.md +++ b/ABI-FFI-README.adoc @@ -1,21 +1,20 @@ - -# Conative Gating ABI/FFI Documentation +== Conative Gating ABI/FFI Documentation -## Overview +=== Overview -This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: +This library follows the *Hyperpolymath RSR Standard* for ABI and FFI +design: -- **ABI (Application Binary Interface)** defined in **Idris2** with formal proofs -- **FFI (Foreign Function Interface)** implemented in **Zig** for C compatibility -- **Generated C headers** bridge Idris2 ABI to Zig FFI -- **Any language** can call through standard C ABI +* *ABI (Application Binary Interface)* defined in *Idris2* with formal +proofs +* *FFI (Foreign Function Interface)* implemented in *Zig* for C +compatibility +* *Generated C headers* bridge Idris2 ABI to Zig FFI +* *Any language* can call through standard C ABI -## Architecture +=== Architecture -``` +.... ┌─────────────────────────────────────────────┐ │ ABI Definitions (Idris2) │ │ Src/Abi/ │ @@ -24,11 +23,11 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ - Proofs.idr (Formal verification) │ │ - Foreign.idr (FFI declarations) │ └─────────────────┬───────────────────────────┘ -``` +.... -## Directory Structure +=== Directory Structure -``` +.... conative-gating/ ├── Src/ │ ├── Abi/ # ABI definitions (Idris2) @@ -37,18 +36,21 @@ conative-gating/ │ │ ├── Proofs.idr # Formal security proofs │ │ └── Foreign.idr # FFI function declarations │ └── lib/ # Core library (any language) -``` +.... -## Formally Verified Invariants +=== Formally Verified Invariants -- **Policy completeness**: NO-GO gate blocks ALL policy-violating outputs. -- **Gate monotonicity**: Once a NO-GO decision is made, it cannot be overridden. -- **Deterministic rule evaluation**: Identical inputs produce identical results. -- **False positive boundedness**: The gate does not block clean proposals. +* *Policy completeness*: NO-GO gate blocks ALL policy-violating outputs. +* *Gate monotonicity*: Once a NO-GO decision is made, it cannot be +overridden. +* *Deterministic rule evaluation*: Identical inputs produce identical +results. +* *False positive boundedness*: The gate does not block clean proposals. -## Building +=== Building -```bash +[source,bash] +---- # Verify ABI and proofs idris2 --check Src/Abi/Proofs.idr -``` +---- diff --git a/ARCHITECTURE.adoc b/ARCHITECTURE.adoc new file mode 100644 index 0000000..1c0a7a6 --- /dev/null +++ b/ARCHITECTURE.adoc @@ -0,0 +1,48 @@ +== Architecture + +=== Overview + +This repository follows a modular, maintainable architecture designed +for clarity, scalability, and long-term sustainability. + +=== Directory Structure + +.... +. +├── src/ # Source code +├── tests/ # Test suites +├── docs/ # Documentation +├── scripts/ # Utility scripts +├── config/ # Configuration files +├── LICENSE # License file +├── LICENSES/ # Full license texts +└── README.adoc # Project documentation +.... + +=== Design Principles + +* *Separation of Concerns*: Each module has a single responsibility +* *Testability*: Code is written to be easily testable +* *Documentation*: All public APIs are documented +* *Configuration*: Environment-specific settings are externalized + +=== Dependencies + +* External dependencies are minimized and clearly declared +* Version pinning is used for reproducibility + +=== Security Considerations + +* Sensitive data is never committed to the repository +* Secrets are managed through environment variables or secure vaults +* Regular dependency audits are performed + +=== Maintainability + +* Code follows consistent style guidelines +* Pull requests require review and CI checks +* Issues and discussions are tracked transparently + +''''' + +_Last updated: 2026-07-18_ diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md deleted file mode 100644 index 607e3d8..0000000 --- a/ARCHITECTURE.md +++ /dev/null @@ -1,47 +0,0 @@ -# Architecture - -## Overview - -This repository follows a modular, maintainable architecture designed for clarity, scalability, and long-term sustainability. - -## Directory Structure - -``` -. -├── src/ # Source code -├── tests/ # Test suites -├── docs/ # Documentation -├── scripts/ # Utility scripts -├── config/ # Configuration files -├── LICENSE # License file -├── LICENSES/ # Full license texts -└── README.adoc # Project documentation -``` - -## Design Principles - -- **Separation of Concerns**: Each module has a single responsibility -- **Testability**: Code is written to be easily testable -- **Documentation**: All public APIs are documented -- **Configuration**: Environment-specific settings are externalized - -## Dependencies - -- External dependencies are minimized and clearly declared -- Version pinning is used for reproducibility - -## Security Considerations - -- Sensitive data is never committed to the repository -- Secrets are managed through environment variables or secure vaults -- Regular dependency audits are performed - -## Maintainability - -- Code follows consistent style guidelines -- Pull requests require review and CI checks -- Issues and discussions are tracked transparently - ---- - -*Last updated: 2026-07-18* diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc new file mode 100644 index 0000000..32015d6 --- /dev/null +++ b/CHANGELOG.adoc @@ -0,0 +1,71 @@ +== Changelog + +All notable changes to `+conative-gating+` will be documented in this +file. + +This file is generated from conventional commits by the +https://github.com/hyperpolymath/standards/blob/main/.github/workflows/changelog-reusable.yml[`+changelog-reusable.yml+`] +workflow (`+hyperpolymath/standards#206+`). Adopt the workflow in this +repo’s CI to keep this file in sync automatically — see +https://github.com/hyperpolymath/standards/blob/main/templates/cliff.toml[`+templates/cliff.toml+`] +for the canonical config. + +The format follows https://keepachangelog.com/en/1.1.0/[Keep a +Changelog]; this project aims to follow +https://semver.org/spec/v2.0.0.html[Semantic Versioning]. + +=== [Unreleased] + +==== Added + +* feat(crg): add crg-grade and crg-badge justfile recipes +* feat: add stapeln.toml container definition +* feat: deploy UX Manifesto infrastructure +* feat: add CLADE.a2ml — clade taxonomy declaration + +==== Fixed + +* fix(ci): bump a2ml/k9-validate-action pins to canonical (#50) +* fix(ci): sync hypatia-scan.yml to canonical (#49) +* fix(ci): adopt canonical hypatia-scan.yml (#47) +* fix: remove stale banned gen-v-connector V-lang recipe (#46) +* fix(ci): Phase-2 fleet submission must not fail the security gate +(#45) +* fix(ci): hypatia-scan workdir ($\{\{ env.HOME }} resolves empty) (#44) +* fix(ci): hypatia-scan.yml – –exit-zero + GITHUB_TOKEN +(hyperpolymath/hypatia#213) (#39) +* fix(ci): rsr-antipattern duplicate heredoc + setup-beam ubuntu24 (#40) +* fix(ci): repair YAML block-scalar in workflow-linter Check Permissions +step (#41) +* fix(ci): move secret-scanner Cargo.toml gate from job-level if: to +step-level (#42) + +==== Changed + +* refactor: migrate 6SCM → 6A2 (.scm → .a2ml format) + +==== Documentation + +* docs: substantive CRG C annotation (EXPLAINME.adoc) +* docs: add EXPLAINME.adoc — prove-it file backing README claims + +==== CI + +* ci(rust): convert rust-ci.yml to thin wrapper (standards#174) (#54) +* ci: redistribute concurrency-cancel guard to read-only check workflows +(#52) +* ci(secret-scanner): drop duplicate –fail from trufflehog extra_args +(#38) +* ci: SHA-pin hyperpolymath validate-actions in dogfood-gate +* ci(antipattern): fix top-level dir + benchmark/lsp filename matching +(#37) + +=== Pre-history + +Prior commits to this file’s introduction are recorded in git history +but not formally classified into Keep-a-Changelog sections. To backfill, +run `+git cliff -o CHANGELOG.md+` locally using the canonical +https://github.com/hyperpolymath/standards/blob/main/templates/cliff.toml[`+cliff.toml+`] +— this is one-shot mechanical work. + +''''' diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 68282c4..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,63 +0,0 @@ - -# Changelog - -All notable changes to `conative-gating` will be documented in this file. - -This file is generated from conventional commits by the -[`changelog-reusable.yml`](https://github.com/hyperpolymath/standards/blob/main/.github/workflows/changelog-reusable.yml) -workflow (`hyperpolymath/standards#206`). Adopt the workflow in this repo's CI to keep this file in sync automatically — see -[`templates/cliff.toml`](https://github.com/hyperpolymath/standards/blob/main/templates/cliff.toml) -for the canonical config. - -The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); -this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - -### Added - -- feat(crg): add crg-grade and crg-badge justfile recipes -- feat: add stapeln.toml container definition -- feat: deploy UX Manifesto infrastructure -- feat: add CLADE.a2ml — clade taxonomy declaration - -### Fixed - -- fix(ci): bump a2ml/k9-validate-action pins to canonical (#50) -- fix(ci): sync hypatia-scan.yml to canonical (#49) -- fix(ci): adopt canonical hypatia-scan.yml (#47) -- fix: remove stale banned gen-v-connector V-lang recipe (#46) -- fix(ci): Phase-2 fleet submission must not fail the security gate (#45) -- fix(ci): hypatia-scan workdir (${{ env.HOME }} resolves empty) (#44) -- fix(ci): hypatia-scan.yml -- --exit-zero + GITHUB_TOKEN (hyperpolymath/hypatia#213) (#39) -- fix(ci): rsr-antipattern duplicate heredoc + setup-beam ubuntu24 (#40) -- fix(ci): repair YAML block-scalar in workflow-linter Check Permissions step (#41) -- fix(ci): move secret-scanner Cargo.toml gate from job-level if: to step-level (#42) - -### Changed - -- refactor: migrate 6SCM → 6A2 (.scm → .a2ml format) - -### Documentation - -- docs: substantive CRG C annotation (EXPLAINME.adoc) -- docs: add EXPLAINME.adoc — prove-it file backing README claims - -### CI - -- ci(rust): convert rust-ci.yml to thin wrapper (standards#174) (#54) -- ci: redistribute concurrency-cancel guard to read-only check workflows (#52) -- ci(secret-scanner): drop duplicate --fail from trufflehog extra_args (#38) -- ci: SHA-pin hyperpolymath validate-actions in dogfood-gate -- ci(antipattern): fix top-level dir + benchmark/lsp filename matching (#37) - -## Pre-history - -Prior commits to this file's introduction are recorded in git history but not formally classified into Keep-a-Changelog sections. To backfill, run `git cliff -o CHANGELOG.md` locally using the canonical [`cliff.toml`](https://github.com/hyperpolymath/standards/blob/main/templates/cliff.toml) — this is one-shot mechanical work. - ---- - - diff --git a/CODE_OF_CONDUCT.adoc b/CODE_OF_CONDUCT.adoc new file mode 100644 index 0000000..bd2a83c --- /dev/null +++ b/CODE_OF_CONDUCT.adoc @@ -0,0 +1,24 @@ +== Contributor Covenant Code of Conduct + +=== Our Pledge + +We pledge to make participation a harassment-free experience for +everyone. + +=== Our Standards + +*Positive behavior:* * Using welcoming language * Being respectful of +differing viewpoints * Accepting constructive criticism * Focusing on +what is best for the community + +*Unacceptable behavior:* * Harassment, trolling, or personal attacks * +Publishing private information without permission + +=== Enforcement + +Report issues to the maintainers. All complaints will be reviewed. + +=== Attribution + +Adapted from https://www.contributor-covenant.org/[Contributor Covenant] +v2.1. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index bbe9219..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,30 +0,0 @@ - -# Contributor Covenant Code of Conduct - -## Our Pledge - -We pledge to make participation a harassment-free experience for everyone. - -## Our Standards - -**Positive behavior:** -* Using welcoming language -* Being respectful of differing viewpoints -* Accepting constructive criticism -* Focusing on what is best for the community - -**Unacceptable behavior:** -* Harassment, trolling, or personal attacks -* Publishing private information without permission - -## Enforcement - -Report issues to the maintainers. All complaints will be reviewed. - -## Attribution - -Adapted from [Contributor Covenant](https://www.contributor-covenant.org/) v2.1. - diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index e9b1993..6ad37d5 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -1,21 +1,109 @@ -// SPDX-License-Identifier: CC-BY-SA-4.0 -// Copyright (c) Jonathan D.A. Jewell -= Contributing Guide +== Clone the repository -== Getting Started +git clone https://github.com/hyperpolymath/conative-gating.git cd +conative-gating -1. Fork the repository -2. Create a feature branch from `main` -3. Sign off commits (`git commit -s`) -4. Submit a pull request +== Using Guix (recommended for reproducibility) -== Commit Guidelines +guix develop -* Conventional commits: `type(scope): description` -* Sign all commits (DCO required) -* Atomic, focused commits +== Or using toolbox/distrobox -== License +toolbox create conative-gating-dev toolbox enter conative-gating-dev # +Install dependencies manually -Contributions licensed under project license. +== Verify setup +just check # or: cargo check / mix compile / etc. just test # Run test +suite + +.... + +### Repository Structure +.... + +conative-gating/ ├── src/ # Source code (Perimeter 1-2) ├── lib/ # +Library code (Perimeter 1-2) ├── extensions/ # Extensions (Perimeter 2) +├── plugins/ # Plugins (Perimeter 2) ├── tools/ # Tooling (Perimeter 2) +├── docs/ # Documentation (Perimeter 3) │ ├── architecture/ # ADRs, +specs (Perimeter 2) │ └── proposals/ # RFCs (Perimeter 3) ├── examples/ +# Examples (Perimeter 3) ├── spec/ # Spec tests (Perimeter 3) ├── tests/ +# Test suite (Perimeter 2-3) ├── .well-known/ # Protocol files +(Perimeter 1-3) ├── .github/ # GitHub config (Perimeter 1) │ ├── +ISSUE_TEMPLATE/ │ └── workflows/ ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md +├── CONTRIBUTING.md # This file ├── GOVERNANCE.md ├── LICENSE ├── +MAINTAINERS.md ├── README.adoc ├── SECURITY.md ├── flake.guix # Guix +flake (Perimeter 1) └── Justfile # Task runner (Perimeter 1) + +.... + +--- + +## How to Contribute + +### Reporting Bugs + +**Before reporting**: +1. Search existing issues +2. Check if it's already fixed in `main` +3. Determine which perimeter the bug affects + +**When reporting**: + +Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include: + +- Clear, descriptive title +- Environment details (OS, versions, toolchain) +- Steps to reproduce +- Expected vs actual behaviour +- Logs, screenshots, or minimal reproduction + +### Suggesting Features + +**Before suggesting**: +1. Check the [roadmap](ROADMAP.md) if available +2. Search existing issues and discussions +3. Consider which perimeter the feature belongs to + +**When suggesting**: + +Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include: + +- Problem statement (what pain point does this solve?) +- Proposed solution +- Alternatives considered +- Which perimeter this affects + +### Your First Contribution + +Look for issues labelled: + +- [`good first issue`](https://github.com/hyperpolymath/conative-gating/labels/good%20first%20issue) — Simple Perimeter 3 tasks +- [`help wanted`](https://github.com/hyperpolymath/conative-gating/labels/help%20wanted) — Community help needed +- [`documentation`](https://github.com/hyperpolymath/conative-gating/labels/documentation) — Docs improvements +- [`perimeter-3`](https://github.com/hyperpolymath/conative-gating/labels/perimeter-3) — Community sandbox scope + +--- + +## Development Workflow + +### Branch Naming +.... + +docs/short-description # Documentation (P3) test/what-added # Test +additions (P3) feat/short-description # New features (P2) +fix/issue-number-description # Bug fixes (P2) refactor/what-changed # +Code improvements (P2) security/what-fixed # Security fixes (P1-2) + +.... + +### Commit Messages + +We follow [Conventional Commits](https://www.conventionalcommits.org/): +.... + +(): + +{empty}[optional body] + +{empty}[optional footer] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 9aa4748..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,120 +0,0 @@ - -# Clone the repository -git clone https://github.com/hyperpolymath/conative-gating.git -cd conative-gating - -# Using Nix (recommended for reproducibility) -nix develop - -# Or using toolbox/distrobox -toolbox create conative-gating-dev -toolbox enter conative-gating-dev -# Install dependencies manually - -# Verify setup -just check # or: cargo check / mix compile / etc. -just test # Run test suite -``` - -### Repository Structure -``` -conative-gating/ -├── src/ # Source code (Perimeter 1-2) -├── lib/ # Library code (Perimeter 1-2) -├── extensions/ # Extensions (Perimeter 2) -├── plugins/ # Plugins (Perimeter 2) -├── tools/ # Tooling (Perimeter 2) -├── docs/ # Documentation (Perimeter 3) -│ ├── architecture/ # ADRs, specs (Perimeter 2) -│ └── proposals/ # RFCs (Perimeter 3) -├── examples/ # Examples (Perimeter 3) -├── spec/ # Spec tests (Perimeter 3) -├── tests/ # Test suite (Perimeter 2-3) -├── .well-known/ # Protocol files (Perimeter 1-3) -├── .github/ # GitHub config (Perimeter 1) -│ ├── ISSUE_TEMPLATE/ -│ └── workflows/ -├── CHANGELOG.md -├── CODE_OF_CONDUCT.md -├── CONTRIBUTING.md # This file -├── GOVERNANCE.md -├── LICENSE -├── MAINTAINERS.md -├── README.adoc -├── SECURITY.md -├── flake.nix # Nix flake (Perimeter 1) -└── Justfile # Task runner (Perimeter 1) -``` - ---- - -## How to Contribute - -### Reporting Bugs - -**Before reporting**: -1. Search existing issues -2. Check if it's already fixed in `main` -3. Determine which perimeter the bug affects - -**When reporting**: - -Use the [bug report template](.github/ISSUE_TEMPLATE/bug_report.md) and include: - -- Clear, descriptive title -- Environment details (OS, versions, toolchain) -- Steps to reproduce -- Expected vs actual behaviour -- Logs, screenshots, or minimal reproduction - -### Suggesting Features - -**Before suggesting**: -1. Check the [roadmap](ROADMAP.md) if available -2. Search existing issues and discussions -3. Consider which perimeter the feature belongs to - -**When suggesting**: - -Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) and include: - -- Problem statement (what pain point does this solve?) -- Proposed solution -- Alternatives considered -- Which perimeter this affects - -### Your First Contribution - -Look for issues labelled: - -- [`good first issue`](https://github.com/hyperpolymath/conative-gating/labels/good%20first%20issue) — Simple Perimeter 3 tasks -- [`help wanted`](https://github.com/hyperpolymath/conative-gating/labels/help%20wanted) — Community help needed -- [`documentation`](https://github.com/hyperpolymath/conative-gating/labels/documentation) — Docs improvements -- [`perimeter-3`](https://github.com/hyperpolymath/conative-gating/labels/perimeter-3) — Community sandbox scope - ---- - -## Development Workflow - -### Branch Naming -``` -docs/short-description # Documentation (P3) -test/what-added # Test additions (P3) -feat/short-description # New features (P2) -fix/issue-number-description # Bug fixes (P2) -refactor/what-changed # Code improvements (P2) -security/what-fixed # Security fixes (P1-2) -``` - -### Commit Messages - -We follow [Conventional Commits](https://www.conventionalcommits.org/): -``` -(): - -[optional body] - -[optional footer] diff --git a/GOVERNANCE.adoc b/GOVERNANCE.adoc index e41020d..9b836fb 100644 --- a/GOVERNANCE.adoc +++ b/GOVERNANCE.adoc @@ -1,162 +1,60 @@ -// SPDX-License-Identifier: CC-BY-SA-4.0 -// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell -= Governance Model -:toc: preamble +== Governance -This document describes the governance model for this repository. +=== Overview -== Overview +This project is governed by the following principles and structures to +ensure transparent, inclusive, and effective decision-making. -This repository follows a **Sole Maintainer Governance Model**: +=== Roles and Responsibilities -* Single maintainer (@hyperpolymath) has full authority over the project -* All contributions are welcome and reviewed by the maintainer -* Decisions are made transparently through GitHub issues and discussions -* The project adheres to the hyperpolymath estate policies where applicable +==== Maintainers -== Core Principles +Maintainers are responsible for: - Reviewing and merging pull requests - +Managing releases and versioning - Ensuring code quality and standards - +Triaging issues and bug reports - Community engagement and support -[cols="1,2"] -|=== -| Principle | Description +==== Contributors -| **Benevolent Dictatorship** | Maintainer has final decision authority but seeks community input +Contributors are expected to: - Follow the code of conduct - Submit +well-documented pull requests - Write tests for new functionality - +Maintain existing tests - Update documentation as needed -| **Meritocracy** | Contributions are judged on technical merit, not contributor identity +=== Decision Making -| **Transparency** | All significant decisions are documented publicly +==== Minor Changes -| **Consensus-Seeking** | Maintainer prefers consensus but will decide when necessary +* Can be made by any maintainer +* Include bug fixes, documentation updates, dependency updates -| **Open Contribution** | Anyone can contribute via fork and pull request +==== Major Changes -|=== +* Require discussion in issues or pull requests +* Include new features, architectural changes, API changes +* Need approval from at least 2 maintainers -== Roles and Permissions +==== Breaking Changes -[cols="1,2,2"] -|=== -| Role | Permissions | Assignment +* Require RFC (Request for Comments) process +* Need approval from majority of maintainers +* Must include migration guide -| **Maintainer** | Write access, merge rights, admin | @hyperpolymath -| **Contributors** | Read access, fork, submit PRs | All GitHub users -| **Users** | Use the software, report issues | All GitHub users +=== Code of Conduct -|=== +All participants are expected to follow our Code of Conduct. Violations +can be reported to the maintainers. -== Decision Making Framework +=== Communication -=== Routine Decisions +* *Issues*: For bug reports and feature requests +* *Discussions*: For questions and general discussion +* *Pull Requests*: For code contributions -* Bug fixes -* Documentation improvements -* Minor feature additions -* Dependency updates +=== Licensing -**Process**: Maintainer reviews and merges PRs that meet quality standards. +All contributions are made under the terms of the repository’s LICENSE +file. By submitting a pull request, you agree to license your +contributions accordingly. -=== Significant Changes +''''' -* New major features -* API changes -* Architecture modifications -* Breaking changes - -**Process**: -. Open issue describing the change -. Discuss with community (minimum 72 hours) -. Maintainer makes final decision -. Document rationale in issue/PR - -=== Structural Decisions - -* Repository purpose/renaming -* License changes -* Ownership transfer -* Deprecation/archival - -**Process**: -. Extended discussion (minimum 1 week) -. Maintainer makes final decision -. Document in CHANGELOG and governance docs - -== Contribution Lifecycle - -[cols="1,2"] -|=== -| Stage | Process - -| **Ideation** | Open issue, discuss feasibility - -| **Development** | Fork, implement, test thoroughly - -| **Review** | Submit PR, maintainer reviews within 7 days - -| **Merge** | Maintainer merges or requests changes - -| **Release** | Maintainer publishes according to project conventions - -|=== - -== Conflict Resolution - -In case of disagreements: - -. Discuss in the relevant GitHub issue or PR -. Provide technical justification for positions -. Maintainer mediates and makes final decision -. Decision is documented and can be revisited later - -== Project Policies - -This repository adheres to hyperpolymath estate-wide policies: - -* **License**: MPL-2.0 for code, CC-BY-SA-4.0 for prose (per standards/LICENCE-POLICY.adoc) -* **Code of Conduct**: Follows hyperpolymath CODE_OF_CONDUCT.md -* **Security**: Follows hyperpolymath SECURITY.md -* **Contributing**: Follows hyperpolymath CONTRIBUTING.adoc conventions - -== Repository-Specific Conventions - -[cols="1,2"] -|=== -| Convention | Description - -| **Signing** | All commits must be signed (SSH or GPG) - -| **SPDX Headers** | All source files must have SPDX license identifiers - -| **Contractiles** | Mustfile, Trustfile, Intendfile, Adjustfile in root - -| **Machine Readable** | META.a2ml in .machine_readable/6a2/ - -| **CI/CD** | GitHub Actions workflows in .github/workflows/ - -|=== - -== Governance Evolution - -As the project grows, this governance model may evolve: - -* **Adding Co-Maintainers**: When contribution volume warrants it -* **Forming a Team**: For complex multi-maintainer projects -* **Adopting TPCF**: For large, multi-repository projects (see rhodium-standard-repositories) - -Changes to this document require the same process as Significant Changes above. - -== See Also - -* link:MAINTAINERS.adoc[Maintainers] -* link:CODE_OF_CONDUCT.md[Code of Conduct] -* link:CONTRIBUTING.adoc[Contributing Guide] -* link:https://github.com/hyperpolymath/standards/blob/main/LICENCE-POLICY.adoc[Estate License Policy] -* link:https://github.com/hyperpolymath/standards[rhodium-standard-repositories (TPCF)] - -== Changelog - -[cols="1,1,1"] -|=== -| Date | Change | By - -| 2026-06-07 | Initial governance model established | @hyperpolymath -|=== +_Last updated: 2026-07-18_ diff --git a/GOVERNANCE.md b/GOVERNANCE.md deleted file mode 100644 index e27364c..0000000 --- a/GOVERNANCE.md +++ /dev/null @@ -1,60 +0,0 @@ -# Governance - -## Overview - -This project is governed by the following principles and structures to ensure transparent, inclusive, and effective decision-making. - -## Roles and Responsibilities - -### Maintainers - -Maintainers are responsible for: -- Reviewing and merging pull requests -- Managing releases and versioning -- Ensuring code quality and standards -- Triaging issues and bug reports -- Community engagement and support - -### Contributors - -Contributors are expected to: -- Follow the code of conduct -- Submit well-documented pull requests -- Write tests for new functionality -- Maintain existing tests -- Update documentation as needed - -## Decision Making - -### Minor Changes -- Can be made by any maintainer -- Include bug fixes, documentation updates, dependency updates - -### Major Changes -- Require discussion in issues or pull requests -- Include new features, architectural changes, API changes -- Need approval from at least 2 maintainers - -### Breaking Changes -- Require RFC (Request for Comments) process -- Need approval from majority of maintainers -- Must include migration guide - -## Code of Conduct - -All participants are expected to follow our Code of Conduct. Violations can be reported to the maintainers. - -## Communication - -- **Issues**: For bug reports and feature requests -- **Discussions**: For questions and general discussion -- **Pull Requests**: For code contributions - -## Licensing - -All contributions are made under the terms of the repository's LICENSE file. -By submitting a pull request, you agree to license your contributions accordingly. - ---- - -*Last updated: 2026-07-18* diff --git a/Justfile b/Justfile index e572789..6799dfe 100644 --- a/Justfile +++ b/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/^/ /' @@ -377,7 +377,7 @@ self-assess: # Detect project characteristics HAS_RUST=false; [ -f "Cargo.toml" ] && HAS_RUST=true HAS_ELIXIR=false; [ -f "mix.exs" ] && HAS_ELIXIR=true - HAS_RESCRIPT=false; [ -f "rescript.json" ] || [ -f "bsconfig.json" ] && HAS_RESCRIPT=true + HAS_RESCRIPT=false; [ -f "affinescript.json" ] || [ -f "bsconfig.json" ] && HAS_RESCRIPT=true HAS_IDRIS=false; ls *.ipkg >/dev/null 2>&1 && HAS_IDRIS=true HAS_ZIG=false; [ -f "build.zig" ] || [ -d "ffi/zig" ] && HAS_ZIG=true HAS_GLEAM=false; [ -f "gleam.toml" ] && HAS_GLEAM=true @@ -386,7 +386,7 @@ self-assess: HAS_API=false; grep -rq 'port\|listen\|endpoint' --include="*.exs" --include="*.rs" --include="*.toml" . 2>/dev/null && HAS_API=true IS_LIBRARY=false; [ -f "Cargo.toml" ] && grep -q '\[lib\]' Cargo.toml 2>/dev/null && IS_LIBRARY=true - echo "Detected: Rust=$HAS_RUST Elixir=$HAS_ELIXIR ReScript=$HAS_RESCRIPT" + echo "Detected: Rust=$HAS_RUST Elixir=$HAS_ELIXIR AffineScript=$HAS_RESCRIPT" echo " Idris=$HAS_IDRIS Zig=$HAS_ZIG Gleam=$HAS_GLEAM" echo " Container=$HAS_CONTAINER Tests=$HAS_TESTS API=$HAS_API" echo "" @@ -464,16 +464,16 @@ self-assess: echo "" if ! $HAS_RESCRIPT && [ -d "examples" ] && ls examples/*.res >/dev/null 2>&1; then - echo " ○ examples/*.res — Template ReScript examples. Not your code." + echo " ○ examples/*.res — Template AffineScript examples. Not your code." fi if [ -f ".machine_readable/ai/PLACEHOLDERS.adoc" ]; then echo " ○ .machine_readable/ai/PLACEHOLDERS.adoc — Template doc. Remove after init." fi - if [ -f "flake.nix" ] && ! command -v nix >/dev/null 2>&1; then - echo " ○ flake.nix — Nix flake. Safe to remove if you don't use Nix." - echo " → KEEP if others might build with Nix." + if [ -f "flake.guix" ] && ! command -v guix >/dev/null 2>&1; then + echo " ○ flake.guix — Guix flake. Safe to remove if you don't use Guix." + echo " → KEEP if others might build with Guix." fi if [ -f "guix.scm" ] && ! command -v guix >/dev/null 2>&1; then @@ -592,7 +592,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 @@ -1155,7 +1155,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) @@ -1166,9 +1166,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/PROOF-NEEDS.adoc b/PROOF-NEEDS.adoc new file mode 100644 index 0000000..3da3619 --- /dev/null +++ b/PROOF-NEEDS.adoc @@ -0,0 +1,41 @@ +== Proof Requirements + +=== Current state + +* `+Src/Abi/Types.idr+` — Gating types and violation logic +* `+Src/Abi/Gating.idr+` — Core oracle gating logic (formal model) +* `+Src/Abi/Proofs.idr+` — Formal proofs of security invariants +* `+Src/Abi/Foreign.idr+` — FFI declarations for Zig/Rust integration +* Gating acts as "`inhibitory antagonist`" for LLM policy enforcement +(GO/NO-GO gating) + +=== What was proven + +* [x] *Policy completeness*: Proved that any `+Violation+` results in a +`+Block+` verdict (Modulo complex `+any+` reduction holes) +* [x] *Gate monotonicity*: Proved that once a NO-GO decision is made, it +cannot be overridden by subsequent processing stages (`+slmStage+` +preserves verdict ordering) +* [x] *False positive boundedness*: Proved that for a `+CleanProposal+`, +the gate is `+Allow+` (does not block everything) +* [x] *Policy composition soundness*: Proved that adding rules to a +policy preserves existing blocks (`+any_append+` lemma) +* [x] *Deterministic rule evaluation*: Proved the gating oracle is +deterministic (pure function property in Idris2) + +=== Prover + +* *Idris2* — Dependent types express the policy lattice and monotonicity +properties. Verified with Idris 0.8.0. + +=== Priority + +* *COMPLETED* — Conative gating core safety claims are formally modeled +and verified. + +=== Revision History + +* *2026-04-04*: Initial formal model and proofs implemented by formal +verification agent. Verified monotonicity, completeness, and composition +soundness. +* *2026-03-29*: Template ABI cleanup. diff --git a/PROOF-NEEDS.md b/PROOF-NEEDS.md deleted file mode 100644 index a7c2a97..0000000 --- a/PROOF-NEEDS.md +++ /dev/null @@ -1,29 +0,0 @@ - -# Proof Requirements - -## Current state -- `Src/Abi/Types.idr` — Gating types and violation logic -- `Src/Abi/Gating.idr` — Core oracle gating logic (formal model) -- `Src/Abi/Proofs.idr` — Formal proofs of security invariants -- `Src/Abi/Foreign.idr` — FFI declarations for Zig/Rust integration -- Gating acts as "inhibitory antagonist" for LLM policy enforcement (GO/NO-GO gating) - -## What was proven -- [x] **Policy completeness**: Proved that any `Violation` results in a `Block` verdict (Modulo complex `any` reduction holes) -- [x] **Gate monotonicity**: Proved that once a NO-GO decision is made, it cannot be overridden by subsequent processing stages (`slmStage` preserves verdict ordering) -- [x] **False positive boundedness**: Proved that for a `CleanProposal`, the gate is `Allow` (does not block everything) -- [x] **Policy composition soundness**: Proved that adding rules to a policy preserves existing blocks (`any_append` lemma) -- [x] **Deterministic rule evaluation**: Proved the gating oracle is deterministic (pure function property in Idris2) - -## Prover -- **Idris2** — Dependent types express the policy lattice and monotonicity properties. Verified with Idris 0.8.0. - -## Priority -- **COMPLETED** — Conative gating core safety claims are formally modeled and verified. - -## Revision History -- **2026-04-04**: Initial formal model and proofs implemented by formal verification agent. Verified monotonicity, completeness, and composition soundness. -- **2026-03-29**: Template ABI cleanup. diff --git a/README.adoc b/README.adoc index 62b04c4..12ddcde 100644 --- a/README.adoc +++ b/README.adoc @@ -41,7 +41,7 @@ toc::[] == The Problem -LLMs are trained to be helpful, which makes them systematically violate explicit project constraints. When given rules like "NEVER use TypeScript, use ReScript", LLMs: +LLMs are trained to be helpful, which makes them systematically violate explicit project constraints. When given rules like "NEVER use TypeScript, use AffineScript", LLMs: 1. Read and acknowledge the constraint 2. Generate compliant-sounding justification @@ -180,7 +180,7 @@ The default policy implements the Rhodium Standard Repository (RSR) language hie === Tier 1 - Preferred -* Rust, Elixir, Zig, Ada, Haskell, ReScript +* Rust, Elixir, Zig, Ada, Haskell, AffineScript === Tier 2 - Acceptable (generates warnings) diff --git a/RSR_OUTLINE.adoc b/RSR_OUTLINE.adoc index 2d07b49..6cd04f2 100644 --- a/RSR_OUTLINE.adoc +++ b/RSR_OUTLINE.adoc @@ -148,8 +148,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript -* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Nix +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript +* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Guix * **Infrastructure**: Guix channels, derivations === Required Files @@ -163,12 +163,12 @@ project/ * `.well-known/security.txt` * `.well-known/ai.txt` * `.well-known/humans.txt` -* `guix.scm` OR `flake.nix` +* `guix.scm` OR `flake.guix` === Prohibited * Python outside `salt/` directory -* TypeScript/JavaScript (use ReScript) +* TypeScript/JavaScript (use AffineScript) * CUE (use Guile/Nickel) * `Dockerfile` (use `Containerfile`) diff --git a/SECURITY.adoc b/SECURITY.adoc new file mode 100644 index 0000000..f21ce02 --- /dev/null +++ b/SECURITY.adoc @@ -0,0 +1,71 @@ +== Security Policy + +=== Supported Versions + +[cols=",",options="header",] +|=== +|Version |Supported +|0.1.x |:white_check_mark: +|=== + +=== Reporting a Vulnerability + +If you discover a security vulnerability in Conative Gating, please +report it responsibly: + +[arabic] +. *Email*: security@hyperpolymath.org +. *Subject*: `+[SECURITY] conative-gating: Brief description+` +. *Include*: +* Description of the vulnerability +* Steps to reproduce +* Potential impact assessment +* Any suggested fixes (optional) + +==== Response Timeline + +* *Initial acknowledgment*: Within 48 hours +* *Triage and assessment*: Within 7 days +* *Fix or mitigation*: Depends on severity +** Critical: Within 7 days +** High: Within 30 days +** Medium/Low: Next release cycle + +==== What to Expect + +* We will acknowledge receipt of your report +* We will investigate and keep you informed of progress +* We will credit you in the security advisory (unless you prefer +anonymity) +* We will not take legal action against good-faith security researchers + +=== Security Considerations + +==== Policy Oracle + +The Policy Oracle performs deterministic rule checking: - File extension +and content marker detection - Pattern matching for forbidden content +(secrets, banned languages) - No external network calls during +evaluation + +==== SLM Evaluator (Planned) + +Future SLM integration will: - Run locally using llama.cpp (no external +API calls) - Use quantized models for reduced attack surface - Implement +input sanitization before inference + +==== Consensus Arbiter (Planned) + +The Elixir arbiter will: - Use supervision trees for fault tolerance - +Implement rate limiting to prevent DoS - Log all decisions for audit +purposes + +=== Hardening Recommendations + +When deploying Conative Gating: + +[arabic] +. Run with minimal privileges +. Use read-only access to scanned directories where possible +. Validate all external inputs (proposal JSON schemas) +. Review audit logs regularly diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index df5b51c..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,71 +0,0 @@ - -# Security Policy - -## Supported Versions - -| Version | Supported | -| ------- | ------------------ | -| 0.1.x | :white_check_mark: | - -## Reporting a Vulnerability - -If you discover a security vulnerability in Conative Gating, please report it responsibly: - -1. **Email**: security@hyperpolymath.org -2. **Subject**: `[SECURITY] conative-gating: Brief description` -3. **Include**: - - Description of the vulnerability - - Steps to reproduce - - Potential impact assessment - - Any suggested fixes (optional) - -### Response Timeline - -- **Initial acknowledgment**: Within 48 hours -- **Triage and assessment**: Within 7 days -- **Fix or mitigation**: Depends on severity - - Critical: Within 7 days - - High: Within 30 days - - Medium/Low: Next release cycle - -### What to Expect - -- We will acknowledge receipt of your report -- We will investigate and keep you informed of progress -- We will credit you in the security advisory (unless you prefer anonymity) -- We will not take legal action against good-faith security researchers - -## Security Considerations - -### Policy Oracle - -The Policy Oracle performs deterministic rule checking: -- File extension and content marker detection -- Pattern matching for forbidden content (secrets, banned languages) -- No external network calls during evaluation - -### SLM Evaluator (Planned) - -Future SLM integration will: -- Run locally using llama.cpp (no external API calls) -- Use quantized models for reduced attack surface -- Implement input sanitization before inference - -### Consensus Arbiter (Planned) - -The Elixir arbiter will: -- Use supervision trees for fault tolerance -- Implement rate limiting to prevent DoS -- Log all decisions for audit purposes - -## Hardening Recommendations - -When deploying Conative Gating: - -1. Run with minimal privileges -2. Use read-only access to scanned directories where possible -3. Validate all external inputs (proposal JSON schemas) -4. Review audit logs regularly diff --git a/TEST-NEEDS.adoc b/TEST-NEEDS.adoc new file mode 100644 index 0000000..6f0d331 --- /dev/null +++ b/TEST-NEEDS.adoc @@ -0,0 +1,193 @@ +== Test & Benchmark Requirements - COMPLETED + +=== CRG Grade: C — ACHIEVED 2026-04-04 + +=== Current State (Post-Blitz) + +* *Unit tests*: 74 pass (25 Oracle + 8 SLM + 41 Contract) +* *E2E tests*: 19 pass (complete gating pipeline scenarios) +* *Property tests*: 10 pass (determinism, outcomes, performance) +* *Security aspect tests*: 20 pass (bypass prevention, manipulation +detection) +* *Integration tests*: 1 Zig template placeholder (ready for expansion) +* *Benchmarks*: Baseline infrastructure in place (criterion-ready) +* *panic-attack scan*: Ready to run + +=== Tests Added + +==== Unit Tests + +===== Policy Oracle (src/oracle/src/lib.rs) - 25 tests + +* Language detection: TypeScript, Python, Go, Java, Rust, Elixir, Zig, +Ada, Haskell, AffineScript +* Tier classification: Tier1 (allowed), Tier2 (concern), Forbidden +* Exception handling: Python in salt/, training/ +* Pattern matching: Hardcoded secrets (password, API key) +* Toolchain rules: npm without deno detection +* Multi-language detection and rule count verification +* Violation severity levels (Critical, High, Medium, Low) + +===== SLM Evaluator (src/slm/src/lib.rs) - 8 tests + +* Placeholder evaluation consistency +* Default configuration +* Block threshold setting +* UUID generation per evaluation +* Reasoning message completeness +* Model path initialization + +===== Gating Contract (src/contract/src/lib.rs) - 41 tests + +* Contract verdict logic: Allow, Warn, Escalate, Block +* Refusal taxonomy: 11 categories with proper mapping +* Evidence collection and serialization +* Audit log creation and JSON output +* Test harness with pass/fail tracking +* Regression baseline creation and comparison +* Authorization levels (User, Maintainer, Admin, None) +* Red-team category classification +* Processing metadata recording +* Multi-language compliance (Rust, Elixir, Zig, Ada, Haskell, +AffineScript) + +==== E2E Tests (tests/gating_pipeline_test.rs) - 19 tests + +* Complete gating workflows: +** Valid Rust code passes gating +** Forbidden TypeScript blocked with remediation +** Hardcoded secrets detected via regex pattern +** Tier2 (Nickel) warnings +** Python exceptions in salt/ allowed +** Python forbidden outside salt/ +** NPM without Deno rejected +** Multiple files evaluated +** Audit log correlation with decision +* Language support verification: +** Elixir, Ada, Haskell, Zig, AffineScript all pass +** Go and Java blocked with appropriate refusals +* Processing metadata completeness +* Request context preservation through audit trail + +==== Property-Based Tests (tests/property_test.rs) - 10 tests + +* *Determinism*: Same input → same verdict (tested on 4 diverse cases) +* *Binary outcomes*: Verdict always one of 4 defined states +* *Bounded processing*: <1 second per evaluation +* *Panic safety*: Pathological inputs (long names, many segments, +unicode) +* *Refusal evidence*: Blocking verdicts include justification +* *Exit code consistency*: Distinct codes for each verdict type +* *Proposal ID preservation*: Through full pipeline +* *Tier1 language enforcement*: 6 allowed languages verified +* *Forbidden language detection*: 4 forbidden languages blocked +* *Audit serialization*: All formats (JSON, pretty, compact) + +==== Security Aspect Tests (tests/security_aspect_test.rs) - 20 tests + +* *Bypass prevention*: +** Comment-based TypeScript bypass (file extension catches it) +** Obfuscated markers fail +** Base64 encoding (known limitation documented) +** Null byte handling +** Unicode lookalikes +* *Oracle robustness*: +** Empty proposals allowed +** Extreme length handling (1.3MB content) +** Multiple violations reported +** Rule violation accumulation +* *Safe defaults*: +** Tier2 warns, doesn’t block +** Hard violations not overridable +** Exception path override works +* *Audit security*: +** Content hashed, not logged +** Sensitive data not in audit trail +** Proposal ID correlation maintained +* *Error handling*: +** Regex errors gracefully handled +** Malformed content processed safely +* *Verdict semantics*: +** Exit codes map to proper status +** Refusal fields populated correctly + +=== Test Coverage by Component + +[cols=",,,,,",options="header",] +|=== +|Component |Unit |E2E |Property |Security |Total +|Oracle |25 |- |3 |8 |36 +|Contract |41 |- |5 |10 |56 +|SLM |8 |- |1 |- |9 +|Integration |- |19 |1 |2 |22 +|*TOTAL* |*74* |*19* |*10* |*20* |*123* +|=== + +=== Test Execution + +==== Run all tests + +[source,bash] +---- +cargo test +---- + +==== Run specific test suite + +[source,bash] +---- +cargo test --test gating_pipeline_test # E2E +cargo test --test property_test # Properties +cargo test --test security_aspect_test # Security +cargo test -p policy-oracle # Oracle unit tests +cargo test -p gating-contract # Contract unit tests +cargo test -p slm-evaluator # SLM unit tests +---- + +==== Run with backtrace on failure + +[source,bash] +---- +RUST_BACKTRACE=1 cargo test +---- + +=== CRG C Achievement + +✅ *Unit tests* - 74 tests covering all modules ✅ *E2E tests* - 19 +tests validating full pipeline ✅ *Property tests* - 10 tests verifying +invariants (determinism, outcomes, performance) ✅ *Security aspect +tests* - 20 tests for bypass prevention, manipulation detection ✅ +*Build tests* - All pass ✅ *Contract tests* - Test harness and +regression baseline infrastructure + +=== Outstanding Items (for CRG B+) + +[arabic] +. *Zig FFI integration test* - Replace placeholder with real FFI test +. *Criterion benchmarks* - Add performance baselines: +* Gate decision latency (target: <1ms) +* Contract evaluation throughput (target: >1000 proposals/sec) +* Oracle query round-trip (target: <500µs) +. *Reflexive tests* - Add self-testing capabilities +. *Performance regression* - Link criterion results to regression +baseline + +=== Notes + +* All tests pass with 0 warnings +* No unsafe code or dangerous patterns (unwrap/expect checked) +* SPDX headers on all new test files +* Deterministic: Tests produce same results on repeated runs +* Fast: Full suite completes in <2 seconds +* Isolated: No test interdependencies + +=== Architecture Insights + +The test suite validates: - *Deterministic policy enforcement* via +Oracle - *Contractual commitment* to input/output/refusal taxonomy - +*Safe rejection* of dangerous patterns (hardcoded secrets, forbidden +languages) - *Audit trail* for compliance and debugging - +*Extensibility* for future SLM + Arbiter consensus layers + +All 123 tests reinforce the core principle: *Conative Gating enforces +policy consistently, safely, and auditably.* diff --git a/TEST-NEEDS.md b/TEST-NEEDS.md deleted file mode 100644 index 0f228f7..0000000 --- a/TEST-NEEDS.md +++ /dev/null @@ -1,177 +0,0 @@ - -# Test & Benchmark Requirements - COMPLETED - -## CRG Grade: C — ACHIEVED 2026-04-04 - -## Current State (Post-Blitz) - -- **Unit tests**: 74 pass (25 Oracle + 8 SLM + 41 Contract) -- **E2E tests**: 19 pass (complete gating pipeline scenarios) -- **Property tests**: 10 pass (determinism, outcomes, performance) -- **Security aspect tests**: 20 pass (bypass prevention, manipulation detection) -- **Integration tests**: 1 Zig template placeholder (ready for expansion) -- **Benchmarks**: Baseline infrastructure in place (criterion-ready) -- **panic-attack scan**: Ready to run - -## Tests Added - -### Unit Tests - -#### Policy Oracle (src/oracle/src/lib.rs) - 25 tests -- Language detection: TypeScript, Python, Go, Java, Rust, Elixir, Zig, Ada, Haskell, ReScript -- Tier classification: Tier1 (allowed), Tier2 (concern), Forbidden -- Exception handling: Python in salt/, training/ -- Pattern matching: Hardcoded secrets (password, API key) -- Toolchain rules: npm without deno detection -- Multi-language detection and rule count verification -- Violation severity levels (Critical, High, Medium, Low) - -#### SLM Evaluator (src/slm/src/lib.rs) - 8 tests -- Placeholder evaluation consistency -- Default configuration -- Block threshold setting -- UUID generation per evaluation -- Reasoning message completeness -- Model path initialization - -#### Gating Contract (src/contract/src/lib.rs) - 41 tests -- Contract verdict logic: Allow, Warn, Escalate, Block -- Refusal taxonomy: 11 categories with proper mapping -- Evidence collection and serialization -- Audit log creation and JSON output -- Test harness with pass/fail tracking -- Regression baseline creation and comparison -- Authorization levels (User, Maintainer, Admin, None) -- Red-team category classification -- Processing metadata recording -- Multi-language compliance (Rust, Elixir, Zig, Ada, Haskell, ReScript) - -### E2E Tests (tests/gating_pipeline_test.rs) - 19 tests -- Complete gating workflows: - - Valid Rust code passes gating - - Forbidden TypeScript blocked with remediation - - Hardcoded secrets detected via regex pattern - - Tier2 (Nickel) warnings - - Python exceptions in salt/ allowed - - Python forbidden outside salt/ - - NPM without Deno rejected - - Multiple files evaluated - - Audit log correlation with decision -- Language support verification: - - Elixir, Ada, Haskell, Zig, ReScript all pass - - Go and Java blocked with appropriate refusals -- Processing metadata completeness -- Request context preservation through audit trail - -### Property-Based Tests (tests/property_test.rs) - 10 tests -- **Determinism**: Same input → same verdict (tested on 4 diverse cases) -- **Binary outcomes**: Verdict always one of 4 defined states -- **Bounded processing**: <1 second per evaluation -- **Panic safety**: Pathological inputs (long names, many segments, unicode) -- **Refusal evidence**: Blocking verdicts include justification -- **Exit code consistency**: Distinct codes for each verdict type -- **Proposal ID preservation**: Through full pipeline -- **Tier1 language enforcement**: 6 allowed languages verified -- **Forbidden language detection**: 4 forbidden languages blocked -- **Audit serialization**: All formats (JSON, pretty, compact) - -### Security Aspect Tests (tests/security_aspect_test.rs) - 20 tests -- **Bypass prevention**: - - Comment-based TypeScript bypass (file extension catches it) - - Obfuscated markers fail - - Base64 encoding (known limitation documented) - - Null byte handling - - Unicode lookalikes -- **Oracle robustness**: - - Empty proposals allowed - - Extreme length handling (1.3MB content) - - Multiple violations reported - - Rule violation accumulation -- **Safe defaults**: - - Tier2 warns, doesn't block - - Hard violations not overridable - - Exception path override works -- **Audit security**: - - Content hashed, not logged - - Sensitive data not in audit trail - - Proposal ID correlation maintained -- **Error handling**: - - Regex errors gracefully handled - - Malformed content processed safely -- **Verdict semantics**: - - Exit codes map to proper status - - Refusal fields populated correctly - -## Test Coverage by Component - -| Component | Unit | E2E | Property | Security | Total | -|-----------|------|-----|----------|----------|-------| -| Oracle | 25 | - | 3 | 8 | 36 | -| Contract | 41 | - | 5 | 10 | 56 | -| SLM | 8 | - | 1 | - | 9 | -| Integration | - | 19 | 1 | 2 | 22 | -| **TOTAL** | **74** | **19** | **10** | **20** | **123** | - -## Test Execution - -### Run all tests -```bash -cargo test -``` - -### Run specific test suite -```bash -cargo test --test gating_pipeline_test # E2E -cargo test --test property_test # Properties -cargo test --test security_aspect_test # Security -cargo test -p policy-oracle # Oracle unit tests -cargo test -p gating-contract # Contract unit tests -cargo test -p slm-evaluator # SLM unit tests -``` - -### Run with backtrace on failure -```bash -RUST_BACKTRACE=1 cargo test -``` - -## CRG C Achievement - -✅ **Unit tests** - 74 tests covering all modules -✅ **E2E tests** - 19 tests validating full pipeline -✅ **Property tests** - 10 tests verifying invariants (determinism, outcomes, performance) -✅ **Security aspect tests** - 20 tests for bypass prevention, manipulation detection -✅ **Build tests** - All pass -✅ **Contract tests** - Test harness and regression baseline infrastructure - -## Outstanding Items (for CRG B+) - -1. **Zig FFI integration test** - Replace placeholder with real FFI test -2. **Criterion benchmarks** - Add performance baselines: - - Gate decision latency (target: <1ms) - - Contract evaluation throughput (target: >1000 proposals/sec) - - Oracle query round-trip (target: <500µs) -3. **Reflexive tests** - Add self-testing capabilities -4. **Performance regression** - Link criterion results to regression baseline - -## Notes - -- All tests pass with 0 warnings -- No unsafe code or dangerous patterns (unwrap/expect checked) -- SPDX headers on all new test files -- Deterministic: Tests produce same results on repeated runs -- Fast: Full suite completes in <2 seconds -- Isolated: No test interdependencies - -## Architecture Insights - -The test suite validates: -- **Deterministic policy enforcement** via Oracle -- **Contractual commitment** to input/output/refusal taxonomy -- **Safe rejection** of dangerous patterns (hardcoded secrets, forbidden languages) -- **Audit trail** for compliance and debugging -- **Extensibility** for future SLM + Arbiter consensus layers - -All 123 tests reinforce the core principle: **Conative Gating enforces policy consistently, safely, and auditably.** diff --git a/TOPOLOGY.md b/TOPOLOGY.adoc similarity index 87% rename from TOPOLOGY.md rename to TOPOLOGY.adoc index 580d547..698d7aa 100644 --- a/TOPOLOGY.md +++ b/TOPOLOGY.adoc @@ -1,15 +1,8 @@ - - - +== Conative Gating — Project Topology -# Conative Gating — Project Topology +=== System Architecture -## System Architecture - -``` +.... ┌─────────────────────────────────────────┐ │ USER REQUEST │ │ (Proposal, Script, CLI) │ @@ -48,11 +41,11 @@ Copyright (c) Jonathan D.A. Jewell │ Justfile / Cargo .machine_readable/ │ │ Training Data Nickel Policy (ncl) │ └─────────────────────────────────────────┘ -``` +.... -## Completion Dashboard +=== Completion Dashboard -``` +.... COMPONENT STATUS NOTES ───────────────────────────────── ────────────────── ───────────────────────────────── CORE EVALUATION @@ -73,25 +66,26 @@ REPO INFRASTRUCTURE ───────────────────────────────────────────────────────────────────────────── OVERALL: █████████░ ~90% Production-ready cerebellum -``` +.... -## Key Dependencies +=== Key Dependencies -``` +.... Nickel Schema ───► Policy Oracle ───► Consensus Arbiter ───► Decision │ │ ▼ ▼ Training Data ────► SLM Evaluator -``` +.... -## Update Protocol +=== Update Protocol This file is maintained by both humans and AI agents. When updating: -1. **After completing a component**: Change its bar and percentage -2. **After adding a component**: Add a new row in the appropriate section -3. **After architectural changes**: Update the ASCII diagram -4. **Date**: Update the `Last updated` comment at the top of this file +[arabic] +. *After completing a component*: Change its bar and percentage +. *After adding a component*: Add a new row in the appropriate section +. *After architectural changes*: Update the ASCII diagram +. *Date*: Update the `+Last updated+` comment at the top of this file -Progress bars use: `█` (filled) and `░` (empty), 10 characters wide. -Percentages: 0%, 10%, 20%, ... 100% (in 10% increments). +Progress bars use: `+█+` (filled) and `+░+` (empty), 10 characters wide. +Percentages: 0%, 10%, 20%, … 100% (in 10% increments). diff --git a/docs/BADGE_SCHEMA.adoc b/docs/BADGE_SCHEMA.adoc index b24dab5..938be4b 100644 --- a/docs/BADGE_SCHEMA.adoc +++ b/docs/BADGE_SCHEMA.adoc @@ -39,10 +39,10 @@ Comprehensive badge structure for the 139-repo ecosystem, capturing: ==== RSR Tier Badges [source,asciidoc] ---- -// Tier 1 (Gold) - Rust, Elixir, Zig, Ada, Haskell, ReScript +// Tier 1 (Gold) - Rust, Elixir, Zig, Ada, Haskell, AffineScript image:https://img.shields.io/badge/RSR-Tier%201-gold[RSR Tier 1] -// Tier 2 (Silver) - Nickel, Racket, Guile, Nix +// Tier 2 (Silver) - Nickel, Racket, Guile, Guix image:https://img.shields.io/badge/RSR-Tier%202-silver[RSR Tier 2] // Infrastructure (Bronze) - Guix channels, derivations @@ -81,7 +81,7 @@ image:https://img.shields.io/badge/Maturity-LTS-green[LTS] |**Secondary Languages** |Supporting languages -|image:{badges-url}/Also-ReScript%20%7C%20Nickel-blue[] +|image:{badges-url}/Also-AffineScript%20%7C%20Nickel-blue[] |**Build System** |Package/build tooling @@ -93,7 +93,7 @@ image:https://img.shields.io/badge/Maturity-LTS-green[LTS] ---- image:https://img.shields.io/badge/Rust-1.75+-orange?logo=rust[Rust] image:https://img.shields.io/badge/Elixir-1.16+-purple?logo=elixir[Elixir] -image:https://img.shields.io/badge/ReScript-11+-pink?logo=rescript[ReScript] +image:https://img.shields.io/badge/AffineScript-11+-pink?logo=affinescript[AffineScript] image:https://img.shields.io/badge/Zig-0.13-yellow?logo=zig[Zig] image:https://img.shields.io/badge/Ada-2022-blue[Ada] image:https://img.shields.io/badge/Haskell-GHC%209-purple?logo=haskell[Haskell] @@ -105,14 +105,14 @@ image:https://img.shields.io/badge/Haskell-GHC%209-purple?logo=haskell[Haskell] image:https://img.shields.io/badge/Nickel-1.5+-teal[Nickel] image:https://img.shields.io/badge/Guile-3.0+-green[Guile Scheme] image:https://img.shields.io/badge/Racket-8.12+-red?logo=racket[Racket] -image:https://img.shields.io/badge/Nix-Flakes-5277C3?logo=nixos[Nix] +image:https://img.shields.io/badge/Guix-Flakes-5277C3?logo=nixos[Guix] ---- ==== Build System Badges [source,asciidoc] ---- image:https://img.shields.io/badge/Guix-Primary-purple?logo=gnu[Guix Primary] -image:https://img.shields.io/badge/Nix-Fallback-5277C3?logo=nixos[Nix Fallback] +image:https://img.shields.io/badge/Guix-Fallback-5277C3?logo=nixos[Guix Fallback] image:https://img.shields.io/badge/Cargo-Workspace-orange?logo=rust[Cargo] image:https://img.shields.io/badge/Mix-Project-purple?logo=elixir[Mix] ---- @@ -381,7 +381,7 @@ image:https://img.shields.io/badge/Layer-Service-green[Layer] // Infrastructure Row image:https://img.shields.io/badge/Guix-Primary-purple?logo=gnu[Guix] -image:https://img.shields.io/badge/Nix-Fallback-5277C3?logo=nixos[Nix] +image:https://img.shields.io/badge/Guix-Fallback-5277C3?logo=nixos[Guix] image:https://img.shields.io/badge/Container-nerdctl%20%2B%20Wolfi-blue[Container] // CI/CD Row @@ -521,7 +521,7 @@ The badge schema should be machine-readable from ECOSYSTEM.scm: (layer . service)) ((category . infrastructure) (build-primary . guix) - (build-fallback . nix) + (build-fallback . guix) (container . (nerdctl wolfi)) (ci . (github-actions gitlab-ci))) ((category . compliance) diff --git a/docs/CICD_HYPER_A_INTEGRATION.adoc b/docs/CICD_HYPER_A_INTEGRATION.adoc index 623ed54..923dcd3 100644 --- a/docs/CICD_HYPER_A_INTEGRATION.adoc +++ b/docs/CICD_HYPER_A_INTEGRATION.adoc @@ -53,11 +53,11 @@ cicd-hyper-a supports: Python, Go, Node.js, Rust, Java RSR requires templates for: [source] ---- -Tier 1: Rust, Elixir, Zig, Ada/SPARK, Haskell, ReScript -Tier 2: Nickel, Racket, Guile Scheme, Nix +Tier 1: Rust, Elixir, Zig, Ada/SPARK, Haskell, AffineScript +Tier 2: Nickel, Racket, Guile Scheme, Guix ---- -**Gap**: Need Ada, Elixir, Zig, Haskell, ReScript templates +**Gap**: Need Ada, Elixir, Zig, Haskell, AffineScript templates ==== Recommended Imports @@ -126,7 +126,7 @@ security-scan: |Zig language CI |Systems programming support -|ReScript/Deno +|AffineScript/Deno |Type-safe frontend CI |Web application builds @@ -171,28 +171,28 @@ validate-consent: [source,yaml] ---- -# templates/rescript.yml -# GitLab CI for ReScript projects +# templates/affinescript.yml +# GitLab CI for AffineScript projects -.rescript-base: +.affinescript-base: image: node:20-alpine before_script: - npm ci -rescript-build: - extends: .rescript-base +affinescript-build: + extends: .affinescript-base stage: build script: - - npx rescript + - npx affinescript artifacts: paths: - lib/ -rescript-test: - extends: .rescript-base +affinescript-test: + extends: .affinescript-base stage: test script: - - npx rescript + - npx affinescript - npm test ---- @@ -306,7 +306,7 @@ validate-state: === Phase 2: Export 1. Submit MAAF compliance templates to cicd-hyper-a -2. Contribute RSR language templates (Ada, Elixir, ReScript, Zig) +2. Contribute RSR language templates (Ada, Elixir, AffineScript, Zig) 3. Add Guix channel CI template 4. Contribute STATE.scm validation diff --git a/docs/DIRECTORY_STRUCTURE.adoc b/docs/DIRECTORY_STRUCTURE.adoc index a29f2dd..c0130e4 100644 --- a/docs/DIRECTORY_STRUCTURE.adoc +++ b/docs/DIRECTORY_STRUCTURE.adoc @@ -177,7 +177,7 @@ src/ └── modules/ # Feature modules ---- -==== ReScript +==== AffineScript [source] ---- src/ @@ -249,10 +249,10 @@ tests/ └── examples/ # Usage examples ---- -=== ReScript Projects +=== AffineScript Projects [source] ---- -+── rescript.json # ReScript config ++── affinescript.json # AffineScript config +── package.json # npm dependencies +── bsconfig.json # Legacy (if needed) └── __tests__/ # Jest tests @@ -271,13 +271,13 @@ tests/ └── priv/ # Private assets ---- -=== Guix/Nix Infrastructure +=== Guix/Guix Infrastructure [source] ---- +── guix.scm # Guix package +── .guix-channel # Channel definition -+── flake.nix # Nix flake (fallback) -+── flake.lock # Nix lockfile ++── flake.guix # Guix flake (fallback) ++── flake.lock # Guix lockfile └── modules/ # Scheme modules ---- @@ -302,7 +302,7 @@ The following should NOT appear at project root: |Python only in `salt/` subdirectory |`tsconfig.json` -|TypeScript deprecated (use ReScript) +|TypeScript deprecated (use AffineScript) |`.cue` files |CUE not permitted (use Guile/Nickel) @@ -387,4 +387,4 @@ This verifies: * No prohibited files at root * Correct directory structure * .well-known contents complete -* Guix/Nix configuration exists +* Guix/Guix configuration exists diff --git a/docs/GRIMREPO_SCRIPTS.adoc b/docs/GRIMREPO_SCRIPTS.adoc index 4fc99f0..3e848fa 100644 --- a/docs/GRIMREPO_SCRIPTS.adoc +++ b/docs/GRIMREPO_SCRIPTS.adoc @@ -8,7 +8,7 @@ Recommended scripts for https://gitlab.com/extensions-library/monkey-scripts/grimrepo-scripts[grimrepo-scripts] following RSR principles: -* **ReScript first** - Type-safe, compiles to clean JS +* **AffineScript first** - Type-safe, compiles to clean JS * **WASM where ideal** - Performance-critical operations * **Deno if needed** - Server-side or build tooling * **Modular architecture** - Common core with pluggable extensions @@ -19,7 +19,7 @@ Recommended scripts for https://gitlab.com/extensions-library/monkey-scripts/gri All scripts share a common core that handles: -[source,rescript] +[source,affinescript] ---- // grim-core.res - Shared infrastructure @@ -108,7 +108,7 @@ module UI = { Each script extends the core: -[source,rescript] +[source,affinescript] ---- // Example extension pattern module MyScript = { @@ -150,7 +150,7 @@ module MyScript = { |Target Sites |* |=== -[source,rescript] +[source,affinescript] ---- // grim-aibdp-checker.res module AibdpChecker = { @@ -232,7 +232,7 @@ Features: |Target Sites |Academic sites, blogs |=== -[source,rescript] +[source,affinescript] ---- // grim-citation-extractor.res module CitationExtractor = { @@ -346,7 +346,7 @@ Features: |Target Sites |* |=== -[source,rescript] +[source,affinescript] ---- // grim-a11y-overlay.res module A11yOverlay = { @@ -445,7 +445,7 @@ Uses WASM for fast DOM parsing and text extraction. |Target Sites |* |=== -[source,rescript] +[source,affinescript] ---- // grim-dark-mode.res module DarkMode = { @@ -536,9 +536,9 @@ module DarkMode = { |Target Sites |GitLab, GitHub |=== -==== 19. `grim-rescript-highlighter.res` +==== 19. `grim-affinescript-highlighter.res` -**Purpose**: Enhanced ReScript syntax highlighting +**Purpose**: Enhanced AffineScript syntax highlighting [cols="1,3"] |=== @@ -594,7 +594,7 @@ grimrepo-scripts/ │ ├── grim-aibdp-checker.user.js │ ├── grim-citation-extractor.user.js │ └── ... -├── rescript.json +├── affinescript.json ├── deno.json ├── Justfile └── STATE.scm @@ -613,7 +613,7 @@ build: build-core build-scripts # Build core module build-core: - npx rescript + npx affinescript esbuild lib/es6/src/core/*.js --bundle --outfile=dist/grim-core.js # Build individual scripts @@ -638,18 +638,18 @@ build-wasm: # Development watch dev: - npx rescript -w & + npx affinescript -w & deno task dev # Validate -check: check-rescript check-types +check: check-affinescript check-types @echo "✓ All checks passed" -check-rescript: - npx rescript format -check src/**/*.res +check-affinescript: + npx affinescript format -check src/**/*.res check-types: - npx rescript typecheck + npx affinescript typecheck ---- == WASM Integration @@ -675,9 +675,9 @@ pub fn calculate_contrast(fg: &str, bg: &str) -> f64 { } ---- -Load in ReScript: +Load in AffineScript: -[source,rescript] +[source,affinescript] ---- // WasmReadability.res @module("./wasm/readability.js") @@ -712,7 +712,7 @@ external calculateContrast: (string, string) => float = "calculate_contrast" 11. `grim-state-viewer.res` 12. `grim-nickel-preview.res` -13. `grim-rescript-highlighter.res` +13. `grim-affinescript-highlighter.res` === Phase 5 (WASM Enhanced) diff --git a/docs/MAAF_INTEGRATION.adoc b/docs/MAAF_INTEGRATION.adoc index 48c00ca..503af4d 100644 --- a/docs/MAAF_INTEGRATION.adoc +++ b/docs/MAAF_INTEGRATION.adoc @@ -24,10 +24,10 @@ The **Mutually Assured Accountability Framework (MAAF)** provides consent-first **Supporting Libraries**: * **bunsenite** — Nickel configuration loader with cross-language FFI -* **zoterho-template** — Zotero 7+ extension template (ReScript, Deno, Guile) +* **zoterho-template** — Zotero 7+ extension template (AffineScript, Deno, Guile) * **nickel-config-reporter** — Config→Nickel+AsciiDoc documentation generator * **sinople-theme** — Accessible WordPress theme for RSR project sites -* **grimrepo-scripts** — ReScript-first userscripts for browser automation +* **grimrepo-scripts** — AffineScript-first userscripts for browser automation == Core Components @@ -162,7 +162,7 @@ just test **4-Language Architecture**: * **Rust**: Core engine and prover abstraction * **Julia**: ML/neural proof synthesis (no Python) -* **ReScript**: UI with Deno runtime +* **AffineScript**: UI with Deno runtime * **Mercury/Logtalk**: Logic reservoir (optional) **MAAF Integration Points**: @@ -175,7 +175,7 @@ Knowledge graph → OpenCyc + indieweb2-bastion ---- **RSR Integration**: -[source,rescript] +[source,affinescript] ---- // src/ProofProvenance.res module Echidna = { @@ -247,7 +247,7 @@ vext → Deployment notifications ---- **MAAF Compliance**: -[source,rescript] +[source,affinescript] ---- // src/WharfConsent.res module Consent = { @@ -281,7 +281,7 @@ NOTE: The `wordpress-wharf` (gitlab) and `wharf` (github) repositories need reco **Architecture**: [source] ---- -Rust (nickel-lang-core) → Zig (C ABI) → Bindings (Deno, ReScript, C) +Rust (nickel-lang-core) → Zig (C ABI) → Bindings (Deno, AffineScript, C) ---- **RSR Integration Points**: @@ -290,8 +290,8 @@ Rust (nickel-lang-core) → Zig (C ABI) → Bindings (Deno, ReScript, C) * **indieweb2-bastion**: Load Nickel configuration * **cadre-router**: Parse routing policies -**Usage** (ReScript): -[source,rescript] +**Usage** (AffineScript): +[source,affinescript] ---- module Bunsenite = { @module("bunsenite") external loadNickel: string => Js.Json.t = "load" @@ -386,7 +386,7 @@ CI/CD pipelines → vsh-based automation . **Nickel Integration**: Native Nickel config parsing via bunsenite FFI . **AIBDP Support**: Built-in commands for .well-known/ management (kith-like) . **RSR Language Awareness**: Tier-aware tooling commands -. **Guix/Nix Integration**: Native package management primitives +. **Guix/Guix Integration**: Native package management primitives . **IRC Notifications**: Built-in irker/vext protocol support . **Git Workflow**: Native git hooks without Python . **Justfile Compatibility**: Parse/execute Justfile recipes @@ -634,7 +634,7 @@ check-consent: For projects requiring identity/DNS: -[source,rescript] +[source,affinescript] ---- // src/Identity.res module IndieWeb2 = { diff --git a/docs/REPO_CONSISTENCY.adoc b/docs/REPO_CONSISTENCY.adoc index 09749aa..88444ec 100644 --- a/docs/REPO_CONSISTENCY.adoc +++ b/docs/REPO_CONSISTENCY.adoc @@ -158,7 +158,7 @@ RSR projects are distributed across GitHub and GitLab. This guide documents the |**Generic RSR template demo** |Stack -|ReScript + Deno + CUE +|AffineScript + Deno + CUE |Minimal RSR compliance files |Content diff --git a/docs/REPO_STANDARDIZATION.adoc b/docs/REPO_STANDARDIZATION.adoc index e447099..a597e78 100644 --- a/docs/REPO_STANDARDIZATION.adoc +++ b/docs/REPO_STANDARDIZATION.adoc @@ -22,7 +22,7 @@ toc::[] |.editorconfig |27 |112 |100% |.well-known/ files |0 |139 |100% |Containerfile |26 |113 |100% -|flake.nix |60 |79 |100% +|flake.guix |60 |79 |100% |STATE.scm |99 |40 |100% |RSR_COMPLIANCE.adoc |2 |137 |100% |=== @@ -33,7 +33,7 @@ toc::[] .editorconfig:: Standard formatting rules * Encoding: UTF-8 -* Indent: 2 spaces (YAML, JSON, Nix), 4 spaces (Rust, Python) +* Indent: 2 spaces (YAML, JSON, Guix), 4 spaces (Rust, Python) * Trim trailing whitespace * Final newline @@ -117,7 +117,7 @@ Containerfile:: Container build * Multi-stage build pattern * nerdctl compatible -flake.nix:: Nix flake +flake.guix:: Guix flake * Development shell * Build outputs * Language-specific devShell @@ -164,7 +164,7 @@ CLAUDE.adoc:: Project-specific instructions ==== Standard Topics (include as applicable) - `rhodium-standard` (all RSR-compliant repos) -- Language tags: `rust`, `rescript`, `elixir`, `zig`, `ada`, `haskell` +- Language tags: `rust`, `affinescript`, `elixir`, `zig`, `ada`, `haskell` - Domain tags: `security`, `automation`, `devtools`, `web` === Language/Project Specific @@ -174,7 +174,7 @@ Cargo.toml:: Rust projects * Dependencies * Features -package.json:: Node/ReScript projects +package.json:: Node/AffineScript projects * Dependencies * Scripts @@ -206,7 +206,7 @@ STATE.scm:: Guile state file === Phase 2: Build Infrastructure 1. `justfile` - Add to 63 repos 2. `Containerfile` - Add to 113 repos -3. `flake.nix` - Add to 79 repos +3. `flake.guix` - Add to 79 repos === Phase 3: Documentation 1. `RSR_COMPLIANCE.adoc` - Add to 137 repos @@ -278,7 +278,7 @@ gh repo edit owner/repo --enable-issues --enable-wiki=false |Rust Library |~21 |Cargo.toml, src/lib.rs |Rust Binary |~15 |Cargo.toml, src/main.rs -|ReScript |~12 |rescript.json, src/*.res +|AffineScript |~12 |affinescript.json, src/*.res |Elixir |~3 |mix.exs, lib/ |TypeScript (convert) |~19 |package.json, src/*.ts |Python (convert) |~5 |pyproject.toml, src/*.py diff --git a/docs/REPO_VARIATIONS.adoc b/docs/REPO_VARIATIONS.adoc index 33f9d38..32f7831 100644 --- a/docs/REPO_VARIATIONS.adoc +++ b/docs/REPO_VARIATIONS.adoc @@ -19,11 +19,11 @@ Based on primary build system detection: |Rust (binary) |~10 |conflow, echidna, ipv6-only, dicti0nary-attack |Rust (library) |~11 |conative-gating, absolute-zero, modshells -|ReScript |~18 |idaptiky, broad-spectrum, UbiCity, fogbinder +|AffineScript |~18 |idaptiky, broad-spectrum, UbiCity, fogbinder |Elixir |~3 |bofig, tma-mark2, hybrid-automation-router |JavaScript/TS |~5 |7-tentacles, sinople-wharf, accessibility-everywhere |Python (to convert) |~2 |vext, jtv-playground (experiments) -|Nix-only |~35 |STATE.scm, git-hud, wp-praxis +|Guix-only |~35 |STATE.scm, git-hud, wp-praxis |=== == Per-Repository Variations @@ -49,7 +49,7 @@ Based on primary build system detection: - `tier-1` or `tier-2` - RSR language tier ==== Language Topics -- `rust`, `rescript`, `elixir`, `zig`, `ada`, `haskell`, `racket`, `nickel` +- `rust`, `affinescript`, `elixir`, `zig`, `ada`, `haskell`, `racket`, `nickel` ==== Domain Topics (Choose Applicable) - `security`, `automation`, `devtools`, `cli` @@ -75,7 +75,7 @@ categories = ["..."] # VARIES # VARIES per project ---- -==== ReScript Projects (rescript.json) +==== AffineScript Projects (affinescript.json) [source,json] ---- { @@ -106,7 +106,7 @@ end |=== |Recipe |Variations -|`build` |`cargo build`, `rescript build`, `mix compile` +|`build` |`cargo build`, `affinescript build`, `mix compile` |`test` |`cargo test`, `npm test`, `mix test` |`lint` |`cargo clippy`, `npm run lint`, `mix format --check-formatted` |`dev` |`cargo watch`, `npm run dev`, `mix phx.server` @@ -122,7 +122,7 @@ strategy: os: [ubuntu-latest, macos-latest] rust: [stable, nightly] -# ReScript projects +# AffineScript projects strategy: matrix: node: [18, 20] @@ -138,12 +138,12 @@ strategy: ==== Base Image Selection - `cgr.dev/chainguard/rust:latest` - Rust projects -- `cgr.dev/chainguard/node:latest` - JS/TS/ReScript +- `cgr.dev/chainguard/node:latest` - JS/TS/AffineScript - `cgr.dev/chainguard/elixir:latest` - Elixir projects ==== Multi-stage Build Targets - Rust: Build with `cargo build --release`, copy binary -- ReScript: Build with `npm run build`, copy dist +- AffineScript: Build with `npm run build`, copy dist - Elixir: Build with `mix release`, copy release === Documentation Variations @@ -205,7 +205,7 @@ status = "compliant" # VARIES: compliant/partial/exempt [compliance] rust = true # VARIES per language -rescript = false +affinescript = false elixir = false [exemptions] @@ -218,12 +218,12 @@ legacy_js = false [cols="1,1,1,1,1,1"] |=== -|Aspect |Rust Binary |Rust Library |ReScript |Elixir |Nix-only +|Aspect |Rust Binary |Rust Library |AffineScript |Elixir |Guix-only -|Entry point |src/main.rs |src/lib.rs |src/Main.res |lib/app.ex |flake.nix -|Build cmd |cargo build |cargo build |npm run build |mix compile |nix build -|Test cmd |cargo test |cargo test |npm test |mix test |nix check -|Package file |Cargo.toml |Cargo.toml |package.json |mix.exs |flake.nix +|Entry point |src/main.rs |src/lib.rs |src/Main.res |lib/app.ex |flake.guix +|Build cmd |cargo build |cargo build |npm run build |mix compile |guix build +|Test cmd |cargo test |cargo test |npm test |mix test |guix check +|Package file |Cargo.toml |Cargo.toml |package.json |mix.exs |flake.guix |Container base |chainguard/rust |chainguard/rust |chainguard/node |chainguard/elixir |chainguard/static |CI matrix |rust: stable/nightly |rust: stable |node: 18/20 |elixir: 1.15/1.16 |nixos-unstable |=== @@ -239,7 +239,7 @@ repo,language,tier,ci_status,compliance_status,topics,description conative-gating,rust,1,passing,compliant,"rust,security,ai",Policy enforcement oracle ipv6-only,rust,1,passing,compliant,"rust,networking,ipv6",IPv6 tools dicti0nary-attack,rust,1,passing,compliant,"rust,security",Password tools -idaptiky,rescript,1,pending,partial,"rescript,web",Web app +idaptiky,affinescript,1,pending,partial,"affinescript,web",Web app ... ---- diff --git a/docs/STATE_ECOSYSTEM_SCHEMA.adoc b/docs/STATE_ECOSYSTEM_SCHEMA.adoc index 0bc44d8..ef8a133 100644 --- a/docs/STATE_ECOSYSTEM_SCHEMA.adoc +++ b/docs/STATE_ECOSYSTEM_SCHEMA.adoc @@ -355,7 +355,7 @@ Aggregate ecosystem statistics: ((phase . archived) (count . 9))) (by-language ((language . rust) (count . 21)) - ((language . rescript) (count . 26)) + ((language . affinescript) (count . 26)) ((language . guix) (count . 82)) ((language . elixir) (count . 3)) ((language . javascript) (count . 6)) diff --git a/docs/VSH_IMPROVEMENTS.adoc b/docs/VSH_IMPROVEMENTS.adoc index 986e739..c6fe7e7 100644 --- a/docs/VSH_IMPROVEMENTS.adoc +++ b/docs/VSH_IMPROVEMENTS.adoc @@ -187,8 +187,8 @@ fi RSR defines language tiers for project standardization: -* **Tier 1**: Rust, Elixir, Zig, Ada/SPARK, Haskell, ReScript -* **Tier 2**: Nickel, Racket, Guile Scheme, Nix +* **Tier 1**: Rust, Elixir, Zig, Ada/SPARK, Haskell, AffineScript +* **Tier 2**: Nickel, Racket, Guile Scheme, Guix * **Prohibited**: TypeScript, JavaScript, Python (except salt/), Go, CUE Native tier awareness would help enforce standards and provide helpful tooling. @@ -200,8 +200,8 @@ Native tier awareness would help enforce standards and provide helpful tooling. [source,bash] ---- # ~/.config/vsh/rsr.conf or project .vshrc -rsr_tier_1=(rust elixir zig ada haskell rescript) -rsr_tier_2=(nickel racket guile nix) +rsr_tier_1=(rust elixir zig ada haskell affinescript) +rsr_tier_2=(nickel racket guile guix) rsr_prohibited=(typescript javascript python go cue) ---- @@ -247,17 +247,17 @@ rsr build # - mix.exs → mix compile # - build.zig → zig build # - *.gpr → gprbuild -# - rescript.json → rescript +# - affinescript.json → affinescript # Run tests by tier rsr test --tier 1 ---- -== Proposal 4: Guix/Nix Package Management Primitives +== Proposal 4: Guix/Guix Package Management Primitives === Rationale -RSR uses Guix as primary package manager with Nix as fallback. Native primitives would: +RSR uses Guix as primary package manager with Guix as fallback. Native primitives would: * Simplify reproducible builds * Enable declarative environment management @@ -288,30 +288,30 @@ guix environment --pure --manifest=guix.scm guix challenge ---- -==== Nix Primitives (Fallback) +==== Guix Primitives (Fallback) [source,bash] ---- -# Enter Nix shell -nix shell nixpkgs#rust nixpkgs#cargo +# Enter Guix shell +guix shell nixpkgs#rust nixpkgs#cargo # With flake -nix develop +guix develop # Build -nix build +guix build # Run -nix run .#default +guix run .#default ---- ==== Unified Interface [source,bash] ---- -# Auto-detect Guix vs Nix +# Auto-detect Guix vs Guix pkg shell rust cargo -# Uses Guix if available, falls back to Nix +# Uses Guix if available, falls back to Guix # Environment management pkg env create dev @@ -681,7 +681,7 @@ just2vsh diff Justfile recipes.vsh |Medium |6 -|Guix/Nix Primitives +|Guix/Guix Primitives |Package management |High diff --git a/docs/ZOTERHO_INTEGRATION.adoc b/docs/ZOTERHO_INTEGRATION.adoc index becfc2c..566b7ed 100644 --- a/docs/ZOTERHO_INTEGRATION.adoc +++ b/docs/ZOTERHO_INTEGRATION.adoc @@ -15,7 +15,7 @@ **Target Stack** (RSR-compliant): -* **ReScript** — Type-safe language (Tier 1) +* **AffineScript** — Type-safe language (Tier 1) * **Deno** — Runtime (no npm/Node.js) * **Guile Scheme** — Configuration (replaces CUE) * **Justfile** — Build automation @@ -125,7 +125,7 @@ cue-to-guile: |**zotero-nsai** |Direct use - Zotero extension -|Migrate from TypeScript to ReScript via zoterho-template +|Migrate from TypeScript to AffineScript via zoterho-template |**fogbinder** |Companion to zotero-nsai @@ -147,7 +147,7 @@ cue-to-guile: === zotero-nsai Migration Path **Current State**: TypeScript + Node.js + Vite -**Target State**: ReScript + Deno + Guile (via zoterho-template) +**Target State**: AffineScript + Deno + Guile (via zoterho-template) ==== Phase 1: Scaffolding @@ -158,17 +158,17 @@ git clone https://gitlab.com/extensions-library/zotero/zoterho-template # Create zotero-nsai-v2 branch cd zotero-nsai -git checkout -b v2-rescript +git checkout -b v2-affinescript # Copy zoterho structure -cp -r ../zoterho-template/src/rescript src/ +cp -r ../zoterho-template/src/affinescript src/ cp -r ../zoterho-template/config config/ cp ../zoterho-template/justfile . ---- ==== Phase 2: Type Migration -[source,rescript] +[source,affinescript] ---- // src/Types.res // Migrate from TypeScript atomic.ts @@ -197,7 +197,7 @@ type atomicCitation = { ==== Phase 3: Logic Migration -[source,rescript] +[source,affinescript] ---- // src/Validator.res // Migrate from TypeScript validator.ts @@ -239,10 +239,10 @@ module TractarianValidator = { ==== Phase 4: Fogbinder Handoff -[source,rescript] +[source,affinescript] ---- // src/FogbinderHandoff.res -// ReScript version of handoff.ts +// AffineScript version of handoff.ts type uncertaintyRegion = { citationId: string, @@ -350,13 +350,13 @@ default: build # Build extension build: validate-config - npx rescript + npx affinescript just build-manifest deno task build # Development mode dev: - npx rescript -w & + npx affinescript -w & deno task dev # Clean build @@ -384,7 +384,7 @@ test: # Lint lint: - npx rescript format -check src/**/*.res + npx affinescript format -check src/**/*.res # Validate configurations validate-config: @@ -504,7 +504,7 @@ zoterho-template/ │ └── migrate-cue.scm ├── STATE.scm ├── Justfile -├── rescript.json +├── affinescript.json ├── deno.json └── README.adoc ---- @@ -518,7 +518,7 @@ zoterho-template/ [ ] Clone zoterho-template [ ] Update config/extension.scm with project details [ ] Create validation rules in config/validation.scm -[ ] Implement ReScript logic in src/ +[ ] Implement AffineScript logic in src/ [ ] Add .well-known/aibdp.json for citation consent [ ] Configure STATE.scm [ ] Run: just ci-verify @@ -528,12 +528,12 @@ zoterho-template/ [source] ---- -[ ] Create v2-rescript branch +[ ] Create v2-affinescript branch [ ] Copy zoterho-template structure -[ ] Migrate TypeScript types to ReScript -[ ] Migrate validation logic to ReScript +[ ] Migrate TypeScript types to AffineScript +[ ] Migrate validation logic to AffineScript [ ] Replace CUE with Guile configs -[ ] Update Fogbinder handoff to ReScript +[ ] Update Fogbinder handoff to AffineScript [ ] Run: just test [ ] Deprecate TypeScript version ---- diff --git a/docs/tech-debt-2026-05-26.adoc b/docs/tech-debt-2026-05-26.adoc new file mode 100644 index 0000000..9bd060b --- /dev/null +++ b/docs/tech-debt-2026-05-26.adoc @@ -0,0 +1,71 @@ +== Tech-Debt Audit — conative-gating — 2026-05-26 + +*Source:* estate-wide automated scan 2026-05-26. *Companion:* +https://github.com/hyperpolymath/standards/tree/main/docs/audits[`+hyperpolymath/standards+` +2026-05-26-estate-*-debt audits]. *Combined severity:* `+LOW+`. + +This file records the _raw findings_ — it does not by itself fix the +debt. Each section ends with a '`Recommended next move`' line; closing +the debt is follow-up work. + +=== 1. Proof debt + +No proof-bearing files (`+*.v+`, `+*.lean+`, `+*.agda+`, `+*.idr+`, +`+*.idr2+`, `+*.fst+`, `+*.dfy+`, `+*.tla+`, `+*.ads+`, `+*.adb+`) found +in this repo. + +*Recommended next move:* none. + +=== 2. Licence debt + +[cols=",",options="header",] +|=== +|Field |Value +|LICENSE file |`+LICENSE+` +|SPDX header |`+MPL-2.0+` +|Manifest licence |`+MPL-2.0+` +|Body classifier |`+Palimp-MPL-2.0+` +|Severity |`+ok+` +|=== + +*Recommended next move:* none for licence. + +=== 3. Documentation debt + +[cols=",",options="header",] +|=== +|Field |Value +|README lines |329 +|`+docs/+` files |14 +|`+docs/+` LoC |5903 +|CHANGELOG.md |N +|CONTRIBUTING.md |Y +|CODE_OF_CONDUCT.md |Y +|SECURITY.md |Y +|Severity |`+LOW+` +|=== + +*Recommended next move:* `+docs/+` has only 14 file(s). Aim for ≥10 +organised docs (architecture, usage, contributing-guide, +troubleshooting, design-decisions). The user’s bar for a +"`heavily-developed and well-organised wiki`" is ≥10 files with topical +organisation. + +Additionally: *CHANGELOG.md is missing.* 65% of estate repos lack one — +adopting a CHANGELOG (or auto-generating via `+git-cliff+`) is a +recommended estate-wide follow-up. + +=== Cross-references + +* Estate proof-debt audit: +`+hyperpolymath/standards/docs/audits/2026-05-26-estate-proof-debt.md+` +* Estate licence-debt audit: +`+hyperpolymath/standards/docs/audits/2026-05-26-estate-licence-debt.md+` +* Estate documentation-debt audit: +`+hyperpolymath/standards/docs/audits/2026-05-26-estate-documentation-debt.md+` + +''''' + +🤖 Generated by Claude Code estate-wide tech-debt scan (2026-05-26). +This file is informational — closing the debt is follow-up work owned by +the maintainer. diff --git a/docs/tech-debt-2026-05-26.md b/docs/tech-debt-2026-05-26.md deleted file mode 100644 index b893ecc..0000000 --- a/docs/tech-debt-2026-05-26.md +++ /dev/null @@ -1,56 +0,0 @@ - -# Tech-Debt Audit — conative-gating — 2026-05-26 - -**Source:** estate-wide automated scan 2026-05-26. -**Companion:** [`hyperpolymath/standards` 2026-05-26-estate-*-debt audits](https://github.com/hyperpolymath/standards/tree/main/docs/audits). -**Combined severity:** `LOW`. - -This file records the *raw findings* — it does not by itself fix the debt. Each section ends with a 'Recommended next move' line; closing the debt is follow-up work. - -## 1. Proof debt - -No proof-bearing files (`*.v`, `*.lean`, `*.agda`, `*.idr`, `*.idr2`, `*.fst`, `*.dfy`, `*.tla`, `*.ads`, `*.adb`) found in this repo. - -**Recommended next move:** none. - -## 2. Licence debt - -| Field | Value | -|---|---| -| LICENSE file | `LICENSE` | -| SPDX header | `MPL-2.0` | -| Manifest licence | `MPL-2.0` | -| Body classifier | `Palimp-MPL-2.0` | -| Severity | `ok` | - -**Recommended next move:** none for licence. - -## 3. Documentation debt - -| Field | Value | -|---|---| -| README lines | 329 | -| `docs/` files | 14 | -| `docs/` LoC | 5903 | -| CHANGELOG.md | N | -| CONTRIBUTING.md | Y | -| CODE_OF_CONDUCT.md | Y | -| SECURITY.md | Y | -| Severity | `LOW` | - -**Recommended next move:** `docs/` has only 14 file(s). Aim for ≥10 organised docs (architecture, usage, contributing-guide, troubleshooting, design-decisions). The user's bar for a "heavily-developed and well-organised wiki" is ≥10 files with topical organisation. - -Additionally: **CHANGELOG.md is missing.** 65% of estate repos lack one — adopting a CHANGELOG (or auto-generating via `git-cliff`) is a recommended estate-wide follow-up. - -## Cross-references - -- Estate proof-debt audit: `hyperpolymath/standards/docs/audits/2026-05-26-estate-proof-debt.md` -- Estate licence-debt audit: `hyperpolymath/standards/docs/audits/2026-05-26-estate-licence-debt.md` -- Estate documentation-debt audit: `hyperpolymath/standards/docs/audits/2026-05-26-estate-documentation-debt.md` - ---- - -🤖 Generated by Claude Code estate-wide tech-debt scan (2026-05-26). This file is informational — closing the debt is follow-up work owned by the maintainer. diff --git a/examples/web-project-deno.json b/examples/web-project-deno.json index 5ddd3bd..ee775a4 100644 --- a/examples/web-project-deno.json +++ b/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/llm-warmup-dev.adoc b/llm-warmup-dev.adoc new file mode 100644 index 0000000..8823737 --- /dev/null +++ b/llm-warmup-dev.adoc @@ -0,0 +1,19 @@ +== LLM Warmup — conative-gating (Developer) + +=== What is conative-gating? + +See README.adoc for overview. + +=== Key Commands + +* `+just setup+` — set up development environment +* `+just build+` — build the project +* `+just test+` — run tests +* `+just doctor+` — diagnose issues +* `+just heal+` — attempt auto-repair + +=== Quick Context + +* License: MPL-2.0 +* Part of hyperpolymath ecosystem +* See EXPLAINME.adoc for architecture diff --git a/llm-warmup-dev.md b/llm-warmup-dev.md deleted file mode 100644 index 2b8a651..0000000 --- a/llm-warmup-dev.md +++ /dev/null @@ -1,20 +0,0 @@ - -# LLM Warmup — conative-gating (Developer) - -## What is conative-gating? -See README.adoc for overview. - -## Key Commands -- `just setup` — set up development environment -- `just build` — build the project -- `just test` — run tests -- `just doctor` — diagnose issues -- `just heal` — attempt auto-repair - -## Quick Context -- License: MPL-2.0 -- Part of hyperpolymath ecosystem -- See EXPLAINME.adoc for architecture diff --git a/llm-warmup-user.adoc b/llm-warmup-user.adoc new file mode 100644 index 0000000..87e9f31 --- /dev/null +++ b/llm-warmup-user.adoc @@ -0,0 +1,19 @@ +== LLM Warmup — conative-gating (User) + +=== What is conative-gating? + +See README.adoc for overview. + +=== Key Commands + +* `+just setup+` — set up development environment +* `+just build+` — build the project +* `+just test+` — run tests +* `+just doctor+` — diagnose issues +* `+just heal+` — attempt auto-repair + +=== Quick Context + +* License: MPL-2.0 +* Part of hyperpolymath ecosystem +* See EXPLAINME.adoc for architecture diff --git a/llm-warmup-user.md b/llm-warmup-user.md deleted file mode 100644 index 2a8aa87..0000000 --- a/llm-warmup-user.md +++ /dev/null @@ -1,20 +0,0 @@ - -# LLM Warmup — conative-gating (User) - -## What is conative-gating? -See README.adoc for overview. - -## Key Commands -- `just setup` — set up development environment -- `just build` — build the project -- `just test` — run tests -- `just doctor` — diagnose issues -- `just heal` — attempt auto-repair - -## Quick Context -- License: MPL-2.0 -- Part of hyperpolymath ecosystem -- See EXPLAINME.adoc for architecture diff --git a/training/violations/01-infrastructure.adoc b/training/violations/01-infrastructure.adoc new file mode 100644 index 0000000..897f185 --- /dev/null +++ b/training/violations/01-infrastructure.adoc @@ -0,0 +1,30 @@ +== Category 1: Foundational Infrastructure + +____ +For SLM training: These requirements establish the technical foundation +for reproducible, maintainable projects. +____ + +=== Requirements + +* [ ] `+flake.guix+` - Guix development environment +* [ ] `+justfile+` - Task automation +* [ ] `+.gitlab-ci.yml+` or `+.github/workflows/+` - CI/CD +* [ ] Container support (Containerfile/Dockerfile) + +=== Compliance Indicators + +*Compliant:* - Project has `+flake.guix+` with development shell - +Build/test tasks documented in `+justfile+` - CI/CD pipeline exists and +passes - Container builds successfully + +*Violation Examples:* - Missing reproducible environment definition - +Build instructions only in README prose - No CI/CD pipeline - Untested +container configuration + +=== SLM Training Notes + +When evaluating proposals: - Flag creation of projects without +`+flake.guix+` - Flag manual build instructions instead of `+justfile+` +- Check that CI/CD changes don’t break existing pipeline - Verify +container changes are tested diff --git a/training/violations/01-infrastructure.md b/training/violations/01-infrastructure.md deleted file mode 100644 index 911da48..0000000 --- a/training/violations/01-infrastructure.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Category 1: Foundational Infrastructure - -> For SLM training: These requirements establish the technical foundation for reproducible, maintainable projects. - -## Requirements - -- [ ] `flake.nix` - Nix development environment -- [ ] `justfile` - Task automation -- [ ] `.gitlab-ci.yml` or `.github/workflows/` - CI/CD -- [ ] Container support (Containerfile/Dockerfile) - -## Compliance Indicators - -**Compliant:** -- Project has `flake.nix` with development shell -- Build/test tasks documented in `justfile` -- CI/CD pipeline exists and passes -- Container builds successfully - -**Violation Examples:** -- Missing reproducible environment definition -- Build instructions only in README prose -- No CI/CD pipeline -- Untested container configuration - -## SLM Training Notes - -When evaluating proposals: -- Flag creation of projects without `flake.nix` -- Flag manual build instructions instead of `justfile` -- Check that CI/CD changes don't break existing pipeline -- Verify container changes are tested diff --git a/training/violations/02-documentation.adoc b/training/violations/02-documentation.adoc new file mode 100644 index 0000000..738dd62 --- /dev/null +++ b/training/violations/02-documentation.adoc @@ -0,0 +1,30 @@ +== Category 2: Documentation Standards + +____ +For SLM training: Documentation should describe the project, not +meta-frameworks. +____ + +=== Requirements + +* [ ] `+README.adoc+` or `+README.md+` - Project description +* [ ] `+LICENSE.txt+` - Clear license +* [ ] `+CODE_OF_CONDUCT.adoc+` - Community standards +* [ ] `+CONTRIBUTING.adoc+` - Contribution guide + +=== Compliance Indicators + +*Compliant:* - README opens with project description (what it does) - +License is standard and machine-readable - Code of conduct establishes +clear expectations - Contributing guide explains the process + +*Violation Examples:* - README that’s 80% compliance framework +discussion - Missing or unclear license - No community standards - +Contributing guide that’s just "`PRs welcome`" + +=== SLM Training Notes + +When evaluating proposals: - Flag READMEs that lead with framework +compliance - Ensure project purpose is clear in first paragraph - Check +that documentation changes match project reality - Maximum 20% of README +should be meta-commentary diff --git a/training/violations/02-documentation.md b/training/violations/02-documentation.md deleted file mode 100644 index cd81693..0000000 --- a/training/violations/02-documentation.md +++ /dev/null @@ -1,36 +0,0 @@ - -# Category 2: Documentation Standards - -> For SLM training: Documentation should describe the project, not meta-frameworks. - -## Requirements - -- [ ] `README.adoc` or `README.md` - Project description -- [ ] `LICENSE.txt` - Clear license -- [ ] `CODE_OF_CONDUCT.adoc` - Community standards -- [ ] `CONTRIBUTING.adoc` - Contribution guide - -## Compliance Indicators - -**Compliant:** -- README opens with project description (what it does) -- License is standard and machine-readable -- Code of conduct establishes clear expectations -- Contributing guide explains the process - -**Violation Examples:** -- README that's 80% compliance framework discussion -- Missing or unclear license -- No community standards -- Contributing guide that's just "PRs welcome" - -## SLM Training Notes - -When evaluating proposals: -- Flag READMEs that lead with framework compliance -- Ensure project purpose is clear in first paragraph -- Check that documentation changes match project reality -- Maximum 20% of README should be meta-commentary diff --git a/training/violations/03-security.adoc b/training/violations/03-security.adoc new file mode 100644 index 0000000..8d3b172 --- /dev/null +++ b/training/violations/03-security.adoc @@ -0,0 +1,28 @@ +== Category 3: Security Architecture + +____ +For SLM training: Security is built-in, not bolted-on. +____ + +=== Requirements + +* [ ] `+SECURITY.md+` - Vulnerability disclosure policy +* [ ] SPDX headers in source files +* [ ] Type-safe language or strict typing enabled + +=== Compliance Indicators + +*Compliant:* - Clear process for reporting vulnerabilities - All source +files have SPDX license identifiers - Language choice prioritizes type +safety - Strict mode enabled where applicable + +*Violation Examples:* - No security contact information - Mixed or +unclear licensing in code - Using dynamic languages without type +checking - Disabling strict mode for convenience + +=== SLM Training Notes + +When evaluating proposals: - Flag code without SPDX headers - Flag +disabling of type checking or strict mode - Ensure new dependencies +don’t introduce vulnerabilities - Check that security-sensitive code is +properly typed diff --git a/training/violations/03-security.md b/training/violations/03-security.md deleted file mode 100644 index 0a7cbe1..0000000 --- a/training/violations/03-security.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 3: Security Architecture - -> For SLM training: Security is built-in, not bolted-on. - -## Requirements - -- [ ] `SECURITY.md` - Vulnerability disclosure policy -- [ ] SPDX headers in source files -- [ ] Type-safe language or strict typing enabled - -## Compliance Indicators - -**Compliant:** -- Clear process for reporting vulnerabilities -- All source files have SPDX license identifiers -- Language choice prioritizes type safety -- Strict mode enabled where applicable - -**Violation Examples:** -- No security contact information -- Mixed or unclear licensing in code -- Using dynamic languages without type checking -- Disabling strict mode for convenience - -## SLM Training Notes - -When evaluating proposals: -- Flag code without SPDX headers -- Flag disabling of type checking or strict mode -- Ensure new dependencies don't introduce vulnerabilities -- Check that security-sensitive code is properly typed diff --git a/training/violations/04-architecture.adoc b/training/violations/04-architecture.adoc new file mode 100644 index 0000000..e90c601 --- /dev/null +++ b/training/violations/04-architecture.adoc @@ -0,0 +1,28 @@ +== Category 4: Architecture Principles + +____ +For SLM training: Design for resilience and user autonomy. +____ + +=== Requirements + +* [ ] Offline-first design +* [ ] Reversible operations +* [ ] CRDT-friendly data structures + +=== Compliance Indicators + +*Compliant:* - Core functionality works without network - Operations can +be undone or have clear recovery paths - Data structures support +eventual consistency - No hard dependency on external services + +*Violation Examples:* - Requiring network for local operations - +Destructive operations without confirmation - Data structures that can’t +merge - Tight coupling to specific cloud services + +=== SLM Training Notes + +When evaluating proposals: - Flag designs that require constant +connectivity - Flag irreversible operations without explicit user +consent - Check that data models can handle concurrent modifications - +Ensure external service dependencies are abstracted diff --git a/training/violations/04-architecture.md b/training/violations/04-architecture.md deleted file mode 100644 index da706bc..0000000 --- a/training/violations/04-architecture.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 4: Architecture Principles - -> For SLM training: Design for resilience and user autonomy. - -## Requirements - -- [ ] Offline-first design -- [ ] Reversible operations -- [ ] CRDT-friendly data structures - -## Compliance Indicators - -**Compliant:** -- Core functionality works without network -- Operations can be undone or have clear recovery paths -- Data structures support eventual consistency -- No hard dependency on external services - -**Violation Examples:** -- Requiring network for local operations -- Destructive operations without confirmation -- Data structures that can't merge -- Tight coupling to specific cloud services - -## SLM Training Notes - -When evaluating proposals: -- Flag designs that require constant connectivity -- Flag irreversible operations without explicit user consent -- Check that data models can handle concurrent modifications -- Ensure external service dependencies are abstracted diff --git a/training/violations/05-web-standards.adoc b/training/violations/05-web-standards.adoc new file mode 100644 index 0000000..312dd0a --- /dev/null +++ b/training/violations/05-web-standards.adoc @@ -0,0 +1,28 @@ +== Category 5: Web Standards + +____ +For SLM training: Follow established web conventions for +discoverability. +____ + +=== Requirements + +* [ ] `+.well-known/+` directory for service discovery +* [ ] DNSSEC support for domain verification +* [ ] Security headers configured correctly + +=== Compliance Indicators + +*Compliant:* - `+.well-known/+` contains relevant discovery files - DNS +records include DNSSEC signatures - HTTP responses include security +headers - Follows standard URIs and protocols + +*Violation Examples:* - Custom discovery mechanisms - Unsigned DNS +records - Missing Content-Security-Policy - Non-standard URI schemes + +=== SLM Training Notes + +When evaluating proposals: - Flag custom discovery mechanisms when +standards exist - Ensure security headers are present in web responses - +Check that any web components follow standard patterns - Verify URLs are +properly formed and stable diff --git a/training/violations/05-web-standards.md b/training/violations/05-web-standards.md deleted file mode 100644 index 9ea0f54..0000000 --- a/training/violations/05-web-standards.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 5: Web Standards - -> For SLM training: Follow established web conventions for discoverability. - -## Requirements - -- [ ] `.well-known/` directory for service discovery -- [ ] DNSSEC support for domain verification -- [ ] Security headers configured correctly - -## Compliance Indicators - -**Compliant:** -- `.well-known/` contains relevant discovery files -- DNS records include DNSSEC signatures -- HTTP responses include security headers -- Follows standard URIs and protocols - -**Violation Examples:** -- Custom discovery mechanisms -- Unsigned DNS records -- Missing Content-Security-Policy -- Non-standard URI schemes - -## SLM Training Notes - -When evaluating proposals: -- Flag custom discovery mechanisms when standards exist -- Ensure security headers are present in web responses -- Check that any web components follow standard patterns -- Verify URLs are properly formed and stable diff --git a/training/violations/06-semantic-web.adoc b/training/violations/06-semantic-web.adoc new file mode 100644 index 0000000..8167396 --- /dev/null +++ b/training/violations/06-semantic-web.adoc @@ -0,0 +1,27 @@ +== Category 6: Semantic Web & IndieWeb + +____ +For SLM training: Enable machine-readable content and decentralized +interaction. +____ + +=== Requirements + +* [ ] Schema.org metadata for structured data +* [ ] Webmention support for decentralized comments + +=== Compliance Indicators + +*Compliant:* - Pages include Schema.org JSON-LD - Webmention endpoint is +configured - Content is machine-parseable - Supports IndieAuth where +applicable + +*Violation Examples:* - No structured data markup - Closed commenting +systems only - Proprietary data formats - Requiring centralized identity + +=== SLM Training Notes + +When evaluating proposals: - Flag web pages without Schema.org markup - +Check that content can be consumed programmatically - Ensure +interoperability with federated systems - Verify no lock-in to specific +platforms diff --git a/training/violations/06-semantic-web.md b/training/violations/06-semantic-web.md deleted file mode 100644 index 568d15d..0000000 --- a/training/violations/06-semantic-web.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Category 6: Semantic Web & IndieWeb - -> For SLM training: Enable machine-readable content and decentralized interaction. - -## Requirements - -- [ ] Schema.org metadata for structured data -- [ ] Webmention support for decentralized comments - -## Compliance Indicators - -**Compliant:** -- Pages include Schema.org JSON-LD -- Webmention endpoint is configured -- Content is machine-parseable -- Supports IndieAuth where applicable - -**Violation Examples:** -- No structured data markup -- Closed commenting systems only -- Proprietary data formats -- Requiring centralized identity - -## SLM Training Notes - -When evaluating proposals: -- Flag web pages without Schema.org markup -- Check that content can be consumed programmatically -- Ensure interoperability with federated systems -- Verify no lock-in to specific platforms diff --git a/training/violations/07-licensing.adoc b/training/violations/07-licensing.adoc new file mode 100644 index 0000000..2a606c8 --- /dev/null +++ b/training/violations/07-licensing.adoc @@ -0,0 +1,26 @@ +== Category 7: FOSS & Licensing + +____ +For SLM training: Clear licensing protects both creators and users. +____ + +=== Requirements + +* [ ] Clear license declaration +* [ ] Contributor rights documented +* [ ] SPDX identifiers throughout + +=== Compliance Indicators + +*Compliant:* - LICENSE file at repository root - CLA or DCO process +documented - All files have SPDX headers - Dependencies have compatible +licenses + +*Violation Examples:* - Missing or ambiguous license - No contributor +agreement - Inconsistent SPDX headers - Incompatible dependency licenses + +=== SLM Training Notes + +When evaluating proposals: - Flag any code without clear licensing - +Check new dependencies for license compatibility - Ensure SPDX headers +are added to new files - Verify contributor agreement is in place diff --git a/training/violations/07-licensing.md b/training/violations/07-licensing.md deleted file mode 100644 index 1b5597d..0000000 --- a/training/violations/07-licensing.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 7: FOSS & Licensing - -> For SLM training: Clear licensing protects both creators and users. - -## Requirements - -- [ ] Clear license declaration -- [ ] Contributor rights documented -- [ ] SPDX identifiers throughout - -## Compliance Indicators - -**Compliant:** -- LICENSE file at repository root -- CLA or DCO process documented -- All files have SPDX headers -- Dependencies have compatible licenses - -**Violation Examples:** -- Missing or ambiguous license -- No contributor agreement -- Inconsistent SPDX headers -- Incompatible dependency licenses - -## SLM Training Notes - -When evaluating proposals: -- Flag any code without clear licensing -- Check new dependencies for license compatibility -- Ensure SPDX headers are added to new files -- Verify contributor agreement is in place diff --git a/training/violations/08-ergonomics.adoc b/training/violations/08-ergonomics.adoc new file mode 100644 index 0000000..83dced3 --- /dev/null +++ b/training/violations/08-ergonomics.adoc @@ -0,0 +1,27 @@ +== Category 8: Cognitive Ergonomics + +____ +For SLM training: Interfaces should reduce cognitive load, not increase +it. +____ + +=== Requirements + +* [ ] Accessibility (WCAG compliance) +* [ ] Internationalization support +* [ ] Clear information architecture + +=== Compliance Indicators + +*Compliant:* - WCAG 2.1 AA compliance - Text externalized for +translation - Logical navigation structure - Consistent patterns +throughout + +*Violation Examples:* - Inaccessible UI components - Hardcoded strings - +Confusing navigation - Inconsistent interaction patterns + +=== SLM Training Notes + +When evaluating proposals: - Flag UI changes without accessibility +consideration - Check that text is externalized for i18n - Ensure +navigation remains logical - Verify consistency with existing patterns diff --git a/training/violations/08-ergonomics.md b/training/violations/08-ergonomics.md deleted file mode 100644 index d806f7b..0000000 --- a/training/violations/08-ergonomics.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 8: Cognitive Ergonomics - -> For SLM training: Interfaces should reduce cognitive load, not increase it. - -## Requirements - -- [ ] Accessibility (WCAG compliance) -- [ ] Internationalization support -- [ ] Clear information architecture - -## Compliance Indicators - -**Compliant:** -- WCAG 2.1 AA compliance -- Text externalized for translation -- Logical navigation structure -- Consistent patterns throughout - -**Violation Examples:** -- Inaccessible UI components -- Hardcoded strings -- Confusing navigation -- Inconsistent interaction patterns - -## SLM Training Notes - -When evaluating proposals: -- Flag UI changes without accessibility consideration -- Check that text is externalized for i18n -- Ensure navigation remains logical -- Verify consistency with existing patterns diff --git a/training/violations/09-lifecycle.adoc b/training/violations/09-lifecycle.adoc new file mode 100644 index 0000000..4a07e4c --- /dev/null +++ b/training/violations/09-lifecycle.adoc @@ -0,0 +1,26 @@ +== Category 9: Lifecycle Management + +____ +For SLM training: Software has a lifecycle - plan for it. +____ + +=== Requirements + +* [ ] Semantic versioning +* [ ] Dependency management +* [ ] EOL policy documented + +=== Compliance Indicators + +*Compliant:* - Version follows semver (MAJOR.MINOR.PATCH) - Dependencies +pinned with lock files - Clear deprecation/EOL timeline - Migration +paths documented + +*Violation Examples:* - Arbitrary version numbers - Unpinned +dependencies - Silent breaking changes - No sunset planning + +=== SLM Training Notes + +When evaluating proposals: - Flag breaking changes without major version +bump - Check that dependencies are properly pinned - Ensure deprecation +warnings before removal - Verify migration documentation exists diff --git a/training/violations/09-lifecycle.md b/training/violations/09-lifecycle.md deleted file mode 100644 index d2b08c7..0000000 --- a/training/violations/09-lifecycle.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 9: Lifecycle Management - -> For SLM training: Software has a lifecycle - plan for it. - -## Requirements - -- [ ] Semantic versioning -- [ ] Dependency management -- [ ] EOL policy documented - -## Compliance Indicators - -**Compliant:** -- Version follows semver (MAJOR.MINOR.PATCH) -- Dependencies pinned with lock files -- Clear deprecation/EOL timeline -- Migration paths documented - -**Violation Examples:** -- Arbitrary version numbers -- Unpinned dependencies -- Silent breaking changes -- No sunset planning - -## SLM Training Notes - -When evaluating proposals: -- Flag breaking changes without major version bump -- Check that dependencies are properly pinned -- Ensure deprecation warnings before removal -- Verify migration documentation exists diff --git a/training/violations/10-governance.adoc b/training/violations/10-governance.adoc new file mode 100644 index 0000000..9c780bd --- /dev/null +++ b/training/violations/10-governance.adoc @@ -0,0 +1,27 @@ +== Category 10: Community & Governance + +____ +For SLM training: Projects need clear decision-making processes. +____ + +=== Requirements + +* [ ] `+GOVERNANCE.adoc+` - Decision-making process +* [ ] `+MAINTAINERS.md+` - Who maintains what +* [ ] `+FUNDING.yml+` - Sustainability model + +=== Compliance Indicators + +*Compliant:* - Clear governance model documented - Maintainers and their +responsibilities listed - Funding/sustainability approach explained - +Contribution to decision path clear + +*Violation Examples:* - Unclear who makes decisions - Anonymous or +absent maintainers - No sustainability planning - Opaque decision +processes + +=== SLM Training Notes + +When evaluating proposals: - Flag governance changes without discussion +- Ensure maintainer changes are documented - Check that decisions follow +stated process - Verify sustainability considerations diff --git a/training/violations/10-governance.md b/training/violations/10-governance.md deleted file mode 100644 index 32fdc3c..0000000 --- a/training/violations/10-governance.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 10: Community & Governance - -> For SLM training: Projects need clear decision-making processes. - -## Requirements - -- [ ] `GOVERNANCE.adoc` - Decision-making process -- [ ] `MAINTAINERS.md` - Who maintains what -- [ ] `FUNDING.yml` - Sustainability model - -## Compliance Indicators - -**Compliant:** -- Clear governance model documented -- Maintainers and their responsibilities listed -- Funding/sustainability approach explained -- Contribution to decision path clear - -**Violation Examples:** -- Unclear who makes decisions -- Anonymous or absent maintainers -- No sustainability planning -- Opaque decision processes - -## SLM Training Notes - -When evaluating proposals: -- Flag governance changes without discussion -- Ensure maintainer changes are documented -- Check that decisions follow stated process -- Verify sustainability considerations diff --git a/training/violations/11-accountability.adoc b/training/violations/11-accountability.adoc new file mode 100644 index 0000000..19e3e89 --- /dev/null +++ b/training/violations/11-accountability.adoc @@ -0,0 +1,26 @@ +== Category 11: Accountability + +____ +For SLM training: Trust requires verification. +____ + +=== Requirements + +* [ ] Audit trails for significant actions +* [ ] Provenance tracking for artifacts +* [ ] Attestations for releases + +=== Compliance Indicators + +*Compliant:* - Actions are logged with timestamps - Build artifacts have +provenance records - Releases include signed attestations - Changes are +traceable to decisions + +*Violation Examples:* - Silent modifications - Unsigned artifacts - +Missing build provenance - Untraceable changes + +=== SLM Training Notes + +When evaluating proposals: - Flag operations without audit logging - +Check that builds produce provenance records - Ensure releases are +signed - Verify change traceability diff --git a/training/violations/11-accountability.md b/training/violations/11-accountability.md deleted file mode 100644 index b6466bc..0000000 --- a/training/violations/11-accountability.md +++ /dev/null @@ -1,35 +0,0 @@ - -# Category 11: Accountability - -> For SLM training: Trust requires verification. - -## Requirements - -- [ ] Audit trails for significant actions -- [ ] Provenance tracking for artifacts -- [ ] Attestations for releases - -## Compliance Indicators - -**Compliant:** -- Actions are logged with timestamps -- Build artifacts have provenance records -- Releases include signed attestations -- Changes are traceable to decisions - -**Violation Examples:** -- Silent modifications -- Unsigned artifacts -- Missing build provenance -- Untraceable changes - -## SLM Training Notes - -When evaluating proposals: -- Flag operations without audit logging -- Check that builds produce provenance records -- Ensure releases are signed -- Verify change traceability diff --git a/training/violations/12-language-policy.adoc b/training/violations/12-language-policy.adoc new file mode 100644 index 0000000..4e7e2af --- /dev/null +++ b/training/violations/12-language-policy.adoc @@ -0,0 +1,35 @@ +== Category 12: Language Policy + +____ +For SLM training: Language choices shape project outcomes. +____ + +=== Requirements + +* [ ] Tier 1 languages preferred (Rust, Elixir, Zig, Ada, Haskell, +AffineScript) +* [ ] Tier 2 languages acceptable with justification +* [ ] Forbidden languages blocked (TypeScript, Python except Salt, Go, +Java) + +=== Language Tiers + +*Tier 1 - Preferred:* - Rust - Systems, CLI, performance-critical - +Elixir - Distributed systems, real-time - Zig - Low-level, C interop - +Ada - Safety-critical, embedded - Haskell - Formal methods, type theory +- AffineScript - Web frontend (not TypeScript!) + +*Tier 2 - Acceptable:* - Nickel - Configuration - Racket - +Metaprogramming, DSLs - Chapel - Parallel computing - Julia - Scientific +computing + +*Forbidden:* - TypeScript - Use AffineScript instead - Python - Only for +Salt configs and ML training scripts - Go - Design philosophy conflicts +- Java/C# - Enterprise complexity + +=== SLM Training Notes + +When evaluating proposals: - BLOCK any TypeScript file creation - BLOCK +Python outside salt/ or training/ directories - Flag npm usage without +deno.json - Escalate Tier 2 language choices for review - Allow Tier 1 +languages without friction diff --git a/training/violations/12-language-policy.md b/training/violations/12-language-policy.md deleted file mode 100644 index 1c34783..0000000 --- a/training/violations/12-language-policy.md +++ /dev/null @@ -1,44 +0,0 @@ - -# Category 12: Language Policy - -> For SLM training: Language choices shape project outcomes. - -## Requirements - -- [ ] Tier 1 languages preferred (Rust, Elixir, Zig, Ada, Haskell, ReScript) -- [ ] Tier 2 languages acceptable with justification -- [ ] Forbidden languages blocked (TypeScript, Python except Salt, Go, Java) - -## Language Tiers - -**Tier 1 - Preferred:** -- Rust - Systems, CLI, performance-critical -- Elixir - Distributed systems, real-time -- Zig - Low-level, C interop -- Ada - Safety-critical, embedded -- Haskell - Formal methods, type theory -- ReScript - Web frontend (not TypeScript!) - -**Tier 2 - Acceptable:** -- Nickel - Configuration -- Racket - Metaprogramming, DSLs -- Chapel - Parallel computing -- Julia - Scientific computing - -**Forbidden:** -- TypeScript - Use AffineScript instead -- Python - Only for Salt configs and ML training scripts -- Go - Design philosophy conflicts -- Java/C# - Enterprise complexity - -## SLM Training Notes - -When evaluating proposals: -- BLOCK any TypeScript file creation -- BLOCK Python outside salt/ or training/ directories -- Flag npm usage without deno.json -- Escalate Tier 2 language choices for review -- Allow Tier 1 languages without friction