diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index b0a6fd1..006f6c4 100644 --- a/.devcontainer/Containerfile +++ b/.devcontainer/Containerfile @@ -1,9 +1,9 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # -# Dev Container image for {{PROJECT_NAME}} +# Dev Container image for Contractiles # Base: Chainguard Wolfi (minimal, supply-chain-secure) -# Build: podman build -t {{PROJECT_NAME}}-dev -f .devcontainer/Containerfile . +# Build: podman build -t Contractiles-dev -f .devcontainer/Containerfile . FROM cgr.dev/chainguard/wolfi-base:latest @@ -24,7 +24,7 @@ RUN groupadd -g 1000 nonroot || true \ && useradd -m -u 1000 -g 1000 -s /bin/bash nonroot || true # Set workspace directory -WORKDIR /workspaces/{{PROJECT_NAME}} +WORKDIR /workspaces/Contractiles # Default shell ENV SHELL=/bin/bash diff --git a/.devcontainer/README.adoc b/.devcontainer/README.adoc index 5eee18b..f23d54e 100644 --- a/.devcontainer/README.adoc +++ b/.devcontainer/README.adoc @@ -1,7 +1,7 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell = Dev Container Usage -:author: {{AUTHOR}} <{{AUTHOR_EMAIL}}> +:author: Jonathan D.A. Jewell == Overview @@ -25,4 +25,4 @@ This dev container uses `cgr.dev/chainguard/wolfi-base` with git, curl, bash, an == Customization -Replace `{{PROJECT_NAME}}` placeholders in both `devcontainer.json` and `Containerfile` with your actual project name. Run `just deps` to verify the environment after first launch. +Replace `Contractiles` placeholders in both `devcontainer.json` and `Containerfile` with your actual project name. Run `just deps` to verify the environment after first launch. diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a4b33e0..cf5e037 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,11 @@ // SPDX-License-Identifier: MPL-2.0 -// Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) // -// Dev Container configuration for {{PROJECT_NAME}} +// Dev Container configuration for Contractiles // Works with: VS Code Dev Containers, GitHub Codespaces, Gitpod // Container runtime: Podman (recommended) or any OCI-compliant runtime { - "name": "{{PROJECT_NAME}}", + "name": "Contractiles", "build": { "dockerfile": "Containerfile", diff --git a/.envrc b/.envrc index 0b5b702..124d122 100644 --- a/.envrc +++ b/.envrc @@ -18,7 +18,7 @@ if has nix && [ -f flake.nix ]; then fi # Project environment variables -export PROJECT_NAME="{{PROJECT_NAME}}" +export PROJECT_NAME="Contractiles" export RSR_TIER="infrastructure" # export DATABASE_URL="..." # export API_KEY="..." diff --git a/.github/.mailmap b/.github/.mailmap index 0ada9de..e555414 100644 --- a/.github/.mailmap +++ b/.github/.mailmap @@ -1 +1 @@ -{{AUTHOR}} <{{AUTHOR_EMAIL}}> <{{AUTHOR_EMAIL_ALT}}> +Jonathan D.A. Jewell <> diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 611b5a8..8d339b7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,13 +2,13 @@ # CODEOWNERS - Define code review assignments # See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners # -# Replace {{OWNER}} with your GitHub username or team +# Replace hyperpolymath with your GitHub username or team # Default owners for everything -* @{{OWNER}} +* @hyperpolymath # Security-sensitive files require explicit review -SECURITY.md @{{OWNER}} -.github/workflows/ @{{OWNER}} -Trustfile.a2ml @{{OWNER}} -.machine_readable/ @{{OWNER}} +SECURITY.md @hyperpolymath +.github/workflows/ @hyperpolymath +Trustfile.a2ml @hyperpolymath +.machine_readable/ @hyperpolymath diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 287e86a..7d3b2b5 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -4,29 +4,9 @@ Copyright (c) Jonathan D.A. Jewell --> # Code of Conduct - - ## Our Pledge -We as members, contributors, and leaders pledge to make participation in {{PROJECT_NAME}} a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in Contractiles a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. @@ -140,7 +120,7 @@ If you experience or witness unacceptable behaviour, or have any other concerns, | Method | Details | Best For | |--------|---------|----------| -| **Email** | {{CONDUCT_EMAIL}} | Detailed reports, sensitive matters | +| **Email** | j.d.a.jewell@open.ac.uk | Detailed reports, sensitive matters | | **Private Message** | Contact any maintainer directly | Quick questions, minor issues | | **Anonymous Form** | [Link to form if available] | When you need anonymity | @@ -156,8 +136,8 @@ If you experience or witness unacceptable behaviour, or have any other concerns, **What Happens Next** -1. You will receive acknowledgment within **{{RESPONSE_TIME}}** -2. The {{CONDUCT_TEAM}} will review the report +1. You will receive acknowledgment within **48 hours** +2. The the maintainer will review the report 3. We may ask for additional information 4. We will determine appropriate action 5. We will inform you of the outcome (respecting others' privacy) @@ -173,7 +153,7 @@ All reports will be handled with discretion: ### Conflicts of Interest -If a {{CONDUCT_TEAM}} member is involved in an incident: +If a the maintainer member is involved in an incident: - They will recuse themselves from the process - Another maintainer or external party will handle the report @@ -183,7 +163,7 @@ If a {{CONDUCT_TEAM}} member is involved in an incident: ## Enforcement Guidelines -The {{CONDUCT_TEAM}} will follow these guidelines in determining consequences: +The the maintainer will follow these guidelines in determining consequences: ### 1. Correction @@ -235,13 +215,13 @@ For contributors with elevated access (Perimeter 2 or 1): If you believe an enforcement decision was made in error: 1. **Wait 7 days** after the decision (cooling-off period) -2. **Email** {{CONDUCT_EMAIL}} with subject line "Appeal: [Original Report ID]" +2. **Email** j.d.a.jewell@open.ac.uk with subject line "Appeal: [Original Report ID]" 3. **Explain** why you believe the decision should be reconsidered 4. **Provide** any new information not previously available **Appeals Process** -- Appeals are reviewed by a different {{CONDUCT_TEAM}} member than the original +- Appeals are reviewed by a different the maintainer member than the original - You will receive a response within 14 days - The appeals decision is final - You may only appeal once per incident @@ -314,8 +294,8 @@ We thank these communities for their leadership in creating welcoming spaces. If you have questions about this Code of Conduct: -- Open a [Discussion](https://{{FORGE}}/{{OWNER}}/{{REPO}}/discussions) (for general questions) -- Email {{CONDUCT_EMAIL}} (for private questions) +- Open a [Discussion](https://github.com/hyperpolymath/contractiles/discussions) (for general questions) +- Email j.d.a.jewell@open.ac.uk (for private questions) - Contact any maintainer directly --- @@ -328,4 +308,4 @@ We're all here because we care about this project. Let's make it a place where e --- -Last updated: {{CURRENT_YEAR}} · Based on Contributor Covenant 2.1 +Last updated: 2026 · Based on Contributor Covenant 2.1 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6dafb5b..661a66e 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -3,15 +3,15 @@ SPDX-License-Identifier: CC-BY-SA-4.0 Copyright (c) Jonathan D.A. Jewell --> # Clone the repository -git clone https://{{FORGE}}/{{OWNER}}/{{REPO}}.git -cd {{REPO}} +git clone https://github.com/hyperpolymath/contractiles.git +cd contractiles # Using Nix (recommended for reproducibility) nix develop # Or using toolbox/distrobox -toolbox create {{REPO}}-dev -toolbox enter {{REPO}}-dev +toolbox create contractiles-dev +toolbox enter contractiles-dev # Install dependencies manually # Verify setup @@ -21,7 +21,7 @@ just test # Run test suite ### Repository Structure ``` -{{REPO}}/ +contractiles/ ├── src/ # Source code (Perimeter 1-2) ├── lib/ # Library code (Perimeter 1-2) ├── extensions/ # Extensions (Perimeter 2) @@ -62,7 +62,7 @@ just test # Run test suite **Before reporting**: 1. Search existing issues -2. Check if it's already fixed in `{{MAIN_BRANCH}}` +2. Check if it's already fixed in `main` 3. Determine which perimeter the bug affects **When reporting**: @@ -95,10 +95,10 @@ Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) an Look for issues labelled: -- [`good first issue`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/good%20first%20issue) — Simple Perimeter 3 tasks -- [`help wanted`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/help%20wanted) — Community help needed -- [`documentation`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/documentation) — Docs improvements -- [`perimeter-3`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/perimeter-3) — Community sandbox scope +- [`good first issue`](https://github.com/hyperpolymath/contractiles/labels/good%20first%20issue) — Simple Perimeter 3 tasks +- [`help wanted`](https://github.com/hyperpolymath/contractiles/labels/help%20wanted) — Community help needed +- [`documentation`](https://github.com/hyperpolymath/contractiles/labels/documentation) — Docs improvements +- [`perimeter-3`](https://github.com/hyperpolymath/contractiles/labels/perimeter-3) — Community sandbox scope --- diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c078261..688a442 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: MPL-2.0 -# Funding platforms for {{OWNER}} projects +# Funding platforms for hyperpolymath projects # See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository -github: {{OWNER}} -ko_fi: {{OWNER}} -liberapay: {{OWNER}} +github: hyperpolymath +ko_fi: hyperpolymath +liberapay: hyperpolymath diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 145c4e9..63989c7 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -4,7 +4,7 @@ # Format: Name (role) # Replace placeholders with actual maintainer information. -{{AUTHOR}} <{{AUTHOR_EMAIL}}> (Lead Maintainer) +Jonathan D.A. Jewell (Lead Maintainer) # Additional maintainers: # Name (role) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 11588ca..a532e15 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -4,24 +4,6 @@ Copyright (c) Jonathan D.A. Jewell --> # Security Policy - - We take security seriously. We appreciate your efforts to responsibly disclose vulnerabilities and will make every effort to acknowledge your contributions. ## Table of Contents @@ -44,7 +26,7 @@ We take security seriously. We appreciate your efforts to responsibly disclose v The preferred method for reporting security vulnerabilities is through GitHub's Security Advisory feature: -1. Navigate to [Report a Vulnerability](https://github.com/{{OWNER}}/{{REPO}}/security/advisories/new) +1. Navigate to [Report a Vulnerability](https://github.com/hyperpolymath/contractiles/security/advisories/new) 2. Click **"Report a vulnerability"** 3. Complete the form with as much detail as possible 4. Submit — we'll receive a private notification @@ -56,26 +38,12 @@ This method ensures: - Coordinated disclosure tooling - Automatic credit when the advisory is published -### Alternative: Encrypted Email - -If you cannot use GitHub Security Advisories, you may email us directly: - -| | | -|---|---| -| **Email** | {{SECURITY_EMAIL}} | -| **PGP Key** | [Download Public Key]({{PGP_KEY_URL}}) | -| **Fingerprint** | `{{PGP_FINGERPRINT}}` | +### Alternative: Email -```bash -# Import our PGP key -curl -sSL {{PGP_KEY_URL}} | gpg --import - -# Verify fingerprint -gpg --fingerprint {{SECURITY_EMAIL}} - -# Encrypt your report -gpg --armor --encrypt --recipient {{SECURITY_EMAIL}} report.txt -``` +If you cannot use GitHub Security Advisories, you may email the maintainer +directly at **j.d.a.jewell@open.ac.uk**. No PGP key is currently published +for this project; if you need encrypted contact, say so in your initial +(unencrypted) email and we'll arrange a channel. > **⚠️ Important:** Do not report security vulnerabilities through public GitHub issues, pull requests, discussions, or social media. @@ -207,7 +175,7 @@ If we cannot reach agreement on disclosure timing, we default to 90 days from yo The following are within scope for security research: -- This repository (`{{OWNER}}/{{REPO}}`) and all its code +- This repository (`hyperpolymath/contractiles`) and all its code - Official releases and packages published from this repository - Documentation that could lead to security issues - Build and deployment configurations in this repository @@ -326,7 +294,7 @@ Recognition includes: To stay informed about security updates: - **Watch this repository**: Click "Watch" → "Custom" → Select "Security alerts" -- **GitHub Security Advisories**: Published at [Security Advisories](https://github.com/{{OWNER}}/{{REPO}}/security/advisories) +- **GitHub Security Advisories**: Published at [Security Advisories](https://github.com/hyperpolymath/contractiles/security/advisories) - **Release notes**: Security fixes noted in [CHANGELOG](CHANGELOG.md) ### Update Policy @@ -352,7 +320,7 @@ To stay informed about security updates: ## Security Best Practices -When using {{PROJECT_NAME}}, we recommend: +When using Contractiles, we recommend: ### General @@ -374,8 +342,7 @@ When using {{PROJECT_NAME}}, we recommend: ## Additional Resources -- [Our PGP Public Key]({{PGP_KEY_URL}}) -- [Security Advisories](https://github.com/{{OWNER}}/{{REPO}}/security/advisories) +- [Security Advisories](https://github.com/hyperpolymath/contractiles/security/advisories) - [Changelog](CHANGELOG.md) - [Contributing Guidelines](CONTRIBUTING.md) - [CVE Database](https://cve.mitre.org/) @@ -387,8 +354,8 @@ When using {{PROJECT_NAME}}, we recommend: | Purpose | Contact | |---------|---------| -| **Security issues** | [Report via GitHub](https://github.com/{{OWNER}}/{{REPO}}/security/advisories/new) or {{SECURITY_EMAIL}} | -| **General questions** | [GitHub Discussions](https://github.com/{{OWNER}}/{{REPO}}/discussions) | +| **Security issues** | [Report via GitHub](https://github.com/hyperpolymath/contractiles/security/advisories/new) or j.d.a.jewell@open.ac.uk | +| **General questions** | [GitHub Discussions](https://github.com/hyperpolymath/contractiles/discussions) | | **Other enquiries** | See [README](README.md) for contact information | --- @@ -403,8 +370,8 @@ This security policy may be updated from time to time. Significant changes will --- -*Thank you for helping keep {{PROJECT_NAME}} and its users safe.* 🛡️ +*Thank you for helping keep Contractiles and its users safe.* 🛡️ --- -Last updated: {{CURRENT_YEAR}} · Policy version: 1.0.0 +Last updated: 2026 · Policy version: 1.0.0 diff --git a/.github/SUPPORT b/.github/SUPPORT index b06c59a..aedc368 100644 --- a/.github/SUPPORT +++ b/.github/SUPPORT @@ -2,6 +2,6 @@ For questions, help, and community discussion: -- GitHub Discussions: https://github.com/{{OWNER}}/{{REPO}}/discussions -- GitHub Issues: https://github.com/{{OWNER}}/{{REPO}}/issues +- GitHub Discussions: https://github.com/hyperpolymath/contractiles/discussions +- GitHub Issues: https://github.com/hyperpolymath/contractiles/issues - Documentation: See README.adoc in the root directory. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 7048f63..1cf2861 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -2,7 +2,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 Copyright (c) Jonathan D.A. Jewell --> - + # Copilot Instructions @@ -16,7 +16,7 @@ Copyright (c) Jonathan D.A. Jewell - SPDX: `MPL-2.0` on all new files. - Never use AGPL-3.0. -- Copyright: `{{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}>` +- Copyright: `Jonathan D.A. Jewell (hyperpolymath) ` ## Code Style diff --git a/.github/settings.yml b/.github/settings.yml index 92306c4..63c30af 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -7,14 +7,12 @@ # applied by the probot/settings app when changes are pushed to the default # branch. Install the app at: https://github.com/apps/settings # -# Template file — replace {{REPO}} and {{DESCRIPTION}} with actual values. - # ─── Repository Settings ─────────────────────────────────────────────────────── repository: - name: "{{REPO}}" - description: "{{DESCRIPTION}}" - homepage: "https://github.com/hyperpolymath/{{REPO}}" + name: "contractiles" + description: "Normative constraint set-points for the A2ML/K9 ecosystem" + homepage: "https://github.com/hyperpolymath/contractiles" private: false has_issues: true has_projects: true diff --git a/.machine_readable/6a2/CLADE.a2ml b/.machine_readable/6a2/CLADE.a2ml index b14389c..b139e50 100644 --- a/.machine_readable/6a2/CLADE.a2ml +++ b/.machine_readable/6a2/CLADE.a2ml @@ -6,8 +6,8 @@ uuid = "a5ea1382-a34c-5334-8a46-a2ebe904c810" primary-forge = "github" primary-owner = "hyperpolymath" -canonical-name = "rsr-template-repo" -prefixed-name = "rm-rsr-template-repo" +canonical-name = "contractiles" +prefixed-name = "rm-contractiles" [clade] primary = "rm" @@ -16,9 +16,9 @@ assigned = "2026-03-16" rationale = "" [forges] -github = "hyperpolymath/rsr-template-repo" -gitlab = "hyperpolymath/rsr-template-repo" -bitbucket = "hyperpolymath/rsr-template-repo" +github = "hyperpolymath/contractiles" +gitlab = "hyperpolymath/contractiles" +bitbucket = "hyperpolymath/contractiles" [lineage] type = "standalone" diff --git a/.machine_readable/6a2/ECOSYSTEM.a2ml b/.machine_readable/6a2/ECOSYSTEM.a2ml index cec008d..71c97bf 100644 --- a/.machine_readable/6a2/ECOSYSTEM.a2ml +++ b/.machine_readable/6a2/ECOSYSTEM.a2ml @@ -1,13 +1,13 @@ # SPDX-License-Identifier: MPL-2.0 # ECOSYSTEM.a2ml — Ecosystem position (META-TEMPLATE) # -# This is the ECOSYSTEM file for rsr-template-repo itself. It records the +# This is the ECOSYSTEM file for contractiles itself. It records the # TEMPLATE's own position in the estate. When consumed by a new project, # replace these fields with the target project's ecosystem position and # related projects (see the NOTE FOR CONSUMERS at the bottom). [metadata] -project = "rsr-template-repo" +project = "contractiles" ecosystem = "hyperpolymath" [position] @@ -16,8 +16,8 @@ purpose = "Canonical RSR-compliant repository template: scaffolding (CI/CD, AI m [pipeline] position = "foundation" -chain = "standards → rsr-template-repo → (every estate repo)" -notes = "rsr-template-repo turns the RSR standard into runnable scaffolding. New repos are created from it via `just init`, which substitutes the {{PLACEHOLDER}} tokens." +chain = "standards → contractiles → (every estate repo)" +notes = "contractiles turns the RSR standard into runnable scaffolding. New repos are created from it via `just init`, which substitutes the {{PLACEHOLDER}} tokens." coordination = "standards" [related-projects] diff --git a/.machine_readable/6a2/STATE.a2ml b/.machine_readable/6a2/STATE.a2ml index a76d8dd..efbcf58 100644 --- a/.machine_readable/6a2/STATE.a2ml +++ b/.machine_readable/6a2/STATE.a2ml @@ -1,21 +1,19 @@ # SPDX-License-Identifier: MPL-2.0 # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # -# STATE.a2ml — Project state checkpoint (META-TEMPLATE) +# STATE.a2ml — Project state checkpoint # -# This is the STATE file for rsr-template-repo itself. -# When consumed by a new project, replace {{PLACEHOLDER}} tokens -# and customize sections below for the target project. +# This is the STATE file for contractiles itself. [metadata] -project = "rsr-template-repo" +project = "contractiles" version = "0.2.0" -last-updated = "2026-02-28" +last-updated = "2026-07-27" status = "active" # active | paused | archived [project-context] -name = "rsr-template-repo" -purpose = "Canonical RSR-compliant repository template providing scaffolding for all hyperpolymath projects — including CI/CD, AI manifests, ABI/FFI standards, container ecosystem, and governance infrastructure." +name = "contractiles" +purpose = "Normative constraint set-points for the A2ML/K9 ecosystem: the six-verb contractile vocabulary (intend / must / trust / adjust / dust / bust) expressing what should be true, as the counterpart to the descriptive \"descriptiles\" reading of what is true." completion-percentage = 95 [position] @@ -58,7 +56,7 @@ part-of = ["RSR Framework", "stapeln ecosystem"] depends-on = ["stapeln", "selur-compose", "cerro-torre", "svalinn", "vordr", "k9-svc"] # --------------------------------------------------------------------------- -# NOTE FOR CONSUMERS: When using this template to create a new repo, reset -# the fields above to your project's values and replace all {{PLACEHOLDER}} -# tokens. The milestones above describe the TEMPLATE's evolution, not yours. +# The milestones above describe contractiles' own evolution as an +# RSR-scaffolded repository (it was bootstrapped from the RSR template, +# hence the shared history through v0.2.0). # --------------------------------------------------------------------------- diff --git a/.machine_readable/6a2/anchors/ANCHOR.a2ml b/.machine_readable/6a2/anchors/ANCHOR.a2ml index 8723899..82c692c 100644 --- a/.machine_readable/6a2/anchors/ANCHOR.a2ml +++ b/.machine_readable/6a2/anchors/ANCHOR.a2ml @@ -1,15 +1,15 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # ANCHOR.a2ml - authoritative anchor for this repository [metadata] version = "1.0.0" -last-updated = "{{CURRENT_DATE}}" +last-updated = "2026-07-27" [anchor] schema = "hyperpolymath.anchor/1" -repo = "{{OWNER}}/{{REPO}}" +repo = "hyperpolymath/contractiles" authority = "upstream-canonical" purpose = [ @@ -19,10 +19,10 @@ purpose = [ ] [identity] -project = "{{PROJECT_NAME}}" -kind = "{{PROJECT_KIND}}" # language | library | service | tool -one-sentence = "{{PROJECT_PURPOSE}}" -domain = "{{PROJECT_DOMAIN}}" +project = "Contractiles" +kind = "library" # language | library | service | tool +one-sentence = "Normative constraint set-points for the A2ML/K9 ecosystem" +domain = "developer tooling / repository governance" [semantic-authority] policy = "canonical" diff --git a/.machine_readable/ENSAID_CONFIG.a2ml b/.machine_readable/ENSAID_CONFIG.a2ml index 1384822..2b7593b 100644 --- a/.machine_readable/ENSAID_CONFIG.a2ml +++ b/.machine_readable/ENSAID_CONFIG.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # ENSAID_CONFIG.a2ml — eNSAID Environment Configuration # Per-repo configuration for PanLL and eNSAID-compatible tools. @@ -89,8 +89,8 @@ version = "1.0.0" # Example: a custom portfolio for this project # [[portfolios.custom]] -# id = "{{project}}-dev" -# name = "{{PROJECT_NAME}} Development" -# description = "Panels for {{PROJECT_NAME}} development" +# id = "contractiles-dev" +# name = "Contractiles Development" +# description = "Panels for Contractiles development" # panels = ["valence-shell", "editor-bridge", "build-dashboard"] # default-isolation = "native" diff --git a/.machine_readable/ai/.clinerules b/.machine_readable/ai/.clinerules index 8f38042..4818351 100644 --- a/.machine_readable/ai/.clinerules +++ b/.machine_readable/ai/.clinerules @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # Authoritative source: docs/AI-CONVENTIONS.md # STARTUP: Read 0-AI-MANIFEST.a2ml first, then .machine_readable/6a2/STATE.a2ml. @@ -8,7 +8,7 @@ # All original code: MPL-2.0. # Never AGPL-3.0. MPL-2.0 only as platform-required fallback. # SPDX header required on every source file. -# Copyright: {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright: Jonathan D.A. Jewell (hyperpolymath) # STATE FILES (.machine_readable/ ONLY) # Never create in repo root: STATE.a2ml, META.a2ml, ECOSYSTEM.a2ml, diff --git a/.machine_readable/ai/.cursorrules b/.machine_readable/ai/.cursorrules index c13b393..5255a80 100644 --- a/.machine_readable/ai/.cursorrules +++ b/.machine_readable/ai/.cursorrules @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # Authoritative source: docs/AI-CONVENTIONS.md # Read 0-AI-MANIFEST.a2ml in the repo root FIRST for canonical file locations. @@ -7,7 +7,7 @@ # LICENSE # All original code: MPL-2.0 (SPDX header required on every file). # Never use AGPL-3.0. Fallback to MPL-2.0 only when platform requires it. -# Copyright: {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright: Jonathan D.A. Jewell (hyperpolymath) # STATE FILES # .a2ml metadata files go in .machine_readable/ ONLY. diff --git a/.machine_readable/ai/.windsurfrules b/.machine_readable/ai/.windsurfrules index 8f38042..4818351 100644 --- a/.machine_readable/ai/.windsurfrules +++ b/.machine_readable/ai/.windsurfrules @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # Authoritative source: docs/AI-CONVENTIONS.md # STARTUP: Read 0-AI-MANIFEST.a2ml first, then .machine_readable/6a2/STATE.a2ml. @@ -8,7 +8,7 @@ # All original code: MPL-2.0. # Never AGPL-3.0. MPL-2.0 only as platform-required fallback. # SPDX header required on every source file. -# Copyright: {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright: Jonathan D.A. Jewell (hyperpolymath) # STATE FILES (.machine_readable/ ONLY) # Never create in repo root: STATE.a2ml, META.a2ml, ECOSYSTEM.a2ml, diff --git a/.machine_readable/ai/AI.a2ml b/.machine_readable/ai/AI.a2ml index 3754aca..abbf006 100644 --- a/.machine_readable/ai/AI.a2ml +++ b/.machine_readable/ai/AI.a2ml @@ -2,7 +2,7 @@ # AI Assistant Instructions ## Repository Focus -- `rsr-template-repo` is treated as a Rhodium Standard Repository; obey the Rhodium policies and keep `.machine_readable/` authoritative. +- `contractiles` is treated as a Rhodium Standard Repository; obey the Rhodium policies and keep `.machine_readable/` authoritative. - All machine-readable content lives under `.machine_readable/` — state files (a2ml), bot directives, and contractiles. - Prefer to keep generated files out of source control, and regenerate them with the documented commands before committing. diff --git a/.machine_readable/ai/PLACEHOLDERS.adoc b/.machine_readable/ai/PLACEHOLDERS.adoc deleted file mode 100644 index 2a80900..0000000 --- a/.machine_readable/ai/PLACEHOLDERS.adoc +++ /dev/null @@ -1,144 +0,0 @@ -// SPDX-License-Identifier: CC-BY-SA-4.0 -// Copyright (c) Jonathan D.A. Jewell -= Template Placeholders -# Template Placeholders - -All placeholders in this template follow the `{{PLACEHOLDER}}` pattern. -After cloning, replace them with your project-specific values. - -## Recommended: Interactive Bootstrap - -```bash -just init -``` - -This interactively prompts for all values, replaces every placeholder, -validates the result, and runs k9-svc checks if available. - -## Manual Replace - -```bash -# If you prefer manual replacement (run from repo root) - -sed -i 's/{{AUTHOR}}/Jane Doe/g' $(grep -rl '{{AUTHOR}}' .) -sed -i 's/{{AUTHOR_EMAIL}}/jane@example.org/g' $(grep -rl '{{AUTHOR_EMAIL}}' .) -sed -i 's/{{OWNER}}/my-org/g' $(grep -rl '{{OWNER}}' .) -sed -i 's/{{PROJECT_NAME}}/my-project/g' $(grep -rl '{{PROJECT_NAME}}' .) -sed -i 's/{{PROJECT}}/MY_PROJECT/g' $(grep -rl '{{PROJECT}}' .) -sed -i 's/{{project}}/my_project/g' $(grep -rl '{{project}}' .) -sed -i 's/{{REPO}}/my-project/g' $(grep -rl '{{REPO}}' .) -sed -i 's/{{FORGE}}/github.com/g' $(grep -rl '{{FORGE}}' .) -sed -i "s/{{CURRENT_YEAR}}/$(date +%Y)/g" $(grep -rl '{{CURRENT_YEAR}}' .) -sed -i "s/{{CURRENT_DATE}}/$(date +%Y-%m-%d)/g" $(grep -rl '{{CURRENT_DATE}}' .) -``` - -## Placeholder Reference - -### Author & Copyright - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `{{AUTHOR}}` | Full legal name | `Jane Doe` | SPDX headers (all files), MAINTAINERS.md, .mailmap, .reuse/dep5, docs/AI-CONVENTIONS.md | -| `{{AUTHOR_EMAIL}}` | Primary contact email | `jane@example.org` | SPDX headers (all files), .mailmap, .reuse/dep5, .well-known/humans.txt | -| `{{AUTHOR_EMAIL_ALT}}` | Previous/secondary email (for .mailmap) | `old@example.com` | .mailmap | -| `{{AUTHOR_ORG}}` | Author's organization/affiliation | `Acme University` | project-metadata.k9.ncl | -| `{{AUTHOR_LAST}}` | Author surname (for citations) | `Doe` | docs/CITATIONS.adoc | -| `{{AUTHOR_FIRST}}` | Author first name (for citations) | `Jane` | docs/CITATIONS.adoc | -| `{{AUTHOR_INITIALS}}` | Author initials (for citations) | `J.` | docs/CITATIONS.adoc | - -### Project Identity - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `{{PROJECT_NAME}}` | Human-readable project name | `My Project` | SECURITY.md, CODE_OF_CONDUCT.md, TOPOLOGY.md, STATE.a2ml, Justfile, GOVERNANCE.md, MAINTAINERS.md, flake.nix, devcontainer.json | -| `{{PROJECT_DESCRIPTION}}` | One-line description | `A tool for X` | flake.nix | -| `{{PROJECT}}` | Uppercase identifier (for Idris2 modules, C macros) | `MY_PROJECT` | ABI-FFI-README.md, src/interface/abi/*.idr, src/interface/ffi/*.zig | -| `{{project}}` | Lowercase identifier (for C symbols, filenames) | `my_project` | ABI-FFI-README.md, src/interface/ffi/*.zig | -| `{{REPO}}` | Repository name (slug) | `my-project` | CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, cliff.toml | -| `{{OWNER}}` | GitHub/GitLab org or username | `my-org` | SPDX headers, CONTRIBUTING.md, SECURITY.md, GOVERNANCE.md, MAINTAINERS.md, CODEOWNERS, mirror.yml, cliff.toml | -| `{{FORGE}}` | Git forge domain | `github.com` | CONTRIBUTING.md | - -### Dates - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `{{CURRENT_YEAR}}` | Current year | `2026` | SPDX headers (all files), GOVERNANCE.md, MAINTAINERS.md | -| `{{CURRENT_DATE}}` | Current date (ISO) | `2026-02-14` | STATE.a2ml, MAINTAINERS.md | -| `{{DATE}}` | Last updated date | `2026-02-14` | TOPOLOGY.md, THREAT-MODEL.md | - -### Contact & Security - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `{{SECURITY_EMAIL}}` | Security contact email | `security@example.org` | SECURITY.md | -| `{{PGP_FINGERPRINT}}` | 40-char PGP fingerprint | `ABCD 1234 ...` | SECURITY.md | -| `{{PGP_KEY_URL}}` | URL to public PGP key | `https://keys.openpgp.org/...` | SECURITY.md | -| `{{WEBSITE}}` | Project website | `https://example.org` | SECURITY.md | -| `{{CONDUCT_EMAIL}}` | Conduct reports email | `conduct@example.org` | CODE_OF_CONDUCT.md | -| `{{CONDUCT_TEAM}}` | Conduct committee name | `Code of Conduct Committee` | CODE_OF_CONDUCT.md | -| `{{RESPONSE_TIME}}` | SLA for initial response | `48 hours` | CODE_OF_CONDUCT.md | - -### Git - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `{{MAIN_BRANCH}}` | Main branch name | `main` | CONTRIBUTING.md | - -### Build - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `{{LICENSE}}` | License name | `MPL-2.0` | ABI-FFI-README.md | -| `{{PROJECT_PURPOSE}}` | One-line project description | `FFI bridges between languages` | STATE.a2ml | - -### AI Manifest - -| Placeholder | Description | Example | Files | -|---|---|---|---| -| `[YOUR-REPO-NAME]` | Repository name | `my-project` | 0-AI-MANIFEST.a2ml | -| `[DATE]` | Creation date | `2026-02-14` | 0-AI-MANIFEST.a2ml | -| `[YOUR-NAME/ORG]` | Maintainer name | `hyperpolymath` | 0-AI-MANIFEST.a2ml | - -### AI Installation Guide - -| Marker | Description | Files | -|---|---|---| -| `[TODO-AI-INSTALL]` | Unfilled section in AI installation guide | `docs/AI_INSTALLATION_GUIDE.adoc`, `docs/AI-INSTALL-README-SECTION.adoc`, `README.adoc` | - -These are **not** standard `{{PLACEHOLDER}}` markers -- they are TODO markers -that must be replaced with project-specific content before release. They mark -sections where the developer (or AI) must fill in: - -- What questions the AI should ask the user -- Exact prerequisite check and install commands -- Privacy notice specific to this project -- Complete installation command block -- Credential setup instructions (URLs, scopes, env vars) -- Verification commands and expected output -- Error handling table -- Example conversation - -**finishbot checks:** `just validate-ai-install` verifies no `[TODO-AI-INSTALL]` markers remain. - -## Deletion Markers - -Some files contain deletion instructions: - -| Marker | Meaning | File | -|---|---|---| -| `{{~ ... ~}}` | Delete this entire line after reading | ABI-FFI-README.md (line 1) | - -## Verification - -After replacing all placeholders, verify none remain: - -```bash -grep -rn '{{' . --include='*.md' --include='*.adoc' --include='*.a2ml' \ - --include='*.scm' --include='*.idr' --include='*.zig' --include='*.res' \ - --include='Justfile' --include='*.nix' --include='*.toml' --include='*.yml' \ - --include='*.yaml' --include='*.hs' --include='*.ncl' --include='*.txt' \ - --include='*.json' --include='Containerfile' --include='dep5' \ - | grep -v 'PLACEHOLDERS.md' | grep -v 'node_modules' -``` - -If the above command produces no output, all placeholders have been replaced. diff --git a/.machine_readable/bot_directives/coverage.a2ml b/.machine_readable/bot_directives/coverage.a2ml index 1bd30fa..1012748 100644 --- a/.machine_readable/bot_directives/coverage.a2ml +++ b/.machine_readable/bot_directives/coverage.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # coverage.a2ml — Session coverage tracking # Updated at the end of each AI agent session. @@ -9,7 +9,7 @@ [metadata] version = "1.0.0" -last-updated = "{{CURRENT_DATE}}" +last-updated = "2026-07-27" # ============================================================================ # COVERAGE STATE diff --git a/.machine_readable/bot_directives/debt.a2ml b/.machine_readable/bot_directives/debt.a2ml index 3289cbe..708a6f1 100644 --- a/.machine_readable/bot_directives/debt.a2ml +++ b/.machine_readable/bot_directives/debt.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # debt.a2ml — Meander debt list # Things found but not fixed. Carried between sessions. @@ -9,7 +9,7 @@ [metadata] version = "1.0.0" -last-updated = "{{CURRENT_DATE}}" +last-updated = "2026-07-27" # ============================================================================ # DEBT ITEMS diff --git a/.machine_readable/bot_directives/methodology.a2ml b/.machine_readable/bot_directives/methodology.a2ml index a88ab49..7f81e93 100644 --- a/.machine_readable/bot_directives/methodology.a2ml +++ b/.machine_readable/bot_directives/methodology.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # methodology.a2ml — AI agent methodology configuration # Declares how agents should approach work in this repository. @@ -9,7 +9,7 @@ [metadata] version = "1.0.0" -last-updated = "{{CURRENT_DATE}}" +last-updated = "2026-07-27" spec = "https://github.com/hyperpolymath/standards/blob/main/agentic-a2ml/docs/ADR-002-methodology-layer.adoc" # ============================================================================ @@ -55,7 +55,7 @@ perfective = 10 # % for SPDX headers, doc updates, formatting, style # Customise this per project — the template default is generic. [methodology.unique-strength] -description = "{{PROJECT_UNIQUE_STRENGTH}}" +description = "The six-verb contractile vocabulary (intend/must/trust/adjust/dust/bust) as a normative, machine-checkable set-point counterpart to the descriptive "descriptiles" reading" deepen-not-broaden = true # ============================================================================ @@ -101,7 +101,7 @@ constraints = [ # These rules detect corrupt/template/stale state files. [methodology.state-validation] -reject-if-contains = ["{{PLACEHOLDER}}", "{{PROJECT}}", "rsr-template-repo"] +reject-if-contains = ["{{PLACEHOLDER}}", "CONTRACTILES", "contractiles"] reject-if-project-name-mismatch = true staleness-threshold-days = 90 fallback-files = ["TODO.md", "TODO.adoc", "ROADMAP.adoc", "README.adoc"] diff --git a/.machine_readable/compliance/reuse/dep5 b/.machine_readable/compliance/reuse/dep5 index 49aaed6..a69407e 100644 --- a/.machine_readable/compliance/reuse/dep5 +++ b/.machine_readable/compliance/reuse/dep5 @@ -1,54 +1,54 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: {{PROJECT_NAME}} -Upstream-Contact: {{AUTHOR}} <{{AUTHOR_EMAIL}}> -Source: https://github.com/{{OWNER}}/{{REPO}} +Upstream-Name: Contractiles +Upstream-Contact: Jonathan D.A. Jewell +Source: https://github.com/hyperpolymath/contractiles # Default: all files are MPL-2.0 Files: * -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Configuration files that cannot carry headers Files: .editorconfig .gitignore .gitattributes .tool-versions .mailmap -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Machine-readable state files Files: .machine_readable/*.a2ml -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Bot directives Files: .machine_readable/bot_directives/* -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Contractiles Files: .machine_readable/contractiles/* -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # GitHub/CI configuration Files: .github/* .github/**/* -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Generated files Files: generated/* -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Lockfiles and auto-generated Files: *.lock Cargo.lock flake.lock -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Devcontainer config (JSON, no comments) Files: .devcontainer/*.json -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 # Git-cliff config Files: cliff.toml -Copyright: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright: 2026 Jonathan D.A. Jewell (hyperpolymath) License: MPL-2.0 diff --git a/.machine_readable/configs/eclexiaiser.toml b/.machine_readable/configs/eclexiaiser.toml index abc542e..8cfaf80 100644 --- a/.machine_readable/configs/eclexiaiser.toml +++ b/.machine_readable/configs/eclexiaiser.toml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: MPL-2.0 [project] -name = "{{REPO}}" +name = "contractiles" [[functions]] name = "build" diff --git a/.machine_readable/configs/git-cliff/cliff.toml b/.machine_readable/configs/git-cliff/cliff.toml index 5c39b48..e17b7c8 100644 --- a/.machine_readable/configs/git-cliff/cliff.toml +++ b/.machine_readable/configs/git-cliff/cliff.toml @@ -1,12 +1,12 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # git-cliff configuration for conventional commit changelog generation. # https://git-cliff.org/docs/configuration # # Placeholders — replace before first use: -# {{OWNER}} — GitHub organization or username -# {{REPO}} — GitHub repository name +# hyperpolymath — GitHub organization or username +# contractiles — GitHub repository name [changelog] # Changelog header @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 # https://keats.github.io/tera/docs/#introduction body = """ {%- macro remote_url() -%} - https://github.com/{{OWNER}}/{{REPO}} + https://github.com/hyperpolymath/contractiles {%- endmacro -%} {% if version -%} @@ -57,7 +57,7 @@ body = """ # Template for the changelog footer footer = """ {%- macro remote_url() -%} - https://github.com/{{OWNER}}/{{REPO}} + https://github.com/hyperpolymath/contractiles {%- endmacro -%} {% for release in releases -%} diff --git a/.machine_readable/contractiles/Adjustfile.a2ml b/.machine_readable/contractiles/Adjustfile.a2ml index 6f01e89..e320c33 100644 --- a/.machine_readable/contractiles/Adjustfile.a2ml +++ b/.machine_readable/contractiles/Adjustfile.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Adjustfile — Drift-tolerance contract for rsr-template-repo +# Adjustfile — Drift-tolerance contract for contractiles # Author: Jonathan D.A. Jewell # # Cumulative-drift catchment: tolerance bands + corrective actions. @@ -8,7 +8,7 @@ # Fix with: adjust fix (applies deterministic patches; advisory otherwise) @abstract: -Drift tolerances and corrective actions for rsr-template-repo. Unlike +Drift tolerances and corrective actions for contractiles. Unlike MUST (hard gate), ADJUST tracks cumulative drift against tolerance bands and proposes corrective actions. Advisory — it warns and trends, it does not block. diff --git a/.machine_readable/contractiles/Intentfile.a2ml b/.machine_readable/contractiles/Intentfile.a2ml index ef74f45..a228c0f 100644 --- a/.machine_readable/contractiles/Intentfile.a2ml +++ b/.machine_readable/contractiles/Intentfile.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Intentfile (A2ML Canonical) — north-star contractile for rsr-template-repo +# Intentfile (A2ML Canonical) — north-star contractile for contractiles # Author: Jonathan D.A. Jewell # # Paired runner: intend.ncl @@ -20,14 +20,14 @@ # contractile for hard gates. @abstract: -North-star contractile for rsr-template-repo. This repository is the +North-star contractile for contractiles. This repository is the canonical template for Rhodium Standard Repository compliance. It provides the scaffold that all hyperpolymath repos should copy and customize. @end ## Purpose -The rsr-template-repo serves as the master template for all hyperpolymath +The contractiles serves as the master template for all hyperpolymath repositories. It contains the complete set of contractile files, machine-readable specifications, and governance documentation that define the Rhodium Standard. diff --git a/.machine_readable/contractiles/Justfile b/.machine_readable/contractiles/Justfile index 2db3d94..b9887c6 100644 --- a/.machine_readable/contractiles/Justfile +++ b/.machine_readable/contractiles/Justfile @@ -19,9 +19,9 @@ set positional-arguments := true import? "build/contractile.just" # Project metadata — customize these -project := "rsr-template-repo" +project := "contractiles" OWNER := "hyperpolymath" -REPO := "rsr-template-repo" +REPO := "contractiles" version := "0.1.0" tier := "infrastructure" # 1 | 2 | infrastructure @@ -48,7 +48,7 @@ help recipe="": # Show this project's info info: - @echo "Project: {{project}}" + @echo "Project: contractiles" @echo "Version: {{version}}" @echo "RSR Tier: {{tier}}" @echo "Recipes: $(just --summary | wc -w)" @@ -82,7 +82,7 @@ import? "build/just/assess.just" # Build the project (debug mode) build *args: - @echo "Building {{project}} (debug)..." + @echo "Building contractiles (debug)..." # TODO: Replace with your build command # Examples: # cargo build {{args}} # Rust @@ -93,7 +93,7 @@ build *args: # Build in release mode with optimizations build-release *args: - @echo "Building {{project}} (release)..." + @echo "Building contractiles (release)..." # TODO: Replace with your release build command # Examples: # cargo build --release {{args}} @@ -268,7 +268,7 @@ run-verbose *args: build # Install to user path install: build-release - @echo "Installing {{project}}..." + @echo "Installing contractiles..." # TODO: Replace with your install command # ═══════════════════════════════════════════════════════════════════════════════ @@ -311,7 +311,7 @@ cookbook: #!/usr/bin/env bash mkdir -p docs OUTPUT="docs/just-cookbook.adoc" - echo "= {{project}} Justfile Cookbook" > "$OUTPUT" + echo "= contractiles Justfile Cookbook" > "$OUTPUT" echo ":toc: left" >> "$OUTPUT" echo ":toclevels: 3" >> "$OUTPUT" echo "" >> "$OUTPUT" @@ -337,10 +337,10 @@ cookbook: man: #!/usr/bin/env bash mkdir -p docs/man - cat > docs/man/{{project}}.1 << EOF - .TH {{project}} 1 "$(date +%Y-%m-%d)" "{{version}}" "{{project}} Manual" + cat > docs/man/contractiles.1 << EOF + .TH contractiles 1 "$(date +%Y-%m-%d)" "{{version}}" "contractiles Manual" .SH NAME - {{project}} \- RSR-compliant project + contractiles \- RSR-compliant project .SH SYNOPSIS .B just [recipe] [args...] @@ -349,7 +349,7 @@ man: .SH AUTHOR $(git config user.name 2>/dev/null || echo "Author") <$(git config user.email 2>/dev/null || echo "email")> EOF - echo "Generated: docs/man/{{project}}.1" + echo "Generated: docs/man/contractiles.1" # ═══════════════════════════════════════════════════════════════════════════════ # CONTAINERS (stapeln ecosystem — Podman + Chainguard Wolfi) @@ -362,7 +362,7 @@ container-init: if [ ! -d "container" ]; then echo "Error: container/ directory not found." - echo "This repo may not have been created from rsr-template-repo." + echo "This repo may not have been created from contractiles." exit 1 fi @@ -379,14 +379,14 @@ container-init: fi # Prompt for container-specific values - read -rp "Service name (e.g. my-api) [{{project}}]: " _SERVICE_NAME - SERVICE_NAME="${_SERVICE_NAME:-{{project}}}" + read -rp "Service name (e.g. my-api) [contractiles]: " _SERVICE_NAME + SERVICE_NAME="${_SERVICE_NAME:-contractiles}" read -rp "Primary port [8080]: " _PORT PORT="${_PORT:-8080}" - read -rp "Container registry [ghcr.io/${OWNER:-{{OWNER}}}]: " _REGISTRY - REGISTRY="${_REGISTRY:-ghcr.io/${OWNER:-{{OWNER}}}}" + read -rp "Container registry [ghcr.io/${OWNER:-hyperpolymath}]: " _REGISTRY + REGISTRY="${_REGISTRY:-ghcr.io/${OWNER:-hyperpolymath}}" echo "" echo " Service: $SERVICE_NAME" @@ -429,11 +429,11 @@ container-build *args: if [ -f "container/ct-build.sh" ]; then cd container && ./ct-build.sh {{args}} elif [ -f "container/Containerfile" ]; then - podman build -t {{project}}:latest -f container/Containerfile . + podman build -t contractiles:latest -f container/Containerfile . elif [ -f "build/Containerfile" ]; then - podman build -t {{project}}:latest -f build/Containerfile . + podman build -t contractiles:latest -f build/Containerfile . elif [ -f "Containerfile" ]; then - podman build -t {{project}}:latest -f Containerfile . + podman build -t contractiles:latest -f Containerfile . else echo "No Containerfile found in container/, build/, or project root" exit 1 @@ -495,12 +495,12 @@ container-push: cd container && ./ct-build.sh --push else echo "No container/ct-build.sh found — falling back to podman push" - podman push {{project}}:latest + podman push contractiles:latest fi # Run container interactively (for debugging) container-run *args: - podman run --rm -it {{project}}:latest {{args}} + podman run --rm -it contractiles:latest {{args}} # ═══════════════════════════════════════════════════════════════════════════════ # CI & AUTOMATION @@ -601,7 +601,7 @@ test-matrix suite="unit" verbosity="normal" parallel="true": @echo "Test matrix: suite={{suite}} verbosity={{verbosity}} parallel={{parallel}}" # Container matrix: [build|run|push|shell|scan] x [registry] x [tag] -container-matrix action="build" registry="ghcr.io/{{OWNER}}" tag="latest": +container-matrix action="build" registry="ghcr.io/hyperpolymath" tag="latest": @echo "Container matrix: action={{action}} registry={{registry}} tag={{tag}}" # CI matrix: [lint|test|build|security|all] x [quick|full] @@ -681,7 +681,7 @@ assail: # Self-diagnostic — checks dependencies, permissions, paths doctor: - @echo "Running diagnostics for rsr-template-repo..." + @echo "Running diagnostics for contractiles..." @echo "Checking required tools..." @command -v just >/dev/null 2>&1 && echo " [OK] just" || echo " [FAIL] just not found" @command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found" @@ -691,7 +691,7 @@ doctor: # Guided tour of key features tour: - @echo "=== rsr-template-repo Tour ===" + @echo "=== contractiles Tour ===" @echo "" @echo "1. Project structure:" @ls -la @@ -706,12 +706,12 @@ tour: # Open feedback channel with diagnostic context help-me: - @echo "=== rsr-template-repo Help ===" + @echo "=== contractiles Help ===" @echo "Platform: $(uname -s) $(uname -m)" @echo "Shell: $SHELL" @echo "" @echo "To report an issue:" - @echo " https://github.com/hyperpolymath/rsr-template-repo/issues/new" + @echo " https://github.com/hyperpolymath/contractiles/issues/new" @echo "" @echo "Include the output of 'just doctor' in your report." diff --git a/.machine_readable/contractiles/Mustfile.a2ml b/.machine_readable/contractiles/Mustfile.a2ml index 55f8ab4..b4a91f4 100644 --- a/.machine_readable/contractiles/Mustfile.a2ml +++ b/.machine_readable/contractiles/Mustfile.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Mustfile — Physical state contract for rsr-template-repo +# Mustfile — Physical state contract for contractiles # Author: Jonathan D.A. Jewell # # What MUST be true about this repository. Hard requirements. @@ -7,7 +7,7 @@ # Fix with: must fix (where a deterministic fix exists) @abstract: -Physical-state invariants for rsr-template-repo. This is the canonical +Physical-state invariants for contractiles. This is the canonical RSR template repository. These are hard requirements — CI and pre-commit hooks fail if any check fails. @end diff --git a/.machine_readable/contractiles/Trustfile.a2ml b/.machine_readable/contractiles/Trustfile.a2ml index e2028b5..7006869 100644 --- a/.machine_readable/contractiles/Trustfile.a2ml +++ b/.machine_readable/contractiles/Trustfile.a2ml @@ -1,12 +1,12 @@ # SPDX-License-Identifier: MPL-2.0 -# Trustfile — Trust boundaries and integrity invariants for rsr-template-repo +# Trustfile — Trust boundaries and integrity invariants for contractiles # Author: Jonathan D.A. Jewell # # Defines what LLM/SLM agents are trusted to do without asking, and # integrity invariants that verify the repo has not been tampered with. @abstract: -Trust boundaries and integrity checks for rsr-template-repo. This file +Trust boundaries and integrity checks for contractiles. This file combines the trust-level definitions from the original TRUST.contractile with the integrity invariants from the old Trustfile.a2ml. It defines what AI agents may do autonomously and what requires human approval, @@ -15,7 +15,7 @@ plus checks that verify repository integrity. ## Trust Levels -The rsr-template-repo operates at trust level: maximal +The contractiles operates at trust level: maximal Trust levels: - maximal: Agent may read, build, test, lint, format, heal freely. diff --git a/.machine_readable/contractiles/bust/Bustfile.a2ml b/.machine_readable/contractiles/bust/Bustfile.a2ml index c7fec2b..ccffa0b 100644 --- a/.machine_readable/contractiles/bust/Bustfile.a2ml +++ b/.machine_readable/contractiles/bust/Bustfile.a2ml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Bustfile — failure mode contractile for rsr-template-repo +# Bustfile — failure mode contractile for contractiles # Author: Jonathan D.A. Jewell # # Paired runner: bust.ncl @@ -13,11 +13,11 @@ # contractile bust check → list failure modes + recovery status # contractile bust drill → inject failures, verify recovery paths # -# This repository: rsr-template-repo is the canonical template for RSR compliance. +# This repository: contractiles is the canonical template for RSR compliance. # Failure modes here relate to template distribution and substitution. @abstract: -Bustfile for rsr-template-repo. Lists failure modes specific to the template +Bustfile for contractiles. Lists failure modes specific to the template repository itself, particularly around template distribution, substitution, and synchronization across the hyperpolymath estate. @end @@ -27,7 +27,7 @@ and synchronization across the hyperpolymath estate. ### template-substitution-failure - class: template_processing - description: Template substitution fails when initializing a new repo from this template -- injection_probe: "cp -r rsr-template-repo test-repo && cd test-repo && sed -i 's/rsr-template-repo/TEST/g' .machine_readable/contractiles/Intentfile.a2ml && grep -q 'TEST' .machine_readable/contractiles/Intentfile.a2ml" +- injection_probe: "cp -r contractiles test-repo && cd test-repo && sed -i 's/contractiles/TEST/g' .machine_readable/contractiles/Intentfile.a2ml && grep -q 'TEST' .machine_readable/contractiles/Intentfile.a2ml" - recovery_probe: "git -C test-repo diff --quiet .machine_readable/contractiles/Intentfile.a2ml" - expected_recovery_time_seconds: 10 - status: declared @@ -35,7 +35,7 @@ and synchronization across the hyperpolymath estate. ### sync-drift-between-repos - class: synchronization -- description: Drift occurs between rsr-template-repo and other repos after template updates +- description: Drift occurs between contractiles and other repos after template updates - injection_probe: "echo 'template_updated' > /tmp/test_drift_marker" - recovery_probe: "test -f /tmp/test_drift_marker && rm /tmp/test_drift_marker" - expected_recovery_time_seconds: 60 @@ -45,8 +45,8 @@ and synchronization across the hyperpolymath estate. ### contractile-parse-error - class: contractile_format - description: A contractile file fails to parse due to syntax errors -- injection_probe: "echo 'invalid syntax' >> rsr-template-repo/.machine_readable/contractiles/Intentfile.a2ml" -- recovery_probe: "git checkout rsr-template-repo/.machine_readable/contractiles/Intentfile.a2ml" +- injection_probe: "echo 'invalid syntax' >> contractiles/.machine_readable/contractiles/Intentfile.a2ml" +- recovery_probe: "git checkout contractiles/.machine_readable/contractiles/Intentfile.a2ml" - expected_recovery_time_seconds: 5 - status: declared - notes: All .a2ml files should be valid A2ML; use a2ml-validate runner diff --git a/.machine_readable/contractiles/dust/Dustfile.a2ml b/.machine_readable/contractiles/dust/Dustfile.a2ml index c6bf986..d631041 100644 --- a/.machine_readable/contractiles/dust/Dustfile.a2ml +++ b/.machine_readable/contractiles/dust/Dustfile.a2ml @@ -1,16 +1,16 @@ # SPDX-License-Identifier: MPL-2.0 -# Dustfile — Cleanup and hygiene contract for rsr-template-repo +# Dustfile — Cleanup and hygiene contract for contractiles # Author: Jonathan D.A. Jewell # # Paired runner: dust.ncl # Verb: dust # Semantics: What should be cleaned up. Housekeeping, not blockers. # -# This repository: rsr-template-repo is the canonical template. +# This repository: contractiles is the canonical template. # Cleanup items here ensure the template itself remains pristine. @abstract: -Cleanup and hygiene items for rsr-template-repo. These are maintenance tasks +Cleanup and hygiene items for contractiles. These are maintenance tasks that ensure the template repository remains clean and ready for distribution to new repositories. @end @@ -51,10 +51,10 @@ to new repositories. ## Template Hygiene ### no-stale-template-references -- description: No references to rsr-template-repo in generic template files -- run: test -z "$(grep -r 'rsr-template-repo' machine-readable-design/ 2>/dev/null)" +- description: No references to contractiles in generic template files +- run: test -z "$(grep -r 'contractiles' machine-readable-design/ 2>/dev/null)" - severity: warning -- notes: Generic templates should use {{PROJECT_NAME}} or similar placeholders +- notes: Generic templates should use Contractiles or similar placeholders ### version-sync-checked - description: Version in canonical-directory-structure matches .machine_readable/contractiles diff --git a/.machine_readable/integrations/groove.a2ml b/.machine_readable/integrations/groove.a2ml index ea3fb8b..1fe4fa0 100644 --- a/.machine_readable/integrations/groove.a2ml +++ b/.machine_readable/integrations/groove.a2ml @@ -9,8 +9,8 @@ (groove-manifest (version "1.0") - ; Service identity — replace {{REPO}} with your project name - (service "{{REPO}}") + ; Service identity — replace contractiles with your project name + (service "contractiles") (service-version "0.1.0") ; Primary port — MUST be unique across the ecosystem. diff --git a/.machine_readable/policies/MAINTENANCE-AXES.a2ml b/.machine_readable/policies/MAINTENANCE-AXES.a2ml index c251de6..f6a2fca 100644 --- a/.machine_readable/policies/MAINTENANCE-AXES.a2ml +++ b/.machine_readable/policies/MAINTENANCE-AXES.a2ml @@ -1,11 +1,11 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # Canonical maintenance governance model [metadata] version = "1.0.0" -last-updated = "{{CURRENT_DATE}}" +last-updated = "2026-07-27" scope = "repo" [discovery] diff --git a/.machine_readable/scripts/maintenance/maint-assault.sh b/.machine_readable/scripts/maintenance/maint-assault.sh index f170cab..5d95345 100644 --- a/.machine_readable/scripts/maintenance/maint-assault.sh +++ b/.machine_readable/scripts/maintenance/maint-assault.sh @@ -8,7 +8,7 @@ set -euo pipefail -BINARY_NAME="{{project}}" +BINARY_NAME="contractiles" REPORT_PATH="docs/reports/security/assault-latest.json" PA_BIN="${PANIC_ATTACK_BIN:-panic-attack}" diff --git a/.machine_readable/self-validating/README.adoc b/.machine_readable/self-validating/README.adoc index 0062207..4aca2fd 100644 --- a/.machine_readable/self-validating/README.adoc +++ b/.machine_readable/self-validating/README.adoc @@ -131,7 +131,7 @@ K9 contractiles integrate with other RSR standards: ⚠️ **Never run as root unless required** + ⚠️ **Sandbox external components** -**See:** https://github.com/{{OWNER}}/k9-svc/blob/main/docs/SECURITY-BEST-PRACTICES.adoc +**See:** https://github.com/hyperpolymath/k9-svc/blob/main/docs/SECURITY-BEST-PRACTICES.adoc == Template Files @@ -155,14 +155,14 @@ chmod +x nickel && sudo mv nickel /usr/local/bin/ cargo install just # Clone K9-SVC (for must shim and tooling) -git clone https://github.com/{{OWNER}}/k9-svc.git +git clone https://github.com/hyperpolymath/k9-svc.git ---- == Learn More -- **K9-SVC Specification:** https://github.com/{{OWNER}}/k9-svc/blob/main/SPEC.adoc -- **K9 User Guide:** https://github.com/{{OWNER}}/k9-svc/blob/main/GUIDE.adoc -- **Security Documentation:** https://github.com/{{OWNER}}/k9-svc/blob/main/docs/SECURITY-FAQ.adoc +- **K9-SVC Specification:** https://github.com/hyperpolymath/k9-svc/blob/main/SPEC.adoc +- **K9 User Guide:** https://github.com/hyperpolymath/k9-svc/blob/main/GUIDE.adoc +- **Security Documentation:** https://github.com/hyperpolymath/k9-svc/blob/main/docs/SECURITY-FAQ.adoc - **IANA Media Type:** `application/vnd.k9+nickel` == Contributing @@ -175,4 +175,4 @@ When adding K9 contractiles to your repository: 4. Sign Hunt-level components before committing 5. Add K9 validation to CI/CD pipeline -**Questions?** Open an issue on https://github.com/{{OWNER}}/k9-svc +**Questions?** Open an issue on https://github.com/hyperpolymath/k9-svc diff --git a/.machine_readable/self-validating/examples/ci-config.k9.ncl b/.machine_readable/self-validating/examples/ci-config.k9.ncl index 1f38e2d..9fe314e 100644 --- a/.machine_readable/self-validating/examples/ci-config.k9.ncl +++ b/.machine_readable/self-validating/examples/ci-config.k9.ncl @@ -19,7 +19,7 @@ K9! name = "ci-config", version = "1.0.0", description = "CI/CD configuration with runtime validation", - author = "{{AUTHOR}} <{{AUTHOR_EMAIL}}>", + author = "Jonathan D.A. Jewell ", }, }, diff --git a/.machine_readable/self-validating/examples/project-metadata.k9.ncl b/.machine_readable/self-validating/examples/project-metadata.k9.ncl index c8e6ebf..b2299b4 100644 --- a/.machine_readable/self-validating/examples/project-metadata.k9.ncl +++ b/.machine_readable/self-validating/examples/project-metadata.k9.ncl @@ -19,7 +19,7 @@ K9! name = "project-metadata", version = "1.0.0", description = "Pure data configuration for project metadata", - author = "{{AUTHOR}} <{{AUTHOR_EMAIL}}>", + author = "Jonathan D.A. Jewell ", }, }, @@ -30,14 +30,14 @@ K9! description = "A project following Rhodium Standard Repositories", repository = { - url = "https://github.com/{{OWNER}}/my-project", + url = "https://github.com/hyperpolymath/my-project", type = "git", }, author = { - name = "{{AUTHOR}}", - email = "{{AUTHOR_EMAIL}}", - organization = "{{AUTHOR_ORG}}", + name = "Jonathan D.A. Jewell", + email = "j.d.a.jewell@open.ac.uk", + organization = "The Open University", }, license = "MPL-2.0", @@ -45,7 +45,7 @@ K9! keywords = [ "rhodium-standard", "rsr", - "{{OWNER}}", + "hyperpolymath", ], }, diff --git a/.machine_readable/self-validating/examples/setup-repo.k9.ncl b/.machine_readable/self-validating/examples/setup-repo.k9.ncl index df79a55..2854ecc 100644 --- a/.machine_readable/self-validating/examples/setup-repo.k9.ncl +++ b/.machine_readable/self-validating/examples/setup-repo.k9.ncl @@ -20,7 +20,7 @@ K9! name = "setup-repo", version = "1.0.0", description = "Automated repository setup with RSR standards", - author = "{{AUTHOR}} <{{AUTHOR_EMAIL}}>", + author = "Jonathan D.A. Jewell ", }, warnings = [ "This component has full system access", @@ -104,8 +104,8 @@ K9! description = "Initialize Git repository", commands = [ "git init -b %{config.git.default_branch}", - "git config user.name '{{AUTHOR}}'", - "git config user.email '{{AUTHOR_EMAIL}}'", + "git config user.name 'Jonathan D.A. Jewell'", + "git config user.email 'j.d.a.jewell@open.ac.uk'", "echo '✓ Git initialized'", ], }, @@ -114,7 +114,7 @@ K9! description = "Add RSR-compliant workflows", commands = [ # This would copy workflow templates - # In a real implementation, would fetch from rsr-template-repo + # In a real implementation, would fetch from contractiles "echo '✓ Workflows configured'", ], }, @@ -132,7 +132,7 @@ K9! "add-license" = { description = "Add PMPL-1.0 license", commands = [ - "curl -sL https://raw.githubusercontent.com/{{OWNER}}/pmpl/main/LICENSE -o LICENSE", + "curl -sL https://raw.githubusercontent.com/hyperpolymath/pmpl/main/LICENSE -o LICENSE", "echo '✓ License added'", ], }, diff --git a/.machine_readable/self-validating/methodology-guard.k9.ncl b/.machine_readable/self-validating/methodology-guard.k9.ncl index 4c43325..99471d8 100644 --- a/.machine_readable/self-validating/methodology-guard.k9.ncl +++ b/.machine_readable/self-validating/methodology-guard.k9.ncl @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # # K9 Validator: Methodology Guard # Checks that agent work respects methodology constraints declared in @@ -52,8 +52,8 @@ let methodology_guard = { # out of the file (in this comment too) so init cannot match it, while # Nickel still evaluates the element back to the full token. Do not # "simplify" it to a plain string. (The PLACEHOLDER token and - # "rsr-template-repo" are not init tokens, so they survive as-is.) - reject_patterns = ["{{PLACEHOLDER}}", "{{" ++ "PROJECT}}", "rsr-template-repo"], + # "contractiles" are not init tokens, so they survive as-is.) + reject_patterns = ["{{PLACEHOLDER}}", "{{" ++ "PROJECT}}", "contractiles"], }, coverage_updated = { diff --git a/.machine_readable/self-validating/template-hunt.k9.ncl b/.machine_readable/self-validating/template-hunt.k9.ncl index a9cc350..b3fcb47 100644 --- a/.machine_readable/self-validating/template-hunt.k9.ncl +++ b/.machine_readable/self-validating/template-hunt.k9.ncl @@ -20,7 +20,7 @@ K9! name = "TODO: component-name", version = "1.0.0", description = "TODO: Detailed description of what this component does", - author = "{{AUTHOR}} <{{AUTHOR_EMAIL}}>", + author = "Jonathan D.A. Jewell ", }, warnings = [ "This component has full system access", diff --git a/.machine_readable/self-validating/template-kennel.k9.ncl b/.machine_readable/self-validating/template-kennel.k9.ncl index fa7e3f3..4228b26 100644 --- a/.machine_readable/self-validating/template-kennel.k9.ncl +++ b/.machine_readable/self-validating/template-kennel.k9.ncl @@ -19,7 +19,7 @@ K9! name = "TODO: component-name", version = "1.0.0", description = "TODO: Brief description of what this component contains", - author = "{{AUTHOR}} <{{AUTHOR_EMAIL}}>", + author = "Jonathan D.A. Jewell ", }, }, diff --git a/.machine_readable/self-validating/template-yard.k9.ncl b/.machine_readable/self-validating/template-yard.k9.ncl index 358671c..a723f5a 100644 --- a/.machine_readable/self-validating/template-yard.k9.ncl +++ b/.machine_readable/self-validating/template-yard.k9.ncl @@ -19,7 +19,7 @@ K9! name = "TODO: component-name", version = "1.0.0", description = "TODO: Brief description with validation details", - author = "{{AUTHOR}} <{{AUTHOR_EMAIL}}>", + author = "Jonathan D.A. Jewell ", }, }, diff --git a/.well-known/humans.txt b/.well-known/humans.txt index e062f4b..0ce0944 100644 --- a/.well-known/humans.txt +++ b/.well-known/humans.txt @@ -2,12 +2,12 @@ # humanstxt.org /* TEAM */ -Maintainer: {{AUTHOR}} ({{OWNER}}) -Contact: {{AUTHOR_EMAIL}} +Maintainer: Jonathan D.A. Jewell (hyperpolymath) +Contact: j.d.a.jewell@open.ac.uk From: United Kingdom /* SITE */ -Last update: {{CURRENT_DATE}} +Last update: 2026-07-27 Standards: RSR (Rhodium Standard Repository) License: MPL-2.0 (Palimpsest MPL) Components: Idris2 ABI, Zig FFI diff --git a/.well-known/security.txt b/.well-known/security.txt index 5414d50..2e05806 100644 --- a/.well-known/security.txt +++ b/.well-known/security.txt @@ -2,10 +2,8 @@ # RFC 9116 - security.txt # https://securitytxt.org/ -Contact: mailto:{{SECURITY_EMAIL}} -Expires: {{CURRENT_YEAR}}-12-31T23:59:59.000Z -Encryption: {{PGP_KEY_URL}} +Contact: mailto:j.d.a.jewell@open.ac.uk +Expires: 2026-12-31T23:59:59.000Z Preferred-Languages: en -Canonical: https://{{FORGE}}/{{OWNER}}/{{REPO}}/.well-known/security.txt -Policy: https://{{FORGE}}/{{OWNER}}/{{REPO}}/blob/main/SECURITY.md -Hiring: https://{{WEBSITE}}/careers +Canonical: https://github.com/hyperpolymath/contractiles/.well-known/security.txt +Policy: https://github.com/hyperpolymath/contractiles/blob/main/SECURITY.md diff --git a/0-AI-MANIFEST.a2ml b/0-AI-MANIFEST.a2ml index 68aad8c..c80e5d2 100644 --- a/0-AI-MANIFEST.a2ml +++ b/0-AI-MANIFEST.a2ml @@ -5,11 +5,11 @@ # [metadata] version = "0.1.0" -last-updated = "{{CURRENT_DATE}}" +last-updated = "2026-07-27" [project] name = "[YOUR-REPO-NAME]" -purpose = "{{PROJECT_DESCRIPTION}}" +purpose = "Normative constraint set-points for the A2ML/K9 ecosystem: the six-verb contractile vocabulary (intend / must / trust / adjust / dust / bust) expressing what should be true, as the counterpart to the descriptive "descriptiles" reading of what is true." [ai-allocation] agents = [ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8267cd4..5917f86 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,28 +1,12 @@ -# Code of Conduct - - +# Code of Conduct ## Our Pledge -We as members, contributors, and leaders pledge to make participation in Squisher Corpus a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation. +We as members, contributors, and leaders pledge to make participation in Contractiles a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. @@ -310,7 +294,7 @@ We thank these communities for their leadership in creating welcoming spaces. If you have questions about this Code of Conduct: -- Open a [Discussion](https://github.com/hyperpolymath/squisher-corpus/discussions) (for general questions) +- Open a [Discussion](https://github.com/hyperpolymath/contractiles/discussions) (for general questions) - Email j.d.a.jewell@open.ac.uk (for private questions) - Contact any maintainer directly diff --git a/Containerfile b/Containerfile index 85a288e..9755728 100644 --- a/Containerfile +++ b/Containerfile @@ -32,7 +32,7 @@ # # The Zig FFI side (src/interface/ffi/) is likewise out of scope here: it # is still the RSR template's uninstantiated scaffold (main.zig keeps the -# template's literal `{{project}}` placeholders — not valid Zig identifiers +# template's literal `contractiles` placeholders — not valid Zig identifiers # — and build.zig deliberately wires up no build/test steps yet). # # Build: podman build -t contractiles:latest -f Containerfile . diff --git a/Justfile b/Justfile index 9b2f200..c40d677 100644 --- a/Justfile +++ b/Justfile @@ -18,10 +18,10 @@ set positional-arguments := true # Re-generate with: contractile gen-just import? "build/contractile.just" -# Project metadata — customize these -project := "rsr-template-repo" +# Project metadata +project := "contractiles" OWNER := "hyperpolymath" -REPO := "rsr-template-repo" +REPO := "contractiles" version := "0.1.0" tier := "infrastructure" # 1 | 2 | infrastructure @@ -48,7 +48,7 @@ help recipe="": # Show this project's info info: - @echo "Project: {{project}}" + @echo "Project: contractiles" @echo "Version: {{version}}" @echo "RSR Tier: {{tier}}" @echo "Recipes: $(just --summary | wc -w)" @@ -80,41 +80,24 @@ import? "build/just/assess.just" # BUILD & COMPILE # ═══════════════════════════════════════════════════════════════════════════════ -# Build the project (debug mode) +# Build the project (debug mode): Idris2 ABI + Zig FFI build *args: - @echo "Building {{project}} (debug)..." - # TODO: Replace with your build command - # Examples: - # cargo build {{args}} # Rust - # mix compile {{args}} # Elixir - # zig build {{args}} # Zig - # deno task build {{args}} # Deno/ReScript - @echo "Build complete" + idris2 --build abi.ipkg + cd src/interface/ffi && zig build {{args}} # Build in release mode with optimizations build-release *args: - @echo "Building {{project}} (release)..." - # TODO: Replace with your release build command - # Examples: - # cargo build --release {{args}} - # MIX_ENV=prod mix compile {{args}} - # zig build -Doptimize=ReleaseFast {{args}} - @echo "Release build complete" + idris2 --build abi.ipkg + cd src/interface/ffi && zig build -Doptimize=ReleaseFast {{args}} -# Build and watch for changes (requires entr or similar) +# Build and watch for changes (requires entr) build-watch: - @echo "Watching for changes..." - # TODO: Customize file patterns for your language - # Examples: - # find src -name '*.rs' | entr -c just build - # mix compile --force --warnings-as-errors - # deno task dev + find src -name '*.zig' -o -name '*.idr' | entr -c just build # Clean build artifacts [reversible: rebuild with `just build`] clean: @echo "Cleaning..." - # TODO: Customize for your build system - rm -rf target/ _build/ build/ dist/ out/ obj/ bin/ + rm -rf src/interface/ffi/.zig-cache src/interface/ffi/zig-out build/ttc # Deep clean including caches [reversible: rebuild] clean-all: clean @@ -124,66 +107,35 @@ clean-all: clean # TEST & QUALITY # ═══════════════════════════════════════════════════════════════════════════════ -# Run all tests +# Run all tests: Idris2 ABI typecheck + Zig unit/integration tests test *args: - @echo "Running tests..." - # TODO: Replace with your test command - # Examples: - # cargo test {{args}} - # mix test {{args}} - # zig build test {{args}} - # deno test {{args}} - @echo "Tests passed!" + idris2 --typecheck abi.ipkg + cd src/interface/ffi && zig build test {{args}} # Run tests with verbose output test-verbose: - @echo "Running tests (verbose)..." - # TODO: Replace with verbose test command + idris2 --build abi.ipkg + cd src/interface/ffi && zig build test --summary all -# Smoke test +# Smoke test: does the FFI build at all test-smoke: - @echo "Smoke test..." - # TODO: Add basic sanity checks + cd src/interface/ffi && zig build # Run end-to-end tests (full pipeline: build → run → verify) e2e: - @echo "Running E2E tests..." - # TODO: Replace with your E2E test command. Examples: - # bash tests/e2e.sh # Shell-based E2E - # npx playwright test # Browser E2E - # mix test test/integration/e2e_test.exs # Elixir E2E - # cargo test --test end_to_end # Rust E2E - @echo "E2E tests passed!" - -# Run aspect tests (cross-cutting concern validation) + bash tests/e2e.sh + +# Run aspect tests (cross-cutting concern validation: +# SPDX headers, dangerous patterns) aspect: - @echo "Running aspect tests..." - # TODO: Replace with your aspect test command. Examples: - # bash tests/aspect_tests.sh # Shell-based aspect tests - # cargo test --test aspects # Rust aspect tests - # Aspect tests validate architectural invariants: - # - Thread safety (mutex in FFI modules) - # - ABI/FFI contract (declarations match exports) - # - SPDX compliance (all files have license headers) - # - No dangerous patterns (believe_me, assert_total, etc.) - @echo "Aspect tests passed!" - -# Run benchmarks (performance regression detection) + bash tests/aspect_tests.sh + +# Run benchmarks (Zig build/test timing, workflow validation timing) bench: - @echo "Running benchmarks..." - # TODO: Replace with your benchmark command. Examples: - # cargo bench # Rust criterion - # zig build bench # Zig benchmarks - # mix run bench/benchmarks.exs # Elixir benchee - # deno bench # Deno bench - @echo "Benchmarks complete!" - -# Run readiness tests (Component Readiness Grade: D/C/B) -readiness: - @echo "Running readiness tests..." - # TODO: Replace with your readiness test command. Examples: - # cargo test --test readiness -- --nocapture - @echo "Readiness tests complete!" + bash benches/template_bench.sh . human + +# Print the current CRG grade (see crg-grade below); there is no separate +# automated "readiness test" — the grade is self-assessed in READINESS.adoc. # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line) crg-grade: @@ -207,9 +159,8 @@ crg-badge: esac; \ echo "[![CRG $$grade](https://img.shields.io/badge/CRG-$$grade-$$color?style=flat-square)](https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades)" -# Run the full merge-requirement test suite (ALL categories) -# Per STANDING rule: P2P + E2E + aspect + execution + lifecycle + bench -test-all: test e2e aspect bench readiness +# Run the full test suite: unit/integration, E2E, and aspect tests +test-all: test e2e aspect @echo "All test categories passed — safe to merge!" # Run all quality checks @@ -224,52 +175,27 @@ fix: fmt # LINT & FORMAT # ═══════════════════════════════════════════════════════════════════════════════ -# Format all source files [reversible: git checkout] +# Format all Zig source files in place [reversible: git checkout] fmt: - @echo "Formatting source files..." - # TODO: Replace with your formatter - # Examples: - # cargo fmt - # mix format - # gleam format - # deno fmt + zig fmt src/interface/ffi # Check formatting without changes fmt-check: - @echo "Checking formatting..." - # TODO: Replace with your format check - # Examples: - # cargo fmt --check - # mix format --check-formatted - # gleam format --check + zig fmt --check src/interface/ffi -# Run linter +# Lint: there is no separate Idris2/Zig linter, so this re-runs the +# compilers in check-only mode, which is where both surface real warnings. lint: - @echo "Linting source files..." - # TODO: Replace with your linter - # Examples: - # cargo clippy -- -D warnings - # mix credo --strict - # gleam check + idris2 --typecheck abi.ipkg + cd src/interface/ffi && zig build # ═══════════════════════════════════════════════════════════════════════════════ -# RUN & EXECUTE +# INSTALL # ═══════════════════════════════════════════════════════════════════════════════ -# Run the application -run *args: build - # TODO: Replace with your run command - echo "Run not configured yet" - -# Run with verbose output -run-verbose *args: build - # TODO: Replace with verbose run command - echo "Run not configured yet" - -# Install to user path -install: build-release - @echo "Installing {{project}}..." - # TODO: Replace with your install command +# Install the built static library to a prefix (default: ~/.local) +install prefix="~/.local": build-release + cd src/interface/ffi && zig build --prefix {{prefix}} -Doptimize=ReleaseFast # ═══════════════════════════════════════════════════════════════════════════════ # DEPENDENCIES @@ -278,12 +204,9 @@ install: build-release # Install/check all dependencies deps: @echo "Checking dependencies..." - # TODO: Replace with your dependency check - # Examples: - # cargo check - # mix deps.get - # gleam deps download - @echo "All dependencies satisfied" + @command -v idris2 >/dev/null 2>&1 && echo " [OK] idris2" || echo " [FAIL] idris2 not found" + @command -v zig >/dev/null 2>&1 && echo " [OK] zig" || echo " [FAIL] zig not found" + @command -v just >/dev/null 2>&1 && echo " [OK] just" || echo " [FAIL] just not found" # Audit dependencies for vulnerabilities deps-audit: @@ -311,7 +234,7 @@ cookbook: #!/usr/bin/env bash mkdir -p docs OUTPUT="docs/just-cookbook.adoc" - echo "= {{project}} Justfile Cookbook" > "$OUTPUT" + echo "= contractiles Justfile Cookbook" > "$OUTPUT" echo ":toc: left" >> "$OUTPUT" echo ":toclevels: 3" >> "$OUTPUT" echo "" >> "$OUTPUT" @@ -337,10 +260,10 @@ cookbook: man: #!/usr/bin/env bash mkdir -p docs/man - cat > docs/man/{{project}}.1 << EOF - .TH {{project}} 1 "$(date +%Y-%m-%d)" "{{version}}" "{{project}} Manual" + cat > docs/man/contractiles.1 << EOF + .TH contractiles 1 "$(date +%Y-%m-%d)" "{{version}}" "contractiles Manual" .SH NAME - {{project}} \- RSR-compliant project + contractiles \- RSR-compliant project .SH SYNOPSIS .B just [recipe] [args...] @@ -349,7 +272,7 @@ man: .SH AUTHOR $(git config user.name 2>/dev/null || echo "Author") <$(git config user.email 2>/dev/null || echo "email")> EOF - echo "Generated: docs/man/{{project}}.1" + echo "Generated: docs/man/contractiles.1" # ═══════════════════════════════════════════════════════════════════════════════ # CONTAINERS (stapeln ecosystem — Podman + Chainguard Wolfi) @@ -379,14 +302,14 @@ container-init: fi # Prompt for container-specific values - read -rp "Service name (e.g. my-api) [{{project}}]: " _SERVICE_NAME - SERVICE_NAME="${_SERVICE_NAME:-{{project}}}" + read -rp "Service name (e.g. my-api) [contractiles]: " _SERVICE_NAME + SERVICE_NAME="${_SERVICE_NAME:-contractiles}" read -rp "Primary port [8080]: " _PORT PORT="${_PORT:-8080}" - read -rp "Container registry [ghcr.io/${OWNER:-{{OWNER}}}]: " _REGISTRY - REGISTRY="${_REGISTRY:-ghcr.io/${OWNER:-{{OWNER}}}}" + read -rp "Container registry [ghcr.io/${OWNER:-hyperpolymath}]: " _REGISTRY + REGISTRY="${_REGISTRY:-ghcr.io/${OWNER:-hyperpolymath}}" echo "" echo " Service: $SERVICE_NAME" @@ -429,11 +352,11 @@ container-build *args: if [ -f "container/ct-build.sh" ]; then cd container && ./ct-build.sh {{args}} elif [ -f "container/Containerfile" ]; then - podman build -t {{project}}:latest -f container/Containerfile . + podman build -t contractiles:latest -f container/Containerfile . elif [ -f "build/Containerfile" ]; then - podman build -t {{project}}:latest -f build/Containerfile . + podman build -t contractiles:latest -f build/Containerfile . elif [ -f "Containerfile" ]; then - podman build -t {{project}}:latest -f Containerfile . + podman build -t contractiles:latest -f Containerfile . else echo "No Containerfile found in container/, build/, or project root" exit 1 @@ -495,12 +418,12 @@ container-push: cd container && ./ct-build.sh --push else echo "No container/ct-build.sh found — falling back to podman push" - podman push {{project}}:latest + podman push contractiles:latest fi # Run container interactively (for debugging) container-run *args: - podman run --rm -it {{project}}:latest {{args}} + podman run --rm -it contractiles:latest {{args}} # ═══════════════════════════════════════════════════════════════════════════════ # CI & AUTOMATION @@ -601,7 +524,7 @@ test-matrix suite="unit" verbosity="normal" parallel="true": @echo "Test matrix: suite={{suite}} verbosity={{verbosity}} parallel={{parallel}}" # Container matrix: [build|run|push|shell|scan] x [registry] x [tag] -container-matrix action="build" registry="ghcr.io/{{OWNER}}" tag="latest": +container-matrix action="build" registry="ghcr.io/hyperpolymath" tag="latest": @echo "Container matrix: action={{action}} registry={{registry}} tag={{tag}}" # CI matrix: [lint|test|build|security|all] x [quick|full] @@ -681,7 +604,7 @@ assail: # Self-diagnostic — checks dependencies, permissions, paths doctor: - @echo "Running diagnostics for rsr-template-repo..." + @echo "Running diagnostics for contractiles..." @echo "Checking required tools..." @command -v just >/dev/null 2>&1 && echo " [OK] just" || echo " [FAIL] just not found" @command -v git >/dev/null 2>&1 && echo " [OK] git" || echo " [FAIL] git not found" @@ -691,7 +614,7 @@ doctor: # Guided tour of key features tour: - @echo "=== rsr-template-repo Tour ===" + @echo "=== contractiles Tour ===" @echo "" @echo "1. Project structure:" @ls -la @@ -706,12 +629,12 @@ tour: # Open feedback channel with diagnostic context help-me: - @echo "=== rsr-template-repo Help ===" + @echo "=== contractiles Help ===" @echo "Platform: $(uname -s) $(uname -m)" @echo "Shell: $SHELL" @echo "" @echo "To report an issue:" - @echo " https://github.com/hyperpolymath/rsr-template-repo/issues/new" + @echo " https://github.com/hyperpolymath/contractiles/issues/new" @echo "" @echo "Include the output of 'just doctor' in your report." diff --git a/README.adoc b/README.adoc index 120eb39..9d7cce2 100644 --- a/README.adoc +++ b/README.adoc @@ -1,52 +1,42 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell // SPDX-FileCopyrightText: 2024-2026 Jonathan D.A. Jewell (hyperpolymath) -= {{PROJECT_NAME}} += Contractiles :toc: :toc-placement: preamble -image:https://img.shields.io/badge/OpenSSF-Best_Practices-green?logo=opensourcesecurity[OpenSSF Best Practices,link="https://www.bestpractices.dev/en/projects/new?repo_url=https://{{FORGE}}/{{OWNER}}/{{REPO}}"] +image:https://img.shields.io/badge/OpenSSF-Best_Practices-green?logo=opensourcesecurity[OpenSSF Best Practices,link="https://www.bestpractices.dev/en/projects/new?repo_url=https://github.com/hyperpolymath/contractiles"] image:https://img.shields.io/badge/License-MPL_2.0-blue.svg[License: MPL-2.0,link="https://opensource.org/licenses/MPL-2.0"] -image:https://api.thegreenwebfoundation.org/greencheckimage/{{FORGE}}[Green Web,link="https://www.thegreenwebfoundation.org/green-web-check/?url={{FORGE}}"] +image:https://api.thegreenwebfoundation.org/greencheckimage/github.com[Green Web,link="https://www.thegreenwebfoundation.org/green-web-check/?url=github.com"] -{{PROJECT_DESCRIPTION}} - -[IMPORTANT] -==== -*This file is a template.* You are reading `README.adoc` from the *RSR template repo* -(or a freshly-cloned copy of it). Run `just init` to replace every `{{PLACEHOLDER}}` -token with your project's details, then delete this admonition. Until you do, the -`{{...}}` markers below are intentional placeholders, not content. -==== +Normative constraint set-points for the A2ML/K9 ecosystem: the six-verb contractile vocabulary (intend / must / trust / adjust / dust / bust) expressing what should be true, as the counterpart to the descriptive "descriptiles" reading of what is true. == What this is -A new repository scaffolded from the *Rhodium Standard Repository (RSR)* template: -a batteries-included starting point that ships with CI/CD, machine-readable project -metadata, an AI-agent gatekeeper protocol, a formally-typed ABI/FFI seam -(Idris2 + Zig), container and reproducible-build scaffolding, and governance -infrastructure — all wired and passing the RSR validators on day one. +Contractiles is the standalone, normative half of the contractile/descriptile +pattern used across the A2ML/K9 ecosystem: it defines the *set-point* — what +should be true of a repository or component — via the six-verb vocabulary +`intend / must / trust / adjust / dust / bust` (plus `k9` as trust-tier +infrastructure), serialised in a2ml under `.machine_readable/contractiles/`. +Its counterpart, *descriptiles*, is the *reading* — what is actually true — +and is not a separate repository. -Replace this section with a description of *your* project once initialised. +This repository was scaffolded from the *Rhodium Standard Repository (RSR)* +template, so it also ships with CI/CD, machine-readable project metadata, an +AI-agent gatekeeper protocol, a formally-typed ABI/FFI seam (Idris2 + Zig), +container and reproducible-build scaffolding, and governance infrastructure. == Quick start [source,bash] ---- -# 1. Create a repo from this template (or clone it), then from the repo root: -just init # interactive bootstrap: fills every {{PLACEHOLDER}} - -# 2. See the available tasks: +# See the available tasks: just # lists all phases (build, test, validate, audit, ...) -# 3. Check the repo still satisfies the RSR shape: +# Check the repo still satisfies the RSR shape: just validate # structure + metadata checks ---- -`just init` prompts for the project name, owner, author, licence contact, and the -other values listed in `.machine_readable/ai/PLACEHOLDERS.adoc`, substitutes them -across the tree, validates the result, and (if available) runs the `k9-svc` checks. - == What you get * *Machine-readable metadata* (`.machine_readable/6a2/`) — `STATE`, `META`, @@ -83,7 +73,6 @@ across the tree, validates the result, and (if available) runs the `k9-svc` chec * `EXPLAINME.adoc` — the engineering deep-dive: how the pieces actually work. * `AFFIRMATION.adoc` — the dated, signed honesty snapshot of the repo's true state. * `AUDIT.adoc` — the release audit gate. -* `.machine_readable/ai/PLACEHOLDERS.adoc` — the full placeholder reference. == Licence diff --git a/benches/template_bench.sh b/benches/template_bench.sh index 5fb58a8..0494e16 100755 --- a/benches/template_bench.sh +++ b/benches/template_bench.sh @@ -2,8 +2,8 @@ # SPDX-License-Identifier: MPL-2.0 # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # -# Template Benchmarks -# Measures performance characteristics of template validation and build system +# Contractiles Benchmarks +# Measures performance characteristics of the Zig FFI build system set -euo pipefail @@ -34,45 +34,14 @@ TIME_CMD="/usr/bin/time -f %e" 2>/dev/null || TIME_CMD="time" echo "" echo "═══════════════════════════════════════════════════════════════════════════════" -echo "Template Benchmarks" +echo "Contractiles Benchmarks" echo "═══════════════════════════════════════════════════════════════════════════════" echo "" declare -A results #============================================================================== -# BENCHMARK 1: Template Validation -#============================================================================== - -log_info "Running template validation benchmark" - -# Warm-up run -if [ -f "$REPO_ROOT/scripts/validate-template.sh" ]; then - bash "$REPO_ROOT/scripts/validate-template.sh" "$REPO_ROOT" 0 > /dev/null 2>&1 || true -fi - -# Timed runs -BENCH_RUNS=3 -TOTAL_TIME=0 - -for i in $(seq 1 $BENCH_RUNS); do - START=$(date +%s%N) - bash "$REPO_ROOT/scripts/validate-template.sh" "$REPO_ROOT" 0 > /dev/null 2>&1 || true - END=$(date +%s%N) - - # Convert to milliseconds - RUN_TIME=$(( (END - START) / 1000000 )) - TOTAL_TIME=$(( TOTAL_TIME + RUN_TIME )) - - [ "$OUTPUT_FORMAT" = "human" ] && echo " Run $i: ${RUN_TIME}ms" -done - -AVG_VALIDATION_TIME=$(( TOTAL_TIME / BENCH_RUNS )) -results[validation]=$AVG_VALIDATION_TIME -log_pass "Validation: ${AVG_VALIDATION_TIME}ms average (${BENCH_RUNS} runs)" - -#============================================================================== -# BENCHMARK 2: Zig Build +# BENCHMARK 1: Zig Build #============================================================================== log_info "Running Zig build benchmark" @@ -91,7 +60,7 @@ else TOTAL_TIME=0 for i in $(seq 1 $BENCH_RUNS); do - rm -rf zig-cache + rm -rf .zig-cache zig-out START=$(date +%s%N) zig build --summary off > /dev/null 2>&1 || true @@ -111,7 +80,7 @@ else fi #============================================================================== -# BENCHMARK 3: Zig Tests +# BENCHMARK 2: Zig Tests #============================================================================== log_info "Running Zig test benchmark" @@ -141,7 +110,7 @@ else fi #============================================================================== -# BENCHMARK 4: Workflow Validation +# BENCHMARK 3: Workflow Validation #============================================================================== log_info "Running workflow validation benchmark" @@ -156,22 +125,6 @@ if [ -f "$REPO_ROOT/tests/workflows/validate_workflows_test.sh" ]; then log_pass "Workflow validation: ${WORKFLOW_TIME}ms" fi -#============================================================================== -# BENCHMARK 5: Template Instantiation -#============================================================================== - -log_info "Running template instantiation benchmark" - -if [ -f "$REPO_ROOT/tests/e2e/template_instantiation_test.sh" ]; then - START=$(date +%s%N) - bash "$REPO_ROOT/tests/e2e/template_instantiation_test.sh" "$REPO_ROOT" > /dev/null 2>&1 || true - END=$(date +%s%N) - - INSTANTIATION_TIME=$(( (END - START) / 1000000 )) - results[instantiation]=$INSTANTIATION_TIME - log_pass "Template instantiation: ${INSTANTIATION_TIME}ms" -fi - #============================================================================== # SUMMARY #============================================================================== diff --git a/build/.guix-channel b/build/.guix-channel index f9bdf68..581568c 100644 --- a/build/.guix-channel +++ b/build/.guix-channel @@ -1,20 +1,20 @@ ;; SPDX-License-Identifier: MPL-2.0 -;; Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +;; Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) ;; -;; Guix channel definition for {{PROJECT_NAME}} +;; Guix channel definition for contractiles ;; ;; To use this channel, add to ~/.config/guix/channels.scm: ;; ;; (channel -;; (name '{{PROJECT_NAME}}) -;; (url "https://github.com/{{OWNER}}/{{PROJECT_NAME}}") +;; (name 'contractiles) +;; (url "https://github.com/hyperpolymath/contractiles") ;; (branch "main")) ;; ;; Then: guix pull (channel (version 0) - (url "https://github.com/{{OWNER}}/{{PROJECT_NAME}}") + (url "https://github.com/hyperpolymath/contractiles") (dependencies (channel (name 'guix) diff --git a/build/Containerfile b/build/Containerfile index d7266bc..4ab0867 100644 --- a/build/Containerfile +++ b/build/Containerfile @@ -1,10 +1,10 @@ # SPDX-License-Identifier: MPL-2.0 -# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # -# Containerfile for {{PROJECT_NAME}} -# Build: podman build -t {{project}}:latest -f Containerfile . -# Run: podman run --rm -it {{project}}:latest -# Seal: selur seal {{project}}:latest +# Containerfile for Contractiles +# Build: podman build -t contractiles:latest -f Containerfile . +# Run: podman run --rm -it contractiles:latest +# Seal: selur seal contractiles:latest # --- Build stage --- FROM cgr.dev/chainguard/wolfi-base:latest AS build @@ -30,12 +30,12 @@ FROM cgr.dev/chainguard/static:latest # Copy built artifact from build stage # TODO: Replace with your binary/artifact path # Examples: -# COPY --from=build /build/target/release/{{project}} /usr/local/bin/ -# COPY --from=build /build/_build/prod/rel/{{project}} /app/ -# COPY --from=build /build/zig-out/bin/{{project}} /usr/local/bin/ +# COPY --from=build /build/target/release/contractiles /usr/local/bin/ +# COPY --from=build /build/_build/prod/rel/contractiles /app/ +# COPY --from=build /build/zig-out/bin/contractiles /usr/local/bin/ # Non-root user (chainguard images default to nonroot) USER nonroot # TODO: Replace with your entrypoint -# ENTRYPOINT ["/usr/local/bin/{{project}}"] +# ENTRYPOINT ["/usr/local/bin/contractiles"] diff --git a/build/guix.scm b/build/guix.scm index 33b1a9a..5ae35de 100644 --- a/build/guix.scm +++ b/build/guix.scm @@ -1,13 +1,15 @@ ;; SPDX-License-Identifier: MPL-2.0 -;; Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +;; Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) ;; -;; Guix package definition for {{PROJECT_NAME}} +;; Guix package definition for contractiles ;; ;; Usage: ;; guix shell -D -f guix.scm # Enter development shell ;; guix build -f guix.scm # Build package ;; -;; TODO: Replace {{PROJECT_NAME}} and customize inputs for your language/stack. +;; TODO: wire real build/check phases (Idris2 `idris2 --build abi.ipkg` + +;; Zig `zig build test` in src/interface/ffi/) and Guix inputs for the +;; Idris2 and Zig toolchains once they are packaged/verified under Guix. ;; See: https://guix.gnu.org/manual/en/html_node/Defining-Packages.html (use-modules (guix packages) @@ -18,7 +20,7 @@ (gnu packages base)) (package - (name "{{PROJECT_NAME}}") + (name "contractiles") (version "0.1.0") (source (local-file "." "source" #:recursive? #t @@ -63,9 +65,14 @@ (list ;; TODO: Add runtime dependencies )) - (home-page "https://github.com/{{OWNER}}/{{PROJECT_NAME}}") - (synopsis "{{PROJECT_PURPOSE}}") - (description "RSR-compliant project. See README.adoc for details.") + (home-page "https://github.com/hyperpolymath/contractiles") + (synopsis "Normative constraint set-points for the A2ML/K9 ecosystem") + (description "Contractiles defines the normative set-point half of the +contractile/descriptile pattern used across the A2ML/K9 ecosystem: the +six-verb vocabulary intend/must/trust/adjust/dust/bust (plus k9 as +trust-tier infrastructure) expressing what should be true of a repository +or component, as the counterpart to the descriptive \"descriptiles\" +reading of what is true. See README.adoc for details.") (license (list ;; MPL-2.0 extends MPL-2.0 mpl2.0))) diff --git a/build/just/groove.just b/build/just/groove.just index 029a9bd..b1f419e 100644 --- a/build/just/groove.just +++ b/build/just/groove.just @@ -70,8 +70,8 @@ verify-template: fi # Check for template defaults still present - if grep -q 'rsr-template-repo' Justfile 2>/dev/null; then - echo "⚠ Justfile still references 'rsr-template-repo' — update project name" + if grep -q 'contractiles' Justfile 2>/dev/null; then + echo "⚠ Justfile still references 'contractiles' — update project name" FOUND=1 fi diff --git a/build/setup.sh b/build/setup.sh index 24c7e5e..ba9454b 100755 --- a/build/setup.sh +++ b/build/setup.sh @@ -1,12 +1,12 @@ #!/bin/sh # SPDX-License-Identifier: MPL-2.0 -# setup.sh — Universal setup script for rsr-template-repo +# setup.sh — Universal setup script for contractiles # # Detects your shell, platform, and installs prerequisites. # Then hands off to `just setup` for project-specific configuration. # # Usage: -# curl -fsSL https://raw.githubusercontent.com/hyperpolymath/rsr-template-repo/main/setup.sh | sh +# curl -fsSL https://raw.githubusercontent.com/hyperpolymath/contractiles/main/setup.sh | sh # # or after cloning: # ./setup.sh # @@ -167,7 +167,7 @@ install_just() { # ── Main ── main() { - printf "%s=== rsr-template-repo Setup ===%s\n\n" "$BOLD" "$RESET" + printf "%s=== contractiles Setup ===%s\n\n" "$BOLD" "$RESET" # Detect environment SHELL_NAME=$(detect_shell) @@ -198,8 +198,8 @@ main() { # Step 2: Check if we're in the repo directory if [ ! -f "Justfile" ] && [ ! -f "justfile" ]; then warn "Not in a repo directory (no Justfile found)" - info "Clone first: git clone https://github.com/hyperpolymath/rsr-template-repo.git" - info "Then: cd rsr-template-repo && ./setup.sh" + info "Clone first: git clone https://github.com/hyperpolymath/contractiles.git" + info "Then: cd contractiles && ./setup.sh" exit 1 fi diff --git a/container/.gatekeeper.yaml b/container/.gatekeeper.yaml index 4aac671..4783b2c 100644 --- a/container/.gatekeeper.yaml +++ b/container/.gatekeeper.yaml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: MPL-2.0 # -# Svalinn gatekeeper policy for {{PROJECT_NAME}} +# Svalinn gatekeeper policy for Contractiles # # Controls which operations are permitted through the edge gateway. # This template provides moderate security defaults — not wide-open test diff --git a/container/Containerfile b/container/Containerfile index ba85260..a2d26c4 100644 --- a/container/Containerfile +++ b/container/Containerfile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# {{PROJECT_NAME}} Container Image +# Contractiles Container Image # # Multi-stage build template for Chainguard Wolfi base images. # Customise the builder stage for your language and copy the @@ -69,13 +69,13 @@ COPY . . FROM cgr.dev/chainguard/wolfi-base:latest # OCI image labels (compatible with cerro-torre .ctp bundle metadata) -LABEL org.opencontainers.image.title="{{PROJECT_NAME}}" \ - org.opencontainers.image.description="{{PROJECT_DESCRIPTION}}" \ - org.opencontainers.image.url="https://{{FORGE}}/{{OWNER}}/{{REPO}}" \ - org.opencontainers.image.source="https://{{FORGE}}/{{OWNER}}/{{REPO}}" \ - org.opencontainers.image.vendor="{{OWNER}}" \ - org.opencontainers.image.licenses="{{LICENSE}}" \ - org.opencontainers.image.authors="{{AUTHOR}} <{{AUTHOR_EMAIL}}>" \ +LABEL org.opencontainers.image.title="Contractiles" \ + org.opencontainers.image.description="Normative constraint set-points for the A2ML/K9 ecosystem: the six-verb contractile vocabulary (intend / must / trust / adjust / dust / bust) expressing what should be true, as the counterpart to the descriptive "descriptiles" reading of what is true." \ + org.opencontainers.image.url="https://github.com/hyperpolymath/contractiles" \ + org.opencontainers.image.source="https://github.com/hyperpolymath/contractiles" \ + org.opencontainers.image.vendor="hyperpolymath" \ + org.opencontainers.image.licenses="MPL-2.0" \ + org.opencontainers.image.authors="Jonathan D.A. Jewell " \ dev.cerrotorre.manifest="container/manifest.toml" \ dev.cerrotorre.gatekeeper="container/.gatekeeper.yaml" \ dev.stapeln.compose="container/compose.toml" diff --git a/container/README.adoc b/container/README.adoc index 78275d2..8ee44cf 100644 --- a/container/README.adoc +++ b/container/README.adoc @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= {{PROJECT_NAME}} Container Templates += Contractiles Container Templates :toc: left :toclevels: 3 :sectnums: diff --git a/container/compose.toml b/container/compose.toml index a14f8a0..4b1f4bf 100644 --- a/container/compose.toml +++ b/container/compose.toml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: MPL-2.0 # -# {{PROJECT_NAME}} selur-compose configuration +# Contractiles selur-compose configuration # # Orchestrates the container stack as verified container bundles (.ctp). # Uses selur zero-copy IPC between services on the same host. diff --git a/container/ct-build.sh b/container/ct-build.sh index a54a541..67337ef 100755 --- a/container/ct-build.sh +++ b/container/ct-build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # SPDX-License-Identifier: MPL-2.0 # -# {{PROJECT_NAME}} — Cerro Torre build, sign, and verify pipeline +# Contractiles — Cerro Torre build, sign, and verify pipeline # # Builds the container image, packages it as a verified .ctp bundle, # signs it with Ed25519, and verifies the result. Gracefully degrades @@ -46,7 +46,7 @@ IMAGE_NAME="{{SERVICE_NAME}}" FULL_IMAGE="${CT_REGISTRY}/${IMAGE_NAME}:${CT_TAG}" CTP_FILE="${SCRIPT_DIR}/${IMAGE_NAME}-${CT_TAG}.ctp" -echo "=== {{PROJECT_NAME}} Cerro Torre Build Pipeline ===" +echo "=== Contractiles Cerro Torre Build Pipeline ===" echo " Image: ${FULL_IMAGE}" echo " Key: ${CT_KEY_ID}" echo " Bundle: ${CTP_FILE}" diff --git a/container/deploy.k9.ncl b/container/deploy.k9.ncl index 0ad0d04..c28b5aa 100644 --- a/container/deploy.k9.ncl +++ b/container/deploy.k9.ncl @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -# deploy.k9.ncl — {{PROJECT_NAME}} deployment component (Hunt level) +# deploy.k9.ncl — Contractiles deployment component (Hunt level) # # k9-svc deployment specification with full pedigree (L1-L5). # Security Level: 'Hunt (requires cryptographic handshake for execution). @@ -19,10 +19,10 @@ let component_pedigree = { # ───────────────────────────────────────────────────────────── metadata = { name = "{{SERVICE_NAME}}-deploy", - version = "{{VERSION}}", + version = "0.1.0", breed = "application/vnd.k9+nickel", magic_number = "K9!", - description = "{{PROJECT_NAME}} deployment component (Hunt level)", + description = "Contractiles deployment component (Hunt level)", }, # ───────────────────────────────────────────────────────────── diff --git a/container/entrypoint.sh b/container/entrypoint.sh index a7a0369..6ed5309 100755 --- a/container/entrypoint.sh +++ b/container/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/sh # SPDX-License-Identifier: MPL-2.0 -# {{PROJECT_NAME}} container entrypoint +# Contractiles container entrypoint # # Handles signal propagation, startup logging, and health check # preparation before exec-ing into the main application process. diff --git a/container/manifest.toml b/container/manifest.toml index f55fcb3..f72d333 100644 --- a/container/manifest.toml +++ b/container/manifest.toml @@ -1,27 +1,27 @@ # SPDX-License-Identifier: MPL-2.0 # -# Cerro Torre manifest for {{PROJECT_NAME}} .ctp bundle +# Cerro Torre manifest for Contractiles .ctp bundle # # This manifest describes the container image for verified # container packaging. Used by `ct pack` to create .ctp bundles. [metadata] name = "{{SERVICE_NAME}}" -version = "{{VERSION}}" +version = "0.1.0" revision = 1 -summary = "{{PROJECT_DESCRIPTION}}" +summary = "Normative constraint set-points for the A2ML/K9 ecosystem: the six-verb contractile vocabulary (intend / must / trust / adjust / dust / bust) expressing what should be true, as the counterpart to the descriptive "descriptiles" reading of what is true." description = """ -{{PROJECT_NAME}} — containerised service packaged as a verified +Contractiles — containerised service packaged as a verified cerro-torre .ctp bundle with Ed25519 signing and full provenance tracking. """ -license = "{{LICENSE}}" -homepage = "https://{{FORGE}}/{{OWNER}}/{{REPO}}" -maintainer = "{{AUTHOR}} <{{EMAIL}}>" +license = "MPL-2.0" +homepage = "https://github.com/hyperpolymath/contractiles" +maintainer = "Jonathan D.A. Jewell <{{EMAIL}}>" [provenance] -upstream = "https://{{FORGE}}/{{OWNER}}/{{REPO}}" -import_date = {{CURRENT_DATE}}T00:00:00Z +upstream = "https://github.com/hyperpolymath/contractiles" +import_date = 2026-07-27T00:00:00Z [dependencies] runtime = ["ca-certificates", "curl"] diff --git a/container/vordr.toml b/container/vordr.toml index af38fc5..8b3f2f9 100644 --- a/container/vordr.toml +++ b/container/vordr.toml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: MPL-2.0 # -# Vordr runtime monitoring configuration for {{PROJECT_NAME}} +# Vordr runtime monitoring configuration for Contractiles # # Vordr watches container health, detects crashes, tracks resource usage, # and emits structured logs. It runs alongside the application stack and @@ -13,7 +13,7 @@ [metadata] name = "{{SERVICE_NAME}}" -version = "{{VERSION}}" +version = "0.1.0" # ============================================================================ # Health Monitoring diff --git a/docs-template/README.adoc b/docs-template/README.adoc index bbbaf99..741af7c 100644 --- a/docs-template/README.adoc +++ b/docs-template/README.adoc @@ -10,8 +10,8 @@ This directory is the *minimum heavy-wiki seed* for a hyperpolymath repo. == How to adopt . Copy `docs-template/` → `docs/` in your repo. -. Replace `{{PROJECT_NAME}}`, `{{OWNER}}`, `{{AUTHOR}}`, `{{AUTHOR_EMAIL}}`, - `{{CURRENT_YEAR}}` placeholders. +. Replace `Contractiles`, `hyperpolymath`, `Jonathan D.A. Jewell`, `j.d.a.jewell@open.ac.uk`, + `2026` placeholders. . Delete any sections that genuinely do not apply (don't leave empty scaffolding — the 2026-05-26 doc-debt audit flagged 61 estate repos with empty `docs/` dirs as a separate category of debt). diff --git a/docs-template/architecture.adoc b/docs-template/architecture.adoc index 864549d..5e7a28a 100644 --- a/docs-template/architecture.adoc +++ b/docs-template/architecture.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// SPDX-FileCopyrightText: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> -= Architecture — {{PROJECT_NAME}} -:revdate: {{CURRENT_YEAR}}-MM-DD +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) += Architecture — Contractiles +:revdate: 2026-MM-DD == System overview diff --git a/docs-template/contributing.adoc b/docs-template/contributing.adoc index eb22aac..3eeaefa 100644 --- a/docs-template/contributing.adoc +++ b/docs-template/contributing.adoc @@ -1,12 +1,12 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// SPDX-FileCopyrightText: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> -= Contributing — {{PROJECT_NAME}} -:revdate: {{CURRENT_YEAR}}-MM-DD +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) += Contributing — Contractiles +:revdate: 2026-MM-DD == Audience -Developers working *on* `{{PROJECT_NAME}}`. For consumers (people calling +Developers working *on* `Contractiles`. For consumers (people calling or depending on it) see link:./usage.adoc[usage.adoc]. == Local-dev setup @@ -23,8 +23,8 @@ One-shot setup: [source,bash] ---- -git clone git@github.com:{{OWNER}}/{{PROJECT_NAME}}.git -cd {{PROJECT_NAME}} +git clone git@github.com:hyperpolymath/Contractiles.git +cd Contractiles just setup # installs deps, sets up hooks just test # runs the full test suite ---- @@ -86,6 +86,6 @@ When you make a non-obvious design decision, write it down: == Reporting issues -* Bugs in `{{PROJECT_NAME}}`: file at `{{OWNER}}/{{PROJECT_NAME}}/issues`. +* Bugs in `Contractiles`: file at `hyperpolymath/Contractiles/issues`. * Estate-wide concerns (policy, conventions, CI): file at `hyperpolymath/standards/issues`. diff --git a/docs-template/decisions/0001-template.adoc b/docs-template/decisions/0001-template.adoc index eff8bb8..b4070a8 100644 --- a/docs-template/decisions/0001-template.adoc +++ b/docs-template/decisions/0001-template.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// SPDX-FileCopyrightText: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) = ADR-0001 — Use Architecture Decision Records -:revdate: {{CURRENT_YEAR}}-MM-DD +:revdate: 2026-MM-DD :status: ACCEPTED == Context diff --git a/docs-template/troubleshooting.adoc b/docs-template/troubleshooting.adoc index 8c62e69..db47f50 100644 --- a/docs-template/troubleshooting.adoc +++ b/docs-template/troubleshooting.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// SPDX-FileCopyrightText: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> -= Troubleshooting — {{PROJECT_NAME}} -:revdate: {{CURRENT_YEAR}}-MM-DD +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) += Troubleshooting — Contractiles +:revdate: 2026-MM-DD This file is a *living FAQ* — known failure modes and recovery paths. Add a new entry every time you debug something that took more than 15 @@ -54,5 +54,5 @@ just log-tail # last N lines of logs * `docs/architecture.adoc` — internals. * `docs/decisions/` — historical record of why things are this shape. -* `https://github.com/{{OWNER}}/{{PROJECT_NAME}}/issues?q=is%3Aissue+` — has anyone hit this before? +* `https://github.com/hyperpolymath/Contractiles/issues?q=is%3Aissue+` — has anyone hit this before? * `https://github.com/hyperpolymath/standards/issues` — for estate-wide problems. diff --git a/docs-template/usage.adoc b/docs-template/usage.adoc index 930c763..7e469f9 100644 --- a/docs-template/usage.adoc +++ b/docs-template/usage.adoc @@ -1,12 +1,12 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// SPDX-FileCopyrightText: {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> -= Usage — {{PROJECT_NAME}} -:revdate: {{CURRENT_YEAR}}-MM-DD +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) += Usage — Contractiles +:revdate: 2026-MM-DD == Audience -This document is for *consumers* of `{{PROJECT_NAME}}` — people who depend +This document is for *consumers* of `Contractiles` — people who depend on it, call it, or include it. For developers working *on* it, see link:./contributing.adoc[contributing.adoc]. @@ -31,7 +31,7 @@ Expected output: [source] ---- -{{PROJECT_NAME}} v0.0.0 +Contractiles v0.0.0 Listening on 127.0.0.1:8080 ---- diff --git a/docs/QUICKSTART.adoc b/docs/QUICKSTART.adoc index 754fd5e..4b7d18f 100644 --- a/docs/QUICKSTART.adoc +++ b/docs/QUICKSTART.adoc @@ -15,7 +15,7 @@ Get up and running in 60 seconds. [source,bash] ---- -git clone https://github.com/{{OWNER}}/rsr-template-repo my-project +git clone https://github.com/hyperpolymath/contractiles my-project cd my-project rm -rf .git && git init -b main just init # interactive placeholder replacement diff --git a/docs/architecture/THREAT-MODEL.adoc b/docs/architecture/THREAT-MODEL.adoc index 5f36b22..61e5289 100644 --- a/docs/architecture/THREAT-MODEL.adoc +++ b/docs/architecture/THREAT-MODEL.adoc @@ -2,18 +2,18 @@ // Copyright (c) Jonathan D.A. Jewell = Threat Model - + -# Threat Model: {{PROJECT_NAME}} +# Threat Model: Contractiles ## Document Info | Field | Value | |---------------|--------------------------------| -| Project | {{PROJECT_NAME}} | +| Project | Contractiles | | Version | 1.0 | -| Last Reviewed | {{DATE}} | -| Author | {{AUTHOR}} | +| Last Reviewed | 2026-07-27 | +| Author | Jonathan D.A. Jewell | | Methodology | STRIDE | ## Scope @@ -36,7 +36,7 @@ ## System Overview -Brief description of {{PROJECT_NAME}} and its architecture. +Brief description of Contractiles and its architecture. > See [STATE-VISUALIZER.adoc](../STATE-VISUALIZER.adoc) for the full architecture diagram and completion dashboard. diff --git a/docs/attribution/CITATION.cff b/docs/attribution/CITATION.cff index 05d36d9..b8d0f6e 100644 --- a/docs/attribution/CITATION.cff +++ b/docs/attribution/CITATION.cff @@ -1,14 +1,14 @@ cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: -- family-names: "{{AUTHOR_LAST}}" - given-names: "{{AUTHOR_FIRST}}" +- family-names: "Jewell" + given-names: "Jonathan" orcid: "https://orcid.org/0000-0000-0000-0000" # Placeholder -title: "{{PROJECT_NAME}}" +title: "Contractiles" version: 0.1.0 -date-released: {{CURRENT_DATE}} -url: "https://{{FORGE}}/{{OWNER}}/{{REPO}}" -repository-code: "https://{{FORGE}}/{{OWNER}}/{{REPO}}" +date-released: 2026-07-27 +url: "https://github.com/hyperpolymath/contractiles" +repository-code: "https://github.com/hyperpolymath/contractiles" license: MPL-2.0 keywords: - "rsr" diff --git a/docs/attribution/CITATIONS.adoc b/docs/attribution/CITATIONS.adoc index 0a8b419..06fba90 100644 --- a/docs/attribution/CITATIONS.adoc +++ b/docs/attribution/CITATIONS.adoc @@ -1,36 +1,36 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= {{PROJECT_NAME}} - Citation Guide += Contractiles - Citation Guide :toc: == BibTeX [source,bibtex] ---- -@software{{{PROJECT_NAME}}_{{CURRENT_YEAR}}, - author = {{{AUTHOR_LAST}}, {{AUTHOR_FIRST}}}, - title = {{{PROJECT_NAME}}}, - year = {{{CURRENT_YEAR}}}, - url = {https://github.com/{{OWNER}}/{{PROJECT_NAME}}}, +@software{Contractiles_2026, + author = {Jewell, Jonathan}, + title = {Contractiles}, + year = {2026}, + url = {https://github.com/hyperpolymath/Contractiles}, license = {MPL-2.0} } ---- == Harvard Style -{{AUTHOR_LAST}}, {{AUTHOR_INITIALS}} ({{CURRENT_YEAR}}) _{{PROJECT_NAME}}_ [Computer software]. Available at: https://github.com/{{OWNER}}/{{PROJECT_NAME}} +Jewell, J.D.A. (2026) _Contractiles_ [Computer software]. Available at: https://github.com/hyperpolymath/Contractiles == OSCOLA -{{AUTHOR}}, '{{PROJECT_NAME}}' ({{CURRENT_YEAR}}) +Jonathan D.A. Jewell, 'Contractiles' (2026) == MLA -{{AUTHOR_LAST}}, {{AUTHOR_FIRST}} "{{PROJECT_NAME}}." {{CURRENT_YEAR}}, github.com/{{OWNER}}/{{PROJECT_NAME}}. +Jewell, Jonathan "Contractiles." 2026, github.com/hyperpolymath/Contractiles. == APA 7 -{{AUTHOR_LAST}}, {{AUTHOR_INITIALS}} ({{CURRENT_YEAR}}). _{{PROJECT_NAME}}_ [Computer software]. GitHub. https://github.com/{{OWNER}}/{{PROJECT_NAME}} +Jewell, J.D.A. (2026). _Contractiles_ [Computer software]. GitHub. https://github.com/hyperpolymath/Contractiles == See Also diff --git a/docs/attribution/MAINTAINERS.adoc b/docs/attribution/MAINTAINERS.adoc index 7908bff..aa23a55 100644 --- a/docs/attribution/MAINTAINERS.adoc +++ b/docs/attribution/MAINTAINERS.adoc @@ -11,9 +11,9 @@ This document lists the maintainers of this project and their responsibilities. |=== | Name | Role | Contact -| {{AUTHOR}} +| Jonathan D.A. Jewell | Lead Maintainer -| https://github.com/{{OWNER}}[@{{OWNER}}] +| https://github.com/hyperpolymath[@hyperpolymath] |=== == Responsibilities diff --git a/docs/decisions/0000-template.adoc b/docs/decisions/0000-template.adoc index 6abe098..465cf47 100644 --- a/docs/decisions/0000-template.adoc +++ b/docs/decisions/0000-template.adoc @@ -2,7 +2,7 @@ // Copyright (c) Jonathan D.A. Jewell = Architecture Decision Record: 0000-template - + # [NUMBER]. [TITLE] diff --git a/docs/decisions/0001-adopt-rsr-standard.adoc b/docs/decisions/0001-adopt-rsr-standard.adoc index e8c6ed5..ab983a8 100644 --- a/docs/decisions/0001-adopt-rsr-standard.adoc +++ b/docs/decisions/0001-adopt-rsr-standard.adoc @@ -2,7 +2,7 @@ // Copyright (c) Jonathan D.A. Jewell = Architecture Decision Record: 0001-adopt-rsr-standard - + # 1. Adopt Rhodium Standard Repository (RSR) Template @@ -53,7 +53,7 @@ The RSR template provides: New repositories are created by cloning the template: ```bash -git clone https://github.com/{{OWNER}}/rsr-template-repo new-repo-name +git clone https://github.com/hyperpolymath/rsr-template-repo new-repo-name cd new-repo-name rm -rf .git && git init ``` diff --git a/docs/developer/ABI-FFI-README.adoc b/docs/developer/ABI-FFI-README.adoc index 7681474..e3a4f93 100644 --- a/docs/developer/ABI-FFI-README.adoc +++ b/docs/developer/ABI-FFI-README.adoc @@ -3,7 +3,7 @@ = ABI/FFI Standards {{~ Aditionally delete this line and fill out the template below ~}} -# {{PROJECT}} ABI/FFI Documentation +# CONTRACTILES ABI/FFI Documentation ## Overview @@ -29,7 +29,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: ▼ ┌─────────────────────────────────────────────┐ │ C Headers (auto-generated) │ -│ generated/abi/{{project}}.h │ +│ generated/abi/contractiles.h │ └─────────────────┬───────────────────────────┘ │ │ imported by @@ -42,7 +42,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ - Memory-safe by default │ └─────────────────┬───────────────────────────┘ │ - │ compiled to lib{{project}}.so/.a + │ compiled to libcontractiles.so/.a ▼ ┌─────────────────────────────────────────────┐ │ Any Language via C ABI │ @@ -53,7 +53,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: ## Directory Structure ``` -{{project}}/ +contractiles/ ├── src/ │ ├── abi/ # ABI definitions (Idris2) │ │ ├── Types.idr # Core type definitions with proofs @@ -70,11 +70,11 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ ├── test/ │ │ └── integration_test.zig │ └── include/ -│ └── {{project}}.h # C header (optional, can be generated) +│ └── contractiles.h # C header (optional, can be generated) │ ├── generated/ # Auto-generated files │ └── abi/ -│ └── {{project}}.h # Generated from Idris2 ABI +│ └── contractiles.h # Generated from Idris2 ABI │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ @@ -202,7 +202,7 @@ zig build test # Run tests ```bash cd src/abi -idris2 --cg c-header Types.idr -o ../../generated/abi/{{project}}.h +idris2 --cg c-header Types.idr -o ../../generated/abi/contractiles.h ``` ### Cross-Compile @@ -225,32 +225,32 @@ zig build -Dtarget=x86_64-windows ### From C ```c -#include "{{project}}.h" +#include "contractiles.h" int main() { - void* handle = {{project}}_init(); + void* handle = contractiles_init(); if (!handle) return 1; - int result = {{project}}_process(handle, 42); + int result = contractiles_process(handle, 42); if (result != 0) { - const char* err = {{project}}_last_error(); + const char* err = contractiles_last_error(); fprintf(stderr, "Error: %s\n", err); } - {{project}}_free(handle); + contractiles_free(handle); return 0; } ``` Compile with: ```bash -gcc -o example example.c -l{{project}} -L./zig-out/lib +gcc -o example example.c -lcontractiles -L./zig-out/lib ``` ### From Idris2 ```idris -import {{PROJECT}}.ABI.Foreign +import CONTRACTILES.ABI.Foreign main : IO () main = do @@ -267,22 +267,22 @@ main = do ### From Rust ```rust -#[link(name = "{{project}}")] +#[link(name = "contractiles")] extern "C" { - fn {{project}}_init() -> *mut std::ffi::c_void; - fn {{project}}_free(handle: *mut std::ffi::c_void); - fn {{project}}_process(handle: *mut std::ffi::c_void, input: u32) -> i32; + fn contractiles_init() -> *mut std::ffi::c_void; + fn contractiles_free(handle: *mut std::ffi::c_void); + fn contractiles_process(handle: *mut std::ffi::c_void, input: u32) -> i32; } fn main() { unsafe { - let handle = {{project}}_init(); + let handle = contractiles_init(); assert!(!handle.is_null()); - let result = {{project}}_process(handle, 42); + let result = contractiles_process(handle, 42); assert_eq!(result, 0); - {{project}}_free(handle); + contractiles_free(handle); } } ``` @@ -290,21 +290,21 @@ fn main() { ### From Julia ```julia -const lib{{project}} = "lib{{project}}" +const libcontractiles = "libcontractiles" function init() - handle = ccall((:{{project}}_init, lib{{project}}), Ptr{Cvoid}, ()) + handle = ccall((:contractiles_init, libcontractiles), Ptr{Cvoid}, ()) handle == C_NULL && error("Failed to initialize") handle end function process(handle, input) - result = ccall((:{{project}}_process, lib{{project}}), Cint, (Ptr{Cvoid}, UInt32), handle, input) + result = ccall((:contractiles_process, libcontractiles), Cint, (Ptr{Cvoid}, UInt32), handle, input) result end function cleanup(handle) - ccall((:{{project}}_free, lib{{project}}), Cvoid, (Ptr{Cvoid},), handle) + ccall((:contractiles_free, libcontractiles), Cvoid, (Ptr{Cvoid},), handle) end # Usage @@ -358,7 +358,7 @@ When modifying the ABI/FFI: 2. **Generate C header** ```bash - idris2 --cg c-header src/abi/Types.idr -o generated/abi/{{project}}.h + idris2 --cg c-header src/abi/Types.idr -o generated/abi/contractiles.h ``` 3. **Update FFI implementation** (`ffi/zig/src/main.zig`) @@ -377,10 +377,10 @@ When modifying the ABI/FFI: ## License -{{LICENSE}} +MPL-2.0 ## See Also - [Idris2 Documentation](https://idris2.readthedocs.io) - [Zig Documentation](https://ziglang.org/documentation/master/) -- [Rhodium Standard Repositories](https://github.com/{{OWNER}}/rhodium-standard-repositories) +- [Rhodium Standard Repositories](https://github.com/hyperpolymath/rhodium-standard-repositories) diff --git a/docs/governance/CRG-AUDIT-TEMPLATE.adoc b/docs/governance/CRG-AUDIT-TEMPLATE.adoc index 4cfcace..e787e4d 100644 --- a/docs/governance/CRG-AUDIT-TEMPLATE.adoc +++ b/docs/governance/CRG-AUDIT-TEMPLATE.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= {{PROJECT_NAME}} — CRG Audit ({{CURRENT_DATE}}) -{{AUTHOR}} -{{CURRENT_DATE}} += Contractiles — CRG Audit (2026-07-27) +Jonathan D.A. Jewell +2026-07-27 :toc: :sectnums: @@ -18,17 +18,17 @@ == Scope and Standard -Evaluates the `{{REPO}}` repository against +Evaluates the `contractiles` repository against *Component Readiness Grades v2.0 (STRICT)*, 2026-03-30 revision. - Standard: `standards/component-readiness-grades/COMPONENT-READINESS-GRADES.md` -- Template (criteria boilerplate): `rsr-template-repo/docs/governance/CRG-CRITERIA.adoc` +- Template (criteria boilerplate): `contractiles/docs/governance/CRG-CRITERIA.adoc` - Self-declared grade (prior art): * `.machine_readable/6a2/STATE.a2ml` → `grade = ""` * `docs/READINESS.md` (if present) → per-component grades * Third-party badges (Glama, OpenSSF, etc.) if any — note date and scope -- Audit date: {{CURRENT_DATE}} -- Auditor: {{AUTHOR}} +- Audit date: 2026-07-27 +- Auditor: Jonathan D.A. Jewell The audit grades the repo *as-is today*, not aspirationally. @@ -49,7 +49,7 @@ The audit grades the repo *as-is today*, not aspirationally. Publication requires B+. Long alpha is discipline, not shame. -== Evidence Inventory (verified {{CURRENT_DATE}}) +== Evidence Inventory (verified 2026-07-27) === Structural compliance (Grade D floor) @@ -101,7 +101,7 @@ Do *not* mark PRESENT without citing the path. | Build-system policy (RSR R-020) | Remote -| `git@{{FORGE}}:{{OWNER}}/{{REPO}}.git` (origin only) / drift +| `git@github.com:hyperpolymath/contractiles.git` (origin only) / drift | `git remote -v` |=== @@ -135,7 +135,7 @@ RSR compliance verdict: *met* / *partial* / *not met* — Grade D floor satisfie | Dangerous-pattern scan (`assert_total`, `Admitted`, `sorry`, `unsafeCoerce`, `Obj.magic`) | N -| Grepped {{CURRENT_DATE}}. +| Grepped 2026-07-27. |=== === Test matrix @@ -281,7 +281,7 @@ them. Examples: - `docs/READINESS.md` — per-component table. Note v1.0-vs-v2.0 schema alignment. - `.machine_readable/6a2/STATE.a2ml` — authoritative self-declared state. -- `docs/governance/CRG-LIFT-PLAN-{{CURRENT_DATE}}.adoc` — companion plan for +- `docs/governance/CRG-LIFT-PLAN-2026-07-27.adoc` — companion plan for D→C (and medium-term C→B) lifts. - `docs/governance/CRG-CRITERIA.adoc` — boilerplate criteria doc. diff --git a/docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc b/docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc index aef1d25..75a20eb 100644 --- a/docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc +++ b/docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc @@ -11,13 +11,13 @@ v1.0, 2026-04-07 Audit scope: -* Repository: `rsr-template-repo` +* Repository: `contractiles` * Focus: root authority docs/manifests, Justfile integration, session bindings * Recursive inventory method: `rg --files -g '!.git' | sort` Inventory snapshot at audit time: -* `rsr-template-repo` total tracked files discovered: `240` +* `contractiles` total tracked files discovered: `240` * Session-local binding files discovered: `4` under `session/` plus `coordination.k9` == Claim Vs Actual @@ -28,7 +28,7 @@ Inventory snapshot at audit time: | Placeholder badge tokens in README | `README.adoc` -| `{{OPENSSF_PROJECT_ID}}`, `{{OWNER}}`, `{{REPO}}` +| `{{OPENSSF_PROJECT_ID}}`, `hyperpolymath`, `contractiles` | placeholder | Template placeholders are intentional pre-bootstrap content. | Keep; document clearly as template tokens. @@ -130,7 +130,7 @@ Inventory snapshot at audit time: * Any future full protocol text drafts should move to `standards/session-management-standards/`. -=== Stay In `rsr-template-repo` +=== Stay In `contractiles` * Local aliases, hooks, coordination wiring, and repo-local checks. @@ -152,7 +152,7 @@ Current status: [source,text] ---- -rsr-template-repo/ +contractiles/ README.adoc AUDIT.adoc 0-AI-MANIFEST.a2ml diff --git a/docs/onboarding/QUICKSTART-DEV.adoc b/docs/onboarding/QUICKSTART-DEV.adoc index 5be2757..8c45e96 100644 --- a/docs/onboarding/QUICKSTART-DEV.adoc +++ b/docs/onboarding/QUICKSTART-DEV.adoc @@ -1,14 +1,14 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell // Template: QUICKSTART-DEV.adoc — clone → build → test → PR -// Replace rsr-template-repo, {{BUILD_CMD}}, {{TEST_CMD}}, {{LANG_STACK}} with actuals -= rsr-template-repo — Quick Start for Developers +// Replace contractiles, just build, just test, Idris2 (typed ABI) + Zig (FFI implementation) with actuals += contractiles — Quick Start for Developers :toc: :toclevels: 2 == Tech Stack -{{LANG_STACK}} +Idris2 (typed ABI) + Zig (FFI implementation) == Set Up Development Environment @@ -30,8 +30,8 @@ nix develop [source,bash] ---- -git clone https://github.com/hyperpolymath/rsr-template-repo.git -cd rsr-template-repo +git clone https://github.com/hyperpolymath/contractiles.git +cd contractiles just setup-dev ---- @@ -39,21 +39,21 @@ just setup-dev [source,bash] ---- -{{BUILD_CMD}} +just build ---- == Test [source,bash] ---- -{{TEST_CMD}} +just test ---- == Project Structure [source] ---- -rsr-template-repo/ +contractiles/ ├── src/ # Source code ├── src/abi/ # Idris2 ABI definitions (if applicable) ├── ffi/zig/ # Zig FFI bridge (if applicable) @@ -92,7 +92,7 @@ just panic-scan # No new security issues Read `.machine_readable/MUST.contractile` before making changes. Key invariants that must never be violated: -{{MUST_INVARIANTS}} +See `.machine_readable/contractiles/Mustfile.a2ml` for the physical-state invariants this repository is expected to hold. == LLM/AI Agent Development @@ -108,5 +108,5 @@ Or read `0-AI-MANIFEST.a2ml` and `.claude/CLAUDE.md` directly. == Get Help * **Architecture**: link:EXPLAINME.adoc[EXPLAINME.adoc] -* **Wiki**: https://github.com/hyperpolymath/rsr-template-repo/wiki +* **Wiki**: https://github.com/hyperpolymath/contractiles/wiki * **Report issue**: `just help-me` diff --git a/docs/onboarding/QUICKSTART-MAINTAINER.adoc b/docs/onboarding/QUICKSTART-MAINTAINER.adoc index 9e6039e..4fd34da 100644 --- a/docs/onboarding/QUICKSTART-MAINTAINER.adoc +++ b/docs/onboarding/QUICKSTART-MAINTAINER.adoc @@ -1,30 +1,30 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell // Template: QUICKSTART-MAINTAINER.adoc — packaging, deploying, and maintaining -// Replace rsr-template-repo, {{PACKAGE_NAME}}, {{DEPS}} with actuals -= rsr-template-repo — Quick Start for Platform Maintainers +// Replace contractiles, contractiles, idris2 (>= 0.7.0), zig (>= 0.14.0) with actuals += contractiles — Quick Start for Platform Maintainers :toc: :toclevels: 2 == Overview -This guide covers packaging, deploying, and maintaining rsr-template-repo for +This guide covers packaging, deploying, and maintaining contractiles for distribution on your platform. == Runtime Dependencies -{{DEPS}} +idris2 (>= 0.7.0), zig (>= 0.14.0) == Build from Source [source,bash] ---- -git clone https://github.com/hyperpolymath/rsr-template-repo.git -cd rsr-template-repo +git clone https://github.com/hyperpolymath/contractiles.git +cd contractiles just build-release ---- -Output: `{{BUILD_OUTPUT_PATH}}` +Output: `src/interface/ffi/zig-out/lib/libcontractiles.a` == Packaging @@ -47,7 +47,7 @@ nix build [source,bash] ---- just stapeln-export # Generates Containerfile -podman build -t rsr-template-repo . +podman build -t contractiles . ---- === Manual Package @@ -66,10 +66,10 @@ Files installed: | `$PREFIX/bin/` | Executables -| `$PREFIX/share/{{PACKAGE_NAME}}/` +| `$PREFIX/share/contractiles/` | Data files, assets -| `$PREFIX/share/doc/{{PACKAGE_NAME}}/` +| `$PREFIX/share/doc/contractiles/` | Documentation | `$PREFIX/share/applications/` @@ -81,9 +81,9 @@ Files installed: == Configuration -Default config location: `$XDG_CONFIG_HOME/{{PACKAGE_NAME}}/config.toml` +Default config location: `$XDG_CONFIG_HOME/contractiles/config.toml` -Fallback: `$HOME/.config/{{PACKAGE_NAME}}/config.toml` +Fallback: `$HOME/.config/contractiles/config.toml` == Health Checks @@ -103,7 +103,7 @@ just build-release just install --prefix=/usr/local ---- -Or via OPSM: `opsm update {{PACKAGE_NAME}}` +Or via OPSM: `opsm update contractiles` == Security Notes @@ -118,13 +118,13 @@ For deploying multiple instances (e.g., different users or tenants): [source,bash] ---- -just install --prefix=/opt/{{PACKAGE_NAME}}-instance1 --config=/etc/{{PACKAGE_NAME}}/instance1.toml -just install --prefix=/opt/{{PACKAGE_NAME}}-instance2 --config=/etc/{{PACKAGE_NAME}}/instance2.toml +just install --prefix=/opt/contractiles-instance1 --config=/etc/contractiles/instance1.toml +just install --prefix=/opt/contractiles-instance2 --config=/etc/contractiles/instance2.toml ---- Each instance has isolated config, data, and logs. == Reporting Issues -* Upstream: https://github.com/hyperpolymath/rsr-template-repo/issues +* Upstream: https://github.com/hyperpolymath/contractiles/issues * With diagnostic: `just help-me` (pre-fills context) diff --git a/docs/onboarding/QUICKSTART-USER.adoc b/docs/onboarding/QUICKSTART-USER.adoc index 0893e63..3fcf191 100644 --- a/docs/onboarding/QUICKSTART-USER.adoc +++ b/docs/onboarding/QUICKSTART-USER.adoc @@ -1,12 +1,12 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell // Template: QUICKSTART-USER.adoc — 5-minute path to working software -// Replace rsr-template-repo, Rsr Template Repo — See README.adoc for details., just run, Rsr Template Repo started successfully. with actuals -= rsr-template-repo — Quick Start for Users +// Replace contractiles, Rsr Template Repo — See README.adoc for details., just run, Rsr Template Repo started successfully. with actuals += contractiles — Quick Start for Users :toc: :toclevels: 2 -== What is rsr-template-repo? +== What is contractiles? Rsr Template Repo — See README.adoc for details. @@ -38,8 +38,8 @@ Before you begin, ensure you have: [source,bash] ---- # Clone and set up -git clone https://github.com/hyperpolymath/rsr-template-repo.git -cd rsr-template-repo +git clone https://github.com/hyperpolymath/contractiles.git +cd contractiles just setup ---- @@ -62,7 +62,7 @@ just stapeln-run [source,bash] ---- -just install --portable --prefix=./rsr-template-repo-portable +just install --portable --prefix=./contractiles-portable ---- == First Run @@ -103,7 +103,7 @@ just heal * **In-app**: `just run --help` * **Guided tour**: `just tour` * **Report a problem**: `just help-me` (pre-fills diagnostic context) -* **Wiki**: https://github.com/hyperpolymath/rsr-template-repo/wiki +* **Wiki**: https://github.com/hyperpolymath/contractiles/wiki == Uninstall diff --git a/docs/onboarding/llm-warmup-dev.adoc b/docs/onboarding/llm-warmup-dev.adoc index f12ada8..a44465a 100644 --- a/docs/onboarding/llm-warmup-dev.adoc +++ b/docs/onboarding/llm-warmup-dev.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= LLM Warmup — rsr-template-repo (Developer) += LLM Warmup — contractiles (Developer) -== What is rsr-template-repo? +== What is contractiles? See `README.adoc` for overview. diff --git a/docs/onboarding/llm-warmup-user.adoc b/docs/onboarding/llm-warmup-user.adoc index 2127530..64a0bd4 100644 --- a/docs/onboarding/llm-warmup-user.adoc +++ b/docs/onboarding/llm-warmup-user.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= LLM Warmup — rsr-template-repo (User) += LLM Warmup — contractiles (User) -== What is rsr-template-repo? +== What is contractiles? See `README.adoc` for overview. diff --git a/docs/practice/AI-CONVENTIONS.adoc b/docs/practice/AI-CONVENTIONS.adoc index 4ecfaa2..275a1a6 100644 --- a/docs/practice/AI-CONVENTIONS.adoc +++ b/docs/practice/AI-CONVENTIONS.adoc @@ -2,7 +2,7 @@ // Copyright (c) Jonathan D.A. Jewell = AI Conventions - + # AI Conventions (Authoritative Source) @@ -29,9 +29,9 @@ Per-tool config files (.cursorrules, .clinerules, etc.) reference this document. ## Author Attribution -- Name: **{{AUTHOR}}** -- Email: **{{AUTHOR_EMAIL}}** -- Copyright: `Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}>` +- Name: **Jonathan D.A. Jewell** +- Email: **j.d.a.jewell@open.ac.uk** +- Copyright: `Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) ` ## State Files diff --git a/docs/practice/STATE-VISUALIZER-GUIDE.adoc b/docs/practice/STATE-VISUALIZER-GUIDE.adoc index 49dfd55..b2b98c1 100644 --- a/docs/practice/STATE-VISUALIZER-GUIDE.adoc +++ b/docs/practice/STATE-VISUALIZER-GUIDE.adoc @@ -1,7 +1,7 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell = TOPOLOGY.md — Generation Guide -{{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Jonathan D.A. Jewell (hyperpolymath) :toc: :sectnums: @@ -62,7 +62,7 @@ The file must contain exactly three sections: Add a header comment with SPDX-License-Identifier and Last updated date. End with an "Update Protocol" section explaining how to maintain the file. -Use the template at TOPOLOGY.md in rsr-template-repo as a structural reference, +Use the template at TOPOLOGY.md in contractiles as a structural reference, but make the content completely specific to THIS project. ---- @@ -70,7 +70,7 @@ but make the content completely specific to THIS project. [source,bash] ---- -cp /path/to/rsr-template-repo/TOPOLOGY.md ./TOPOLOGY.md +cp /path/to/contractiles/TOPOLOGY.md ./TOPOLOGY.md # Then edit: replace placeholders, draw the real architecture, fill the dashboard ---- @@ -153,4 +153,4 @@ _structured data_ for tooling. Both should agree. == Copyright -Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}> +Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) diff --git a/docs/practice/ci-cost-reduction.adoc b/docs/practice/ci-cost-reduction.adoc index 3e7bba8..86b61b0 100644 --- a/docs/practice/ci-cost-reduction.adoc +++ b/docs/practice/ci-cost-reduction.adoc @@ -215,8 +215,8 @@ Recommendations: === 7. Reusable workflow (longer-term) Ship the above patterns in a single reusable workflow under -`rsr-template-repo/.github/workflows/rsr-ci-defaults.yml`, and adopt -it estate-wide via `uses: hyperpolymath/rsr-template-repo/.github/workflows/rsr-ci-defaults.yml@main` +`contractiles/.github/workflows/rsr-ci-defaults.yml`, and adopt +it estate-wide via `uses: hyperpolymath/contractiles/.github/workflows/rsr-ci-defaults.yml@main` in downstream repos. Single PR propagates improvements. === 8. Self-hosted runner for heavy work (long-term) @@ -275,5 +275,5 @@ frequency × job count). incident that motivated this spec. * `007-lang/audits/audit-dependabot-automation-gap-2026-04-17.md` — separate defect stack also addressed in the same session. -* `rsr-template-repo/.github/workflows/dependabot-automerge.yml` — +* `contractiles/.github/workflows/dependabot-automerge.yml` — canonical pattern for auto-merge pattern referenced above. diff --git a/docs/reports/audit/pillar-audit-2026-04-15.adoc b/docs/reports/audit/pillar-audit-2026-04-15.adoc index a99e61f..e39c86b 100644 --- a/docs/reports/audit/pillar-audit-2026-04-15.adoc +++ b/docs/reports/audit/pillar-audit-2026-04-15.adoc @@ -4,7 +4,7 @@ :date: 2026-04-15 Date: 2026-04-15 + -Repository: `/var/mnt/eclipse/repos/rsr-template-repo` +Repository: `/var/mnt/eclipse/repos/contractiles` == Audit Criteria diff --git a/docs/status/PROOF-NEEDS.adoc b/docs/status/PROOF-NEEDS.adoc index 96b529d..2ae3745 100644 --- a/docs/status/PROOF-NEEDS.adoc +++ b/docs/status/PROOF-NEEDS.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// Template: rsr-template-repo/docs/status/PROOF-NEEDS.adoc +// Template: contractiles/docs/status/PROOF-NEEDS.adoc // Authoritative master list: ~/Desktop/PROOF-REQUIREMENTS-MASTER.adoc -= Proof Requirements — {{PROJECT}} += Proof Requirements — CONTRACTILES == Proof Tier @@ -26,7 +26,7 @@ == Mandatory Proofs (All RSR Repos) -These proofs come from the rsr-template-repo and MUST be present in every repo: +These proofs come from the contractiles and MUST be present in every repo: === ABI/FFI Boundary Proofs (Idris2) @@ -119,4 +119,4 @@ verification/proofs/ * Master list: `~/Desktop/PROOF-REQUIREMENTS-MASTER.adoc` * Proof status tracking: `PROOF-STATUS.adoc` (this repo) * Proven library: `proven` repo (Idris2 verified foundations) -* Template: `rsr-template-repo/docs/status/PROOF-NEEDS.adoc` +* Template: `contractiles/docs/status/PROOF-NEEDS.adoc` diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index aca702c..13c9815 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -1,8 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -// Template: rsr-template-repo/docs/status/PROOF-STATUS.adoc +// Template: contractiles/docs/status/PROOF-STATUS.adoc // Tracks proof completion. Requirements defined in PROOF-NEEDS.adoc -= Proof Status — {{PROJECT}} += Proof Status — CONTRACTILES == Summary diff --git a/docs/status/READINESS.adoc b/docs/status/READINESS.adoc index 5a6bd02..fe3c6b1 100644 --- a/docs/status/READINESS.adoc +++ b/docs/status/READINESS.adoc @@ -1,10 +1,10 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= {{PROJECT_NAME}} Component Readiness Assessment += Contractiles Component Readiness Assessment -*Standard:* link:https://{{FORGE}}/{{OWNER}}/standards/tree/main/component-readiness-grades[Component Readiness Grades (CRG) v2.0 STRICT] + -*Assessed:* {{CURRENT_DATE}} + -*Assessor:* {{AUTHOR}} + +*Standard:* link:https://github.com/hyperpolymath/standards/tree/main/component-readiness-grades[Component Readiness Grades (CRG) v2.0 STRICT] + +*Assessed:* 2026-07-27 + +*Assessor:* Jonathan D.A. Jewell + *Previous assessment:* __ *Current Grade:* X @@ -59,7 +59,7 @@ Below B, any publication must be explicitly abstract or provisional. ''' -== 2. Headline Evidence (as of {{CURRENT_DATE}}) +== 2. Headline Evidence (as of 2026-07-27) [cols="2,3,3", options="header"] |=== @@ -67,7 +67,7 @@ Below B, any publication must be explicitly abstract or provisional. | Test count | __ | `.machine_readable/6a2/STATE.a2ml` or CI | Formal-verification posture | __ | grep of proof dirs -| Dangerous patterns (`assert_total`, `unsafeCoerce`, `Obj.magic`) | __ | grep {{CURRENT_DATE}} +| Dangerous patterns (`assert_total`, `unsafeCoerce`, `Obj.magic`) | __ | grep 2026-07-27 | Per-unit README coverage | __ | filesystem scan of unit dirs | CI status | __ | `.github/workflows/` | RSR mandatory workflows | __ | `.github/workflows/` @@ -87,9 +87,9 @@ unless noted. |=== | Component | Grade | Posture | Evidence Summary | Promotion blocker | Last Assessed -| __ | X/F/E/D/C/B/A | __ | __ | __ | {{CURRENT_DATE}} -| __ | … | … | … | … | {{CURRENT_DATE}} -| __ | … | … | … | … | {{CURRENT_DATE}} +| __ | X/F/E/D/C/B/A | __ | __ | __ | 2026-07-27 +| __ | … | … | … | … | 2026-07-27 +| __ | … | … | … | … | 2026-07-27 |=== *Rules of thumb for populating this table:* @@ -164,7 +164,7 @@ Real-world external feedback confirming value. Populate ''' -== 7. Summary ({{CURRENT_DATE}}) +== 7. Summary (2026-07-27) * Project grade: __. Why: _<1-2 line justification>_. * Delta since last assessment: __. @@ -177,7 +177,7 @@ Real-world external feedback confirming value. Populate * `docs/governance/CRG-CRITERIA.adoc` — grade definitions (boilerplate). * `docs/governance/CRG-AUDIT-.adoc` — formal audit (populate from - `rsr-template-repo/docs/governance/CRG-AUDIT-TEMPLATE.adoc`). + `contractiles/docs/governance/CRG-AUDIT-TEMPLATE.adoc`). * `docs/practice/DOGFOOD-LOG.adoc` — dated dogfood evidence (required for C). * `.machine_readable/6a2/STATE.a2ml` — authoritative state (canonical keys `[dogfooding-status]`, `[external-targets]`, `[issues-fed-back]`, diff --git a/docs/status/TEST-NEEDS.adoc b/docs/status/TEST-NEEDS.adoc index 59fbf85..8b876c4 100644 --- a/docs/status/TEST-NEEDS.adoc +++ b/docs/status/TEST-NEEDS.adoc @@ -1,118 +1,35 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= TEST-NEEDS: rsr-template-repo += TEST-NEEDS: contractiles -== CRG Grade: C — ACHIEVED 2026-04-04 +== Current State -== Current State (Updated 2026-04-04) +This repository was scaffolded from the RSR template; this document previously +described the *template's own* dogfooding of its test/validation machinery +(`scripts/validate-template.sh`, `tests/e2e/template_instantiation_test.sh`), +which has since been removed — that machinery instantiates new repos from the +template and has no purpose once a repo (like this one) is instantiated. + +What actually exists and runs today: [cols="2,1,4", options="header"] |=== | Category | Count | Details -| *Source modules* | 6 | 3 Idris2 ABI (Foreign, Layout, Types), 2 Zig FFI (build, main), 1 Zig integration test template -| *Unit tests* | 0 | None in main source (inline tests in main.zig) -| *Integration tests* | 1 | `test/integration_test.zig` (documented template, 1 placeholder test) -| *E2E tests* | 1 | `tests/e2e/template_instantiation_test.sh` (full instantiation + validation) -| *Workflow tests* | 1 | `tests/workflows/validate_workflows_test.sh` (21 workflows validated) -| *Validation tests* | 1 | `scripts/validate-template.sh` (8-phase comprehensive validation) -| *Benchmarks* | 5 | `benches/template_bench.sh` (validation, Zig build, tests, workflows, instantiation) -| *Fuzz tests* | 0 | `README.adoc` scaffold with harness instructions +| *Idris2 ABI* | 3 modules | `Abi.Types`, `Abi.Layout`, `Abi.Foreign` — `idris2 --build abi.ipkg` (verify with `just build` / `just test`) +| *Zig unit tests* | 3 | Inline in `src/interface/ffi/src/main.zig` +| *Zig integration tests* | 8 | `src/interface/ffi/test/integration_test.zig`, exercised via `zig build test` +| *Aspect tests* | 1 script | `tests/aspect_tests.sh` — SPDX headers + dangerous-pattern checks (real grep-based checks, currently reports one false-positive on documentation text matching `Admitted`/`sorry`) +| *E2E tests* | 1 script | `tests/e2e.sh` — builds the Idris2 ABI, then builds+tests the Zig FFI +| *Workflow tests* | 1 script | `tests/workflows/validate_workflows_test.sh` +| *Benchmarks* | 3 suites | `benches/template_bench.sh` — Zig build, Zig tests, workflow validation |=== -== Completed Work (CRG C - Testing & Benchmarking) - -=== Template Validation Script ✅ - -* [x] `scripts/validate-template.sh` — 8-phase validation -** Phase 1: Core repository structure (root files, directories) -** Phase 2: Machine-readable metadata (`.machine_readable/`) -** Phase 3: GitHub Actions workflows (17 required + all present) -** Phase 4: Idris2 ABI and Zig FFI source files -** Phase 5: Placeholder token replacement (skipped in template) -** Phase 6: SPDX license headers (100% coverage, 6/6 files) -** Phase 7: Build system verification (`zig build` + `idris2` syntax check) -** Phase 8: Documentation requirements (TOPOLOGY, ABI-FFI-README, etc) -* Status: *PASSING* (0 errors, 3 warnings about template placeholders) - -=== E2E Template Instantiation Test ✅ - -* [x] `tests/e2e/template_instantiation_test.sh` — full workflow -** Clones template to temp directory -** Replaces all `{{PLACEHOLDER}}` tokens with test values -** Validates resulting structure with `scripts/validate-template.sh` -** Verifies Zig build works after instantiation -** Checks no remaining placeholders -** Cleans up temp directory -* Status: *READY TO TEST* (can be verified by CI) - -=== Workflow Validation Test ✅ - -* [x] `tests/workflows/validate_workflows_test.sh` -** Validates all 21 workflows exist and have proper structure -** Checks SPDX headers, `name` field -** Verifies all 15 required workflows present -* Status: *PASSING* (0 errors, 15/15 required workflows found) - -=== Zig FFI Tests ✅ - -* [x] `src/interface/ffi/test/integration_test.zig` — template with examples -** Converted from `{{project}}` placeholders to "template" namespace -** Added comprehensive comments for how to instantiate -** Tests grouped by category (lifecycle, operations, strings, errors, version, memory safety, threading) -** Compiles and passes placeholder test -* Status: *PASSING* (1 test: `placeholder_test_implementation_required` passes) - -=== Benchmarks ✅ - -* [x] `benches/template_bench.sh` — 5 benchmark suites -** Validation script: ~5.8s average (3 runs) -** Zig build: ~19ms (clean build) -** Zig tests: ~20ms -** Workflow validation: ~117ms -** Template instantiation: ~427ms -* Formats: human, json, csv -* Status: *PASSING* (all benchmarks execute) - -=== Build System ✅ - -* [x] `src/interface/ffi/build.zig` — updated for Zig 0.15.2 -** Simplified to test-only configuration -** Supports both unit tests and integration tests -** Works with `zig build` without errors -* Status: *PASSING* (builds successfully) - -== Test Results Summary - ----- -Validation Script: PASS (0 errors, 3 warnings) -Workflow Validation: PASS (21/21 workflows valid) -Integration Tests: PASS (1/1 placeholder test) -E2E Instantiation: READY (needs CI confirmation) -Benchmarks: PASS (5/5 benchmark suites) -Build System: PASS (zig build succeeds) ----- - -== CRG C Compliance - -* *Coverage*: 6/6 test categories (unit, integration, E2E, workflow, validation, benchmarks) -* *Documentation*: All test files have SPDX headers + inline documentation -* *Author Attribution*: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> -* *License*: MPL-2.0 on all new files -* *Automation*: All scripts executable + working - -== FLAGGED ISSUES - ALL RESOLVED - -* [.line-through]#*Template repo used by ALL new repos has 0 validation tests*# → FIXED: 4 test suites + validation script -* [.line-through]#*fuzz/placeholder.txt*# → FIXED: replaced with `README.adoc` containing real harness instructions -* [.line-through]#*No E2E tests for template instantiation*# → FIXED: full E2E test suite -* [.line-through]#*Zig FFI integration tests are placeholders*# → FIXED: converted to documented template format - -== Next Steps (Future Sessions) - -* [ ] Integrate test scripts into CI/CD workflows -* [ ] Generate test coverage reports -* [ ] Add more specialized benchmarks (memory, threading stress) -* [ ] Document test instantiation patterns for new repos +== Known gaps -== Priority: P0 (COMPLETE) ✅ +* The aspect-test "dangerous patterns" check is a substring grep and currently + flags prose in `verification/proofs/README.adoc` and a comment in + `verification/proofs/coq/TypeSafety.v` that merely *mention* `Admitted`/`sorry` + rather than using them. The check itself has not been made context-aware. +* There is no dedicated unit-test suite beyond the inline Zig tests; the ABI + side relies on Idris2's own typechecker rather than a separate test file. diff --git a/docs/tech-debt-2026-05-26.md b/docs/tech-debt-2026-05-26.md index 27b8c59..eb8709f 100644 --- a/docs/tech-debt-2026-05-26.md +++ b/docs/tech-debt-2026-05-26.md @@ -2,7 +2,7 @@ SPDX-License-Identifier: CC-BY-SA-4.0 Copyright (c) Jonathan D.A. Jewell --> -# Tech-Debt Audit — rsr-template-repo — 2026-05-26 +# Tech-Debt Audit — contractiles — 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). diff --git a/examples/web-project-deno.json b/examples/web-project-deno.json index 028e4f1..5ddd3bd 100644 --- a/examples/web-project-deno.json +++ b/examples/web-project-deno.json @@ -10,7 +10,7 @@ "imports": { "rescript": "^12.0.0", "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/{{OWNER}}/rescript-dom-mounter/main/src/", + "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/", "proven/": "../proven/bindings/rescript/src/" }, "compilerOptions": { diff --git a/machine-readable-design/canonical-directory-structure/Intentfile.a2ml b/machine-readable-design/canonical-directory-structure/Intentfile.a2ml index 11509ca..2d2162c 100644 --- a/machine-readable-design/canonical-directory-structure/Intentfile.a2ml +++ b/machine-readable-design/canonical-directory-structure/Intentfile.a2ml @@ -29,7 +29,7 @@ committed next-actions and aspirational wishes. [REPLACE WITH PROJECT-SPECIFIC PURPOSE] -Example: The {{PROJECT_NAME}} provides {{MAIN_FUNCTION}} for {{TARGET_AUDIENCE}}. +Example: The Contractiles provides {{MAIN_FUNCTION}} for {{TARGET_AUDIENCE}}. ## Anti-Purpose diff --git a/machine-readable-design/canonical-directory-structure/README.adoc b/machine-readable-design/canonical-directory-structure/README.adoc index 8ced07d..4440f25 100644 --- a/machine-readable-design/canonical-directory-structure/README.adoc +++ b/machine-readable-design/canonical-directory-structure/README.adoc @@ -99,7 +99,7 @@ To initialize a new repository with contractiles: . Create `.machine_readable/contractiles/` directory . Copy all files from this `canonical-directory-structure/` directory . Customize each file with your project-specific content -. Remove all template markers (e.g., `{{PROJECT_NAME}}`) +. Remove all template markers (e.g., `Contractiles`) . Ensure all checks pass: `must check`, `adjust check`, etc. == See Also diff --git a/machine-readable-design/canonical-directory-structure/Trustfile.a2ml b/machine-readable-design/canonical-directory-structure/Trustfile.a2ml index c1db710..0d2077b 100644 --- a/machine-readable-design/canonical-directory-structure/Trustfile.a2ml +++ b/machine-readable-design/canonical-directory-structure/Trustfile.a2ml @@ -13,7 +13,7 @@ plus checks that verify repository integrity. ## Trust Levels -The {{PROJECT_NAME}} operates at trust level: [maximal | standard | restricted | minimal] +The Contractiles operates at trust level: [maximal | standard | restricted | minimal] Trust levels: - maximal: Agent may read, build, test, lint, format, heal freely. diff --git a/machine-readable-design/canonical-directory-structure/bust/Bustfile.a2ml b/machine-readable-design/canonical-directory-structure/bust/Bustfile.a2ml index 992851f..19a18c6 100644 --- a/machine-readable-design/canonical-directory-structure/bust/Bustfile.a2ml +++ b/machine-readable-design/canonical-directory-structure/bust/Bustfile.a2ml @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MPL-2.0 Bust { - name: "{{PROJECT_NAME}}" + name: "Contractiles" version: "1.0.0" description: "Rollback procedures when something breaks in this repository" diff --git a/src/interface/ffi/build.zig b/src/interface/ffi/build.zig index 2607c11..58543a6 100644 --- a/src/interface/ffi/build.zig +++ b/src/interface/ffi/build.zig @@ -1,19 +1,53 @@ // SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell // -// Template FFI Build Configuration (Zig 0.15.2+) -// Note: This is a minimal build file that demonstrates Zig integration +// Contractiles FFI build configuration. +// +// Builds the FFI implementation as a static library (linked against libc, +// since main.zig uses std.heap.c_allocator to match the C-facing allocation +// contract), and wires `zig build test` to run both the in-module unit +// tests (src/main.zig) and the separate integration tests (test/integration_test.zig). const std = @import("std"); pub fn build(b: *std.Build) void { - _ = b.standardTargetOptions(.{}); - _ = b.standardOptimizeOption(.{}); + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{}); + + const main_mod = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + .link_libc = true, + }); + + const lib = b.addLibrary(.{ + .name = "contractiles", + .linkage = .static, + .root_module = main_mod, + }); + b.installArtifact(lib); + + const main_tests = b.addTest(.{ + .root_module = main_mod, + }); + const run_main_tests = b.addRunArtifact(main_tests); + + const integration_mod = b.createModule(.{ + .root_source_file = b.path("test/integration_test.zig"), + .target = target, + .optimize = optimize, + .link_libc = true, + .imports = &.{ + .{ .name = "contractiles", .module = main_mod }, + }, + }); + const integration_tests = b.addTest(.{ + .root_module = integration_mod, + }); + const run_integration_tests = b.addRunArtifact(integration_tests); - // In Zig 0.15+, tests are run directly with: - // zig build-exe -ftest-runner src/main.zig - // zig build-exe -ftest-runner test/integration_test.zig - // - // This minimal build file provides scaffolding for future expansion. - // Tests can be invoked via command line without explicit build.zig configuration. + const test_step = b.step("test", "Run unit and integration tests"); + test_step.dependOn(&run_main_tests.step); + test_step.dependOn(&run_integration_tests.step); } diff --git a/src/interface/ffi/src/main.zig b/src/interface/ffi/src/main.zig index f1b2633..72f0bed 100644 --- a/src/interface/ffi/src/main.zig +++ b/src/interface/ffi/src/main.zig @@ -1,6 +1,6 @@ // SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell -// {{PROJECT}} FFI Implementation +// CONTRACTILES FFI Implementation // // This module implements the C-compatible FFI declared in src/abi/Foreign.idr // All types and layouts must match the Idris2 ABI definitions. @@ -10,7 +10,7 @@ const std = @import("std"); // Version information (keep in sync with project) const VERSION = "0.1.0"; -const BUILD_INFO = "{{PROJECT}} built with Zig " ++ @import("builtin").zig_version_string; +const BUILD_INFO = "CONTRACTILES built with Zig " ++ @import("builtin").zig_version_string; /// Thread-local error storage threadlocal var last_error: ?[]const u8 = null; @@ -38,12 +38,13 @@ pub const Result = enum(c_int) { null_pointer = 4, }; -/// Library handle (opaque to prevent direct access) -pub const Handle = opaque { - // Internal state hidden from C +/// Library handle. Exposed to C only as a pointer, so its layout is opaque +/// to callers even though Zig itself needs a concrete (non-`opaque`) type to +/// store the allocator and lifecycle state — `opaque {}` types cannot carry +/// fields. +pub const Handle = struct { allocator: std.mem.Allocator, initialized: bool, - // Add your fields here }; //============================================================================== @@ -52,7 +53,7 @@ pub const Handle = opaque { /// Initialize the library /// Returns a handle, or null on failure -export fn {{project}}_init() ?*Handle { +pub export fn contractiles_init() ?*Handle { const allocator = std.heap.c_allocator; const handle = allocator.create(Handle) catch { @@ -71,7 +72,7 @@ export fn {{project}}_init() ?*Handle { } /// Free the library handle -export fn {{project}}_free(handle: ?*Handle) void { +pub export fn contractiles_free(handle: ?*Handle) void { const h = handle orelse return; const allocator = h.allocator; @@ -87,7 +88,7 @@ export fn {{project}}_free(handle: ?*Handle) void { //============================================================================== /// Process data (example operation) -export fn {{project}}_process(handle: ?*Handle, input: u32) Result { +pub export fn contractiles_process(handle: ?*Handle, input: u32) Result { const h = handle orelse { setError("Null handle"); return .null_pointer; @@ -111,7 +112,7 @@ export fn {{project}}_process(handle: ?*Handle, input: u32) Result { /// Get a string result (example) /// Caller must free the returned string -export fn {{project}}_get_string(handle: ?*Handle) ?[*:0]const u8 { +pub export fn contractiles_get_string(handle: ?*Handle) ?[*:0]const u8 { const h = handle orelse { setError("Null handle"); return null; @@ -133,7 +134,7 @@ export fn {{project}}_get_string(handle: ?*Handle) ?[*:0]const u8 { } /// Free a string allocated by the library -export fn {{project}}_free_string(str: ?[*:0]const u8) void { +pub export fn contractiles_free_string(str: ?[*:0]const u8) void { const s = str orelse return; const allocator = std.heap.c_allocator; @@ -146,7 +147,7 @@ export fn {{project}}_free_string(str: ?[*:0]const u8) void { //============================================================================== /// Process an array of data -export fn {{project}}_process_array( +pub export fn contractiles_process_array( handle: ?*Handle, buffer: ?[*]const u8, len: u32, @@ -182,7 +183,7 @@ export fn {{project}}_process_array( /// Get the last error message /// Returns null if no error -export fn {{project}}_last_error() ?[*:0]const u8 { +pub export fn contractiles_last_error() ?[*:0]const u8 { const err = last_error orelse return null; // Return C string (static storage, no need to free) @@ -196,12 +197,12 @@ export fn {{project}}_last_error() ?[*:0]const u8 { //============================================================================== /// Get the library version -export fn {{project}}_version() [*:0]const u8 { +pub export fn contractiles_version() [*:0]const u8 { return VERSION.ptr; } /// Get build information -export fn {{project}}_build_info() [*:0]const u8 { +pub export fn contractiles_build_info() [*:0]const u8 { return BUILD_INFO.ptr; } @@ -210,10 +211,10 @@ export fn {{project}}_build_info() [*:0]const u8 { //============================================================================== /// Callback function type (C ABI) -pub const Callback = *const fn (u64, u32) callconv(.C) u32; +pub const Callback = *const fn (u64, u32) callconv(.c) u32; /// Register a callback -export fn {{project}}_register_callback( +pub export fn contractiles_register_callback( handle: ?*Handle, callback: ?Callback, ) Result { @@ -244,7 +245,7 @@ export fn {{project}}_register_callback( //============================================================================== /// Check if handle is initialized -export fn {{project}}_is_initialized(handle: ?*Handle) u32 { +pub export fn contractiles_is_initialized(handle: ?*Handle) u32 { const h = handle orelse return 0; return if (h.initialized) 1 else 0; } @@ -254,22 +255,22 @@ export fn {{project}}_is_initialized(handle: ?*Handle) u32 { //============================================================================== test "lifecycle" { - const handle = {{project}}_init() orelse return error.InitFailed; - defer {{project}}_free(handle); + const handle = contractiles_init() orelse return error.InitFailed; + defer contractiles_free(handle); - try std.testing.expect({{project}}_is_initialized(handle) == 1); + try std.testing.expect(contractiles_is_initialized(handle) == 1); } test "error handling" { - const result = {{project}}_process(null, 0); + const result = contractiles_process(null, 0); try std.testing.expectEqual(Result.null_pointer, result); - const err = {{project}}_last_error(); + const err = contractiles_last_error(); try std.testing.expect(err != null); } test "version" { - const ver = {{project}}_version(); + const ver = contractiles_version(); const ver_str = std.mem.span(ver); try std.testing.expectEqualStrings(VERSION, ver_str); } diff --git a/src/interface/ffi/test/integration_test.zig b/src/interface/ffi/test/integration_test.zig index 484e156..9bf6297 100644 --- a/src/interface/ffi/test/integration_test.zig +++ b/src/interface/ffi/test/integration_test.zig @@ -1,66 +1,72 @@ // SPDX-License-Identifier: MPL-2.0 // Copyright (c) Jonathan D.A. Jewell -// RSR Template FFI Integration Tests +// Contractiles FFI integration tests. // -// These tests verify that the Zig FFI correctly implements the Idris2 ABI. -// This is a TEMPLATE FILE — when instantiating a new project: -// 1. Replace "template" with your project name in lowercase -// 2. Link against your actual FFI implementation library -// 3. Uncomment the test functions below -// -// For now, this file contains documentation of what tests should exist. +// These exercise the FFI surface declared in src/main.zig (which mirrors the +// Idris2 ABI in src/interface/Abi/Foreign.idr) end-to-end, as a separate +// compilation unit from the module's own inline unit tests. const std = @import("std"); +const contractiles = @import("contractiles"); + +test "lifecycle: create and destroy handle" { + const handle = contractiles.contractiles_init() orelse return error.InitFailed; + defer contractiles.contractiles_free(handle); -// NOTE: When instantiated, declare the actual FFI functions here: -// extern fn mylib_init() ?*Handle; -// extern fn mylib_free(?*Handle) void; -// ... etc + try std.testing.expect(contractiles.contractiles_is_initialized(handle) == 1); +} -// And define Handle appropriately: -// const Handle = opaque {}; +test "operations: process with valid handle" { + const handle = contractiles.contractiles_init() orelse return error.InitFailed; + defer contractiles.contractiles_free(handle); -test "placeholder test - implementation required" { - // This test ensures the file compiles - // Actual tests depend on FFI implementation - try std.testing.expect(true); + const result = contractiles.contractiles_process(handle, 42); + try std.testing.expectEqual(contractiles.Result.ok, result); } -// ============================================================================== -// Example tests (uncomment when instantiated with real FFI): -// ============================================================================== -// -// test "lifecycle: create and destroy handle" { -// const handle = mylib_init() orelse return error.InitFailed; -// defer mylib_free(handle); -// } -// -// test "operations: process with valid handle" { -// const handle = mylib_init() orelse return error.InitFailed; -// defer mylib_free(handle); -// -// const result = mylib_process(handle, 42); -// try std.testing.expectEqual(@as(c_int, 0), result); -// } -// -// test "memory safety: double free is safe" { -// const handle = mylib_init() orelse return error.InitFailed; -// mylib_free(handle); -// mylib_free(handle); // Should not crash -// } -// -// test "strings: get string result from handle" { -// const handle = mylib_init() orelse return error.InitFailed; -// defer mylib_free(handle); -// -// const str = mylib_get_string(handle); -// defer if (str) |s| mylib_free_string(s); -// -// try std.testing.expect(str != null); -// } -// -// test "version: returns non-empty version string" { -// const ver = mylib_version(); -// const ver_str = std.mem.span(ver); -// try std.testing.expect(ver_str.len > 0); -// } +test "operations: process_array with valid handle" { + const handle = contractiles.contractiles_init() orelse return error.InitFailed; + defer contractiles.contractiles_free(handle); + + const buf = [_]u8{ 1, 2, 3, 4 }; + const result = contractiles.contractiles_process_array(handle, &buf, buf.len); + try std.testing.expectEqual(contractiles.Result.ok, result); +} + +test "operations: process_array rejects a null buffer" { + const handle = contractiles.contractiles_init() orelse return error.InitFailed; + defer contractiles.contractiles_free(handle); + + const result = contractiles.contractiles_process_array(handle, null, 0); + try std.testing.expectEqual(contractiles.Result.null_pointer, result); +} + +test "strings: get_string result from handle" { + const handle = contractiles.contractiles_init() orelse return error.InitFailed; + defer contractiles.contractiles_free(handle); + + const str = contractiles.contractiles_get_string(handle); + defer if (str) |s| contractiles.contractiles_free_string(s); + + try std.testing.expect(str != null); +} + +test "version: returns non-empty version string" { + const ver = contractiles.contractiles_version(); + const ver_str = std.mem.span(ver); + try std.testing.expect(ver_str.len > 0); +} + +test "build_info: reports the Zig version used to build" { + const info = contractiles.contractiles_build_info(); + const info_str = std.mem.span(info); + try std.testing.expect(info_str.len > 0); +} + +test "error handling: operating on a null handle sets last_error" { + const result = contractiles.contractiles_process(null, 0); + try std.testing.expectEqual(contractiles.Result.null_pointer, result); + + const err = contractiles.contractiles_last_error(); + try std.testing.expect(err != null); +} diff --git a/tests/aspect_tests.sh b/tests/aspect_tests.sh index 028b2c0..7e6b4e6 100755 --- a/tests/aspect_tests.sh +++ b/tests/aspect_tests.sh @@ -39,7 +39,7 @@ fail() { red " FAIL: $1"; FAIL=$((FAIL + 1)); } warn() { yellow " WARN: $1"; WARN=$((WARN + 1)); } echo "═══════════════════════════════════════════════════════════════" -echo " {{PROJECT}} — Aspect Tests (Cross-Cutting Concerns)" +echo " CONTRACTILES — Aspect Tests (Cross-Cutting Concerns)" echo "═══════════════════════════════════════════════════════════════" echo "" diff --git a/tests/e2e.sh b/tests/e2e.sh index 11143fc..0b28135 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -2,10 +2,11 @@ # SPDX-License-Identifier: MPL-2.0 # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # -# RSR Standard E2E Test Template +# Contractiles End-to-End Tests # # End-to-end tests validate the full pipeline: build → run → verify output. -# Customise this file for your project. Delete the examples that don't apply. +# For this repository that pipeline is: the Idris2 ABI package typechecks, +# and the Zig FFI that implements it builds and passes its own tests. # # Usage: # bash tests/e2e.sh @@ -62,69 +63,51 @@ skip_test() { } echo "═══════════════════════════════════════════════════════════════" -echo " {{PROJECT}} — End-to-End Tests" +echo " CONTRACTILES — End-to-End Tests" echo "═══════════════════════════════════════════════════════════════" echo "" # ─── Preflight ─────────────────────────────────────────────────────── bold "Preflight checks" -# TODO: Check that your binary/server is built -# Example: -# BINARY="$PROJECT_DIR/target/release/my-tool" -# if [ ! -f "$BINARY" ]; then -# red "Binary not found at $BINARY — run 'just build' first" -# exit 1 -# fi -# green " Binary found: $BINARY" - -# TODO: Check dependencies -# command -v curl >/dev/null 2>&1 || { red "curl not found"; exit 1; } -# command -v jq >/dev/null 2>&1 || { red "jq not found"; exit 1; } +HAVE_IDRIS2=1 +HAVE_ZIG=1 +command -v idris2 >/dev/null 2>&1 || HAVE_IDRIS2=0 +command -v zig >/dev/null 2>&1 || HAVE_ZIG=0 echo "" -# ═══════════════════════════════════════════════════════════════════════ -# TODO: Add your E2E test sections below. Examples: -# ═══════════════════════════════════════════════════════════════════════ - -# ─── Example: CLI tool E2E ─────────────────────────────────────────── -# bold "Section 1: CLI happy path" -# OUTPUT=$($BINARY --help 2>&1) -# check "help flag works" "Usage:" "$OUTPUT" -# -# OUTPUT=$($BINARY process input.txt --output /tmp/e2e-output.json 2>&1) -# check "process command succeeds" "complete" "$OUTPUT" -# -# OUTPUT=$(cat /tmp/e2e-output.json) -# check "output is valid JSON" '"status"' "$OUTPUT" - -# ─── Example: Server E2E ──────────────────────────────────────────── -# bold "Section 2: Server lifecycle" -# $BINARY serve --port 9999 & -# SERVER_PID=$! -# trap "kill $SERVER_PID 2>/dev/null" EXIT -# sleep 2 -# -# STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:9999/health) -# check_status "health endpoint" "200" "$STATUS" -# -# BODY=$(curl -s http://localhost:9999/health) -# check "health response" '"status":"ok"' "$BODY" -# -# kill $SERVER_PID 2>/dev/null - -# ─── Example: VeriSimDB integration ───────────────────────────────── -# bold "Section 3: VeriSimDB persistence" -# VERISIM_URL="${VERISIM_API_URL:-http://localhost:9090}" -# if ! curl -sf "$VERISIM_URL/health" >/dev/null 2>&1; then -# skip_test "VeriSimDB integration" "gateway not available" -# else -# STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$VERISIM_URL/api/v1/hexads" \ -# -H "Content-Type: application/json" \ -# -d '{"tool":"{{PROJECT}}","modality":"document","content":"e2e test"}') -# check_status "hexad POST" "201" "$STATUS" -# fi +# ─── Section 1: Idris2 ABI typechecks ──────────────────────────────── +bold "Section 1: Idris2 ABI (abi.ipkg)" +if [ "$HAVE_IDRIS2" -eq 1 ]; then + OUTPUT=$(cd "$PROJECT_DIR" && idris2 --build abi.ipkg 2>&1) && ABI_OK=1 || ABI_OK=0 + if [ "$ABI_OK" -eq 1 ]; then + green " PASS: idris2 --build abi.ipkg" + PASS=$((PASS + 1)) + else + red " FAIL: idris2 --build abi.ipkg" + echo "$OUTPUT" | sed 's/^/ /' + FAIL=$((FAIL + 1)) + fi +else + skip_test "Idris2 ABI build" "idris2 not on PATH" +fi + +# ─── Section 2: Zig FFI builds and passes its tests ────────────────── +bold "Section 2: Zig FFI (src/interface/ffi)" +if [ "$HAVE_ZIG" -eq 1 ]; then + if (cd "$PROJECT_DIR/src/interface/ffi" && zig build test --summary none) >/tmp/contractiles-e2e-zig.log 2>&1; then + green " PASS: zig build test" + PASS=$((PASS + 1)) + else + red " FAIL: zig build test" + sed 's/^/ /' /tmp/contractiles-e2e-zig.log + FAIL=$((FAIL + 1)) + fi + rm -f /tmp/contractiles-e2e-zig.log +else + skip_test "Zig FFI build+test" "zig not on PATH" +fi # ═══════════════════════════════════════════════════════════════════════ # Summary diff --git a/tests/e2e/template_instantiation_test.sh b/tests/e2e/template_instantiation_test.sh deleted file mode 100755 index f991d5d..0000000 --- a/tests/e2e/template_instantiation_test.sh +++ /dev/null @@ -1,268 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: MPL-2.0 -# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) -# -# E2E Test: Template Instantiation -# Verifies that the template can be cloned and instantiated into a working project -# -# This test: -# 1. Clones the template to a temp directory -# 2. Replaces all placeholder tokens with test values -# 3. Validates the resulting repository structure -# 4. Verifies builds work after instantiation -# 5. Cleans up - -set -euo pipefail - -# Test configuration -TEMPLATE_ROOT="${1:-.}" -TEST_DIR="${TMPDIR:-/tmp}/rsr-template-test-$$" -TEST_REPO_NAME="test-instantiated-repo" -TEST_OWNER="test-owner" -TEST_FORGE="github" -TEST_AUTHOR="Test Author" -TEST_AUTHOR_EMAIL="test@example.com" -TEST_PROJECT_NAME="Test Project" -TEST_DESCRIPTION="A test project instantiated from the RSR template" -TEST_PRIMARY_LANGUAGE="Rust" - -# ANSI colors -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -# Helper functions -log_step() { - echo "" - echo -e "${BLUE}→${NC} $*" -} - -log_pass() { - echo -e "${GREEN}✓${NC} $*" -} - -log_error() { - echo -e "${RED}✗${NC} $*" >&2 -} - -cleanup() { - if [ -d "$TEST_DIR" ]; then - log_step "Cleaning up test directory: $TEST_DIR" - rm -rf "$TEST_DIR" - log_pass "Cleanup complete" - fi -} - -trap cleanup EXIT - -#============================================================================== -# PHASE 1: SETUP -#============================================================================== - -echo "" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "E2E TEST: Template Instantiation" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "" - -log_step "Creating test directory: $TEST_DIR" -mkdir -p "$TEST_DIR" -log_pass "Test directory created" - -#============================================================================== -# PHASE 2: CLONE TEMPLATE -#============================================================================== - -log_step "Cloning template from $TEMPLATE_ROOT" - -# Copy template to test location (simulating git clone) -TEST_REPO_PATH="$TEST_DIR/$TEST_REPO_NAME" -cp -r "$TEMPLATE_ROOT" "$TEST_REPO_PATH" -log_pass "Template cloned to $TEST_REPO_PATH" - -# Remove .git directory for clean state -if [ -d "$TEST_REPO_PATH/.git" ]; then - rm -rf "$TEST_REPO_PATH/.git" - log_pass ".git directory removed (fresh clone)" -fi - -#============================================================================== -# PHASE 3: PLACEHOLDER REPLACEMENT -#============================================================================== - -log_step "Replacing placeholder tokens" - -# Function to replace all occurrences of a placeholder in a file -replace_placeholder() { - local file="$1" - local placeholder="$2" - local value="$3" - - if [ ! -f "$file" ]; then - return 0 - fi - - # Use sed to replace (platform-portable) - if grep -q "$placeholder" "$file" 2>/dev/null; then - sed -i "s|$placeholder|$value|g" "$file" - echo " Replaced $placeholder in $(basename "$file")" - fi -} - -# Replace in all text files -find "$TEST_REPO_PATH" -type f \ - \( -name "*.md" -o -name "*.adoc" -o -name "*.a2ml" -o -name "*.zig" -o -name "*.idr" \ - -o -name "Justfile" -o -name "Containerfile" -o -name "*.yml" -o -name "*.yaml" \ - -o -name "*.json" -o -name "*.scm" -o -name "contractile" \) \ - -exec bash -c ' - file="$1" - placeholder_pairs=( - "{{REPO}}|$TEST_REPO_NAME" - "{{OWNER}}|$TEST_OWNER" - "{{FORGE}}|$TEST_FORGE" - "{{PROJECT}}|$TEST_PROJECT_NAME" - "{{project}}|'"${TEST_REPO_NAME//-/_}"'" - "{{REPO_DESCRIPTION}}|$TEST_DESCRIPTION" - "{{PRIMARY_LANGUAGE}}|$TEST_PRIMARY_LANGUAGE" - "{{AUTHOR}}|$TEST_AUTHOR" - "{{AUTHOR_EMAIL}}|$TEST_AUTHOR_EMAIL" - "{{CURRENT_DATE}}|2026-04-04" - ) - - for pair in "${placeholder_pairs[@]}"; do - IFS="|" read -r placeholder value <<< "$pair" - if grep -q "$placeholder" "$file" 2>/dev/null; then - sed -i "s|$placeholder|$value|g" "$file" - fi - done - ' _ "$file" - -log_pass "All placeholder tokens replaced" - -#============================================================================== -# PHASE 4: VALIDATE STRUCTURE -#============================================================================== - -log_step "Validating instantiated repository structure" - -# Run validation script on the instantiated repo -if [ -f "$TEMPLATE_ROOT/scripts/validate-template.sh" ]; then - bash "$TEMPLATE_ROOT/scripts/validate-template.sh" "$TEST_REPO_PATH" 0 - log_pass "Repository structure validation passed" -else - log_error "Validation script not found" - exit 1 -fi - -#============================================================================== -# PHASE 5: VERIFY BUILD -#============================================================================== - -log_step "Verifying build system works after instantiation" - -if [ -f "$TEST_REPO_PATH/src/interface/ffi/build.zig" ]; then - if command -v zig &> /dev/null; then - cd "$TEST_REPO_PATH/src/interface/ffi" - if zig build 2>&1; then - log_pass "Zig build successful" - else - log_error "Zig build failed" - exit 1 - fi - cd - > /dev/null - else - log_error "Zig compiler not found - cannot verify build" - exit 1 - fi -fi - -#============================================================================== -# PHASE 6: VERIFY NO REMAINING PLACEHOLDERS -#============================================================================== - -log_step "Checking for remaining placeholders" - -REMAINING_PLACEHOLDERS=$( - find "$TEST_REPO_PATH" -type f \ - \( -name "*.md" -o -name "*.adoc" -o -name "*.a2ml" -o -name "*.zig" -o -name "*.idr" \ - -o -name "Justfile" -o -name "*.yml" \) \ - -exec grep -l "{{[A-Z_]*}}" {} \; 2>/dev/null || true -) - -if [ -z "$REMAINING_PLACEHOLDERS" ]; then - log_pass "No remaining placeholders found" -else - log_error "Found remaining placeholders in:" - echo "$REMAINING_PLACEHOLDERS" | sed 's/^/ /' - exit 1 -fi - -#============================================================================== -# PHASE 7: VERIFY CRITICAL FILES ARE NOT TEMPLATES -#============================================================================== - -log_step "Verifying critical files have been instantiated" - -CRITICAL_FILES=( - "README.adoc" - "EXPLAINME.adoc" - "Justfile" -) - -for file in "${CRITICAL_FILES[@]}"; do - if [ -f "$TEST_REPO_PATH/$file" ]; then - # Check that it's not just a template (contains some actual content) - if grep -q "$TEST_PROJECT_NAME\|$TEST_AUTHOR\|$TEST_REPO_NAME" "$TEST_REPO_PATH/$file" 2>/dev/null || \ - [ $(wc -l < "$TEST_REPO_PATH/$file") -gt 10 ]; then - log_pass "File instantiated: $file" - else - log_error "File appears to be a template: $file" - exit 1 - fi - else - log_error "Critical file missing: $file" - exit 1 - fi -done - -#============================================================================== -# PHASE 8: VERIFY METADATA -#============================================================================== - -log_step "Verifying machine-readable metadata" - -METADATA_FILES=( - ".machine_readable/6a2/STATE.a2ml" - ".machine_readable/6a2/META.a2ml" -) - -for file in "${METADATA_FILES[@]}"; do - if [ -f "$TEST_REPO_PATH/$file" ]; then - log_pass "Metadata file exists: $file" - else - log_error "Metadata file missing: $file" - exit 1 - fi -done - -#============================================================================== -# SUMMARY -#============================================================================== - -echo "" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo -e "${GREEN}✓ E2E TEMPLATE INSTANTIATION TEST PASSED${NC}" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "" -echo "Summary:" -echo " - Template cloned successfully" -echo " - All placeholders replaced" -echo " - Repository structure valid" -echo " - Build system works" -echo " - No remaining placeholders" -echo " - Metadata intact" -echo "" -echo "Test repository: $TEST_REPO_PATH (will be cleaned up)" -echo ""