From 0d82701ae2ddb2652e378e7f9d6d32f73e8ac804 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 27 Jul 2026 19:17:32 +0100 Subject: [PATCH] fix: instantiate recon-silly-ation from the RSR template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The repo was scaffolded from rsr-template-repo but never instantiated: literal {{PLACEHOLDER}} tokens survived throughout, including in the .zig FFI sources, so the Zig genuinely did not parse. This substitutes real identity (recon-silly-ation, hyperpolymath, MPL-2.0/CC-BY-SA-4.0, WASM document reconciliation via the ReconForth VM per reposystem's tool registry) across ~85 files, and fixes real bugs the disease was masking: - .github/settings.yml had name: "{{REPO}}" — an unsubstituted probot self-rename landmine — now a safe no-op self-affirmation. - src/interface/ffi/src/main.zig had {{project}}_init() etc: invalid Zig. Fixed identifiers, plus two real bugs the placeholders were hiding: an opaque type declared with fields (illegal in Zig) and std.heap.c_allocator used without linking libc. Both fixed for real. - src/interface/ffi/build.zig defined no build/test steps at all (`zig build test` failed with "no step named 'test'"). Added a real library + test step wiring up both main.zig's unit tests and test/integration_test.zig. - Justfile/build/just/*.just: replaced `echo "TODO"`/fake-success stubs with real commands this repo can back (zig build, zig fmt, zig build test, idris2 --typecheck), and deleted recipes with nothing to back them (run, run-verbose, bench, readiness, test-smoke — this is an FFI/WASM library, not a standalone executable, and no bench/readiness suites exist). - .machine_readable/contractiles/Justfile was a stale, diverged copy of the root Justfile even though the repo's own Dustfile hygiene check requires it be a hardlink ("Only one Justfile"); re-linked for real. - Several .machine_readable/contractiles/*.a2ml files (Bustfile, Intentfile, Mustfile, Trustfile) still described themselves as *being* rsr-template-repo, "the canonical template" — fixed self-identity and dropped template-only failure modes/checks that don't apply to an instantiated consumer repo (including one permanently-broken check that grepped for a marker string that was never present). - CLADE.a2ml carried the template's own UUID verbatim, which would have collided with it in the gv-clade-index registry; regenerated. Verified with the real toolchain (zig 0.16.0): zig fmt --check src/interface/ffi -> exit 0 zig build -> exit 0 zig build test -> exit 0 (4/4 tests pass) Removed template-only machinery that no longer applies now the repo is instantiated: scripts/validate-template.sh, tests/e2e/template_instantiation_test.sh, benches/template_bench.sh. Confirmed no workflow, Justfile, or script invoked any of the three, so no workflow surgery was needed. Left untouched, on purpose: docs-template/, machine-readable-design/, docs/decisions/0000-template.adoc, docs/governance/CRG-AUDIT-TEMPLATE.adoc, docs/governance/TEMPLATE-STANDARDS-AUDIT.adoc, docs/RSR_OUTLINE.adoc, and the K9 component templates under .machine_readable/self-validating/ — all of these are intentional reusable seed kits or per-instance templates (their own text says "copy this file and customize"), not this repo's own identity. Also untouched: flake.nix, .tool-versions, .editorconfig, .gitattributes, .gitignore, per instructions. Co-Authored-By: Claude Opus 5 --- .devcontainer/Containerfile | 8 +- .devcontainer/README.adoc | 4 +- .devcontainer/devcontainer.json | 6 +- .envrc | 2 +- .github/.mailmap | 2 +- .github/CODEOWNERS | 11 +- .github/CODE_OF_CONDUCT.md | 42 +- .github/CONTRIBUTING.md | 20 +- .github/FUNDING.yml | 8 +- .github/GOVERNANCE.md | 6 +- .github/MAINTAINERS | 3 +- .github/SECURITY.md | 54 +-- .github/SUPPORT | 4 +- .github/copilot-instructions.md | 4 +- .github/settings.yml | 8 +- .machine_readable/6a2/CLADE.a2ml | 15 +- .machine_readable/6a2/anchors/ANCHOR.a2ml | 14 +- .machine_readable/ENSAID_CONFIG.a2ml | 8 +- .machine_readable/ai/.clinerules | 4 +- .machine_readable/ai/.cursorrules | 4 +- .machine_readable/ai/.windsurfrules | 4 +- .machine_readable/ai/AI.a2ml | 2 +- .machine_readable/ai/PLACEHOLDERS.adoc | 4 + .../bot_directives/coverage.a2ml | 4 +- .machine_readable/bot_directives/debt.a2ml | 4 +- .../bot_directives/methodology.a2ml | 6 +- .machine_readable/compliance/reuse/dep5 | 26 +- .machine_readable/configs/eclexiaiser.toml | 2 +- .../configs/git-cliff/cliff.toml | 10 +- .machine_readable/configs/selur-compose.toml | 4 +- .machine_readable/configs/stapeln.toml | 12 +- .../contractiles/Adjustfile.a2ml | 17 +- .../contractiles/Intentfile.a2ml | 62 +-- .machine_readable/contractiles/Justfile | 144 ++----- .machine_readable/contractiles/Mustfile.a2ml | 21 +- .machine_readable/contractiles/Trustfile.a2ml | 14 +- .../contractiles/bust/Bustfile.a2ml | 40 +- .../contractiles/dust/Dustfile.a2ml | 13 +- .machine_readable/integrations/groove.a2ml | 4 +- .../policies/MAINTENANCE-AXES.a2ml | 4 +- .../scripts/maintenance/maint-assault.sh | 2 +- .machine_readable/self-validating/README.adoc | 12 +- .../self-validating/methodology-guard.k9.ncl | 2 +- .well-known/humans.txt | 6 +- .well-known/security.txt | 10 +- 0-AI-MANIFEST.a2ml | 6 +- EXPLAINME.adoc | 34 +- Justfile | 136 ++----- README.adoc | 47 +-- benches/template_bench.sh | 227 ----------- build/.guix-channel | 10 +- build/Containerfile | 33 +- build/guix.scm | 55 +-- build/setup.sh | 10 +- container/.gatekeeper.yaml | 6 +- container/Containerfile | 38 +- container/README.adoc | 2 +- container/compose.toml | 22 +- container/ct-build.sh | 14 +- container/deploy.k9.ncl | 18 +- container/entrypoint.sh | 14 +- container/manifest.toml | 26 +- container/vordr.toml | 16 +- docs/QUICKSTART.adoc | 2 +- docs/architecture/THREAT-MODEL.adoc | 12 +- docs/attribution/CITATION.cff | 12 +- docs/attribution/CITATIONS.adoc | 20 +- docs/attribution/MAINTAINERS.adoc | 4 +- docs/decisions/0001-adopt-rsr-standard.adoc | 4 +- docs/developer/ABI-FFI-README.adoc | 57 ++- docs/onboarding/QUICKSTART-DEV.adoc | 25 +- docs/onboarding/QUICKSTART-MAINTAINER.adoc | 42 +- docs/practice/AI-CONVENTIONS.adoc | 8 +- docs/practice/STATE-VISUALIZER-GUIDE.adoc | 4 +- docs/status/PROOF-NEEDS.adoc | 2 +- docs/status/PROOF-STATUS.adoc | 2 +- docs/status/READINESS.adoc | 20 +- docs/status/TEST-NEEDS.adoc | 133 ++---- examples/web-project-deno.json | 2 +- scripts/check-root-shape.sh | 3 - scripts/validate-template.sh | 384 ------------------ src/interface/ffi/build.zig | 50 ++- src/interface/ffi/src/main.zig | 92 +++-- tests/aspect_tests.sh | 2 +- tests/e2e.sh | 4 +- tests/e2e/template_instantiation_test.sh | 268 ------------ 86 files changed, 668 insertions(+), 1854 deletions(-) delete mode 100755 benches/template_bench.sh delete mode 100755 scripts/validate-template.sh delete mode 100755 tests/e2e/template_instantiation_test.sh diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile index b0a6fd1..c31c95f 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 recon-silly-ation # Base: Chainguard Wolfi (minimal, supply-chain-secure) -# Build: podman build -t {{PROJECT_NAME}}-dev -f .devcontainer/Containerfile . +# Build: podman build -t recon-silly-ation-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/recon-silly-ation # Default shell ENV SHELL=/bin/bash diff --git a/.devcontainer/README.adoc b/.devcontainer/README.adoc index 5eee18b..17525f5 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 `recon-silly-ation` 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..ebd1842 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 recon-silly-ation // Works with: VS Code Dev Containers, GitHub Codespaces, Gitpod // Container runtime: Podman (recommended) or any OCI-compliant runtime { - "name": "{{PROJECT_NAME}}", + "name": "recon-silly-ation", "build": { "dockerfile": "Containerfile", diff --git a/.envrc b/.envrc index 0b5b702..0f630b0 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="recon-silly-ation" export RSR_TIER="infrastructure" # export DATABASE_URL="..." # export API_KEY="..." diff --git a/.github/.mailmap b/.github/.mailmap index 0ada9de..b47a9b9 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..105d9bc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,13 +2,12 @@ # 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 # 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..9ac7fdb 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 recon-silly-ation 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 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 the maintainer 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 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 an independent third party where possible, since there is currently only one maintainer - 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/recon-silly-ation/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..c197c08 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/recon-silly-ation.git +cd recon-silly-ation # Using Nix (recommended for reproducibility) nix develop # Or using toolbox/distrobox -toolbox create {{REPO}}-dev -toolbox enter {{REPO}}-dev +toolbox create recon-silly-ation-dev +toolbox enter recon-silly-ation-dev # Install dependencies manually # Verify setup @@ -21,7 +21,7 @@ just test # Run test suite ### Repository Structure ``` -{{REPO}}/ +recon-silly-ation/ ├── 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/recon-silly-ation/labels/good%20first%20issue) — Simple Perimeter 3 tasks +- [`help wanted`](https://github.com/hyperpolymath/recon-silly-ation/labels/help%20wanted) — Community help needed +- [`documentation`](https://github.com/hyperpolymath/recon-silly-ation/labels/documentation) — Docs improvements +- [`perimeter-3`](https://github.com/hyperpolymath/recon-silly-ation/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/GOVERNANCE.md b/.github/GOVERNANCE.md index 14c9c55..d94db78 100644 --- a/.github/GOVERNANCE.md +++ b/.github/GOVERNANCE.md @@ -4,13 +4,13 @@ Copyright (c) Jonathan D.A. Jewell --> # Project Governance -This document describes the governance model for **{{PROJECT_NAME}}**. +This document describes the governance model for **recon-silly-ation**. --- ## Project Governance Model -{{PROJECT_NAME}} follows a **Benevolent Dictator For Life (BDFL)** governance model. +recon-silly-ation follows a **Benevolent Dictator For Life (BDFL)** governance model. This model is well-suited for solo maintainers and small project teams where rapid, consistent decision-making is more valuable than formal consensus processes. @@ -157,4 +157,4 @@ with the community before adoption, even though the BDFL retains final authority --- -Copyright (c) {{CURRENT_YEAR}} {{OWNER}}. Licensed under MPL-2.0. +Copyright (c) 2026 hyperpolymath. Licensed under MPL-2.0. diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 145c4e9..f17d66c 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -2,9 +2,8 @@ # MAINTAINERS - Project maintainers and contact information # # 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..64dac87 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/recon-silly-ation/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,15 @@ This method ensures: - Coordinated disclosure tooling - Automatic credit when the advisory is published -### Alternative: Encrypted Email +### Alternative: 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}}` | - -```bash -# Import our PGP key -curl -sSL {{PGP_KEY_URL}} | gpg --import +| **Email** | j.d.a.jewell@open.ac.uk | -# Verify fingerprint -gpg --fingerprint {{SECURITY_EMAIL}} - -# Encrypt your report -gpg --armor --encrypt --recipient {{SECURITY_EMAIL}} report.txt -``` +No PGP key is published for this project at present; if encryption is required, say so in your first message and we'll arrange a channel. > **⚠️ Important:** Do not report security vulnerabilities through public GitHub issues, pull requests, discussions, or social media. @@ -207,7 +178,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/recon-silly-ation`) 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 +297,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/recon-silly-ation/security/advisories) - **Release notes**: Security fixes noted in [CHANGELOG](CHANGELOG.md) ### Update Policy @@ -352,7 +323,7 @@ To stay informed about security updates: ## Security Best Practices -When using {{PROJECT_NAME}}, we recommend: +When using recon-silly-ation, we recommend: ### General @@ -374,8 +345,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/recon-silly-ation/security/advisories) - [Changelog](CHANGELOG.md) - [Contributing Guidelines](CONTRIBUTING.md) - [CVE Database](https://cve.mitre.org/) @@ -387,8 +357,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/recon-silly-ation/security/advisories/new) or j.d.a.jewell@open.ac.uk | +| **General questions** | [GitHub Discussions](https://github.com/hyperpolymath/recon-silly-ation/discussions) | | **Other enquiries** | See [README](README.md) for contact information | --- @@ -403,8 +373,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 recon-silly-ation 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..c9a20c8 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/recon-silly-ation/discussions +- GitHub Issues: https://github.com/hyperpolymath/recon-silly-ation/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..ed845d4 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: "recon-silly-ation" + description: "WASM document reconciliation (ReconForth VM)." + homepage: "https://github.com/hyperpolymath/recon-silly-ation" private: false has_issues: true has_projects: true diff --git a/.machine_readable/6a2/CLADE.a2ml b/.machine_readable/6a2/CLADE.a2ml index b14389c..ce9502e 100644 --- a/.machine_readable/6a2/CLADE.a2ml +++ b/.machine_readable/6a2/CLADE.a2ml @@ -3,11 +3,14 @@ # See: https://github.com/hyperpolymath/gv-clade-index [identity] -uuid = "a5ea1382-a34c-5334-8a46-a2ebe904c810" +# NOTE: this uuid was regenerated during instantiation — the value inherited +# from rsr-template-repo would have collided with the template's own entry +# in the gv-clade-index registry. +uuid = "df5a6230-b430-4b24-aa38-ac764f6b8ca7" primary-forge = "github" primary-owner = "hyperpolymath" -canonical-name = "rsr-template-repo" -prefixed-name = "rm-rsr-template-repo" +canonical-name = "recon-silly-ation" +prefixed-name = "rm-recon-silly-ation" [clade] primary = "rm" @@ -16,9 +19,9 @@ assigned = "2026-03-16" rationale = "" [forges] -github = "hyperpolymath/rsr-template-repo" -gitlab = "hyperpolymath/rsr-template-repo" -bitbucket = "hyperpolymath/rsr-template-repo" +github = "hyperpolymath/recon-silly-ation" +gitlab = "hyperpolymath/recon-silly-ation" +bitbucket = "hyperpolymath/recon-silly-ation" [lineage] type = "standalone" diff --git a/.machine_readable/6a2/anchors/ANCHOR.a2ml b/.machine_readable/6a2/anchors/ANCHOR.a2ml index 8723899..b74359c 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/recon-silly-ation" 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 = "recon-silly-ation" +kind = "tool" # language | library | service | tool +one-sentence = "Reconciles documents via a WASM-hosted ReconForth virtual machine, as an interop component of the reposystem tool ecosystem." +domain = "document reconciliation" [semantic-authority] policy = "canonical" diff --git a/.machine_readable/ENSAID_CONFIG.a2ml b/.machine_readable/ENSAID_CONFIG.a2ml index 1384822..83c419f 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 = "recon_silly_ation-dev" +# name = "recon-silly-ation Development" +# description = "Panels for recon-silly-ation 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..77e1c76 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. +- `recon-silly-ation` 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 index 2a80900..11e38b5 100644 --- a/.machine_readable/ai/PLACEHOLDERS.adoc +++ b/.machine_readable/ai/PLACEHOLDERS.adoc @@ -3,6 +3,10 @@ = Template Placeholders # Template Placeholders +NOTE: recon-silly-ation has already been instantiated — its `{{PLACEHOLDER}}` +tokens have been substituted. This file is kept as historical reference for +the substitution mechanism `just init` used, not as a live checklist. + All placeholders in this template follow the `{{PLACEHOLDER}}` pattern. After cloning, replace them with your project-specific values. 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..2aa1db7 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 = "Runs the ReconForth VM compiled to WebAssembly for portable, sandboxed document reconciliation." deepen-not-broaden = true # ============================================================================ diff --git a/.machine_readable/compliance/reuse/dep5 b/.machine_readable/compliance/reuse/dep5 index 49aaed6..fa0fa60 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: recon-silly-ation +Upstream-Contact: Jonathan D.A. Jewell +Source: https://github.com/hyperpolymath/recon-silly-ation # 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..8db7c93 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 = "recon-silly-ation" [[functions]] name = "build" diff --git a/.machine_readable/configs/git-cliff/cliff.toml b/.machine_readable/configs/git-cliff/cliff.toml index 5c39b48..ccb6491 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 +# recon-silly-ation — 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/recon-silly-ation {%- 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/recon-silly-ation {%- endmacro -%} {% for release in releases -%} diff --git a/.machine_readable/configs/selur-compose.toml b/.machine_readable/configs/selur-compose.toml index e7f831a..a9c899a 100644 --- a/.machine_readable/configs/selur-compose.toml +++ b/.machine_readable/configs/selur-compose.toml @@ -1,14 +1,14 @@ # SPDX-License-Identifier: MPL-2.0 # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) # -# Stapeln service definition for {{SERVICE_NAME}} +# Stapeln service definition for recon-silly-ation # # Usage: # podman-compose -f selur-compose.toml up -d # just stack-up [project] -name = "{{SERVICE_NAME}}" +name = "recon-silly-ation" [services.app] build = { context = ".", dockerfile = "Containerfile" } diff --git a/.machine_readable/configs/stapeln.toml b/.machine_readable/configs/stapeln.toml index 7bf5d48..d1c2ed8 100644 --- a/.machine_readable/configs/stapeln.toml +++ b/.machine_readable/configs/stapeln.toml @@ -1,16 +1,16 @@ # SPDX-License-Identifier: MPL-2.0 -# stapeln.toml — Layer-based container build for {{SERVICE_NAME}} +# stapeln.toml — Layer-based container build for recon-silly-ation # # stapeln builds containers as composable layers (German: "to stack"). # Each layer is independently cacheable, verifiable, and signable. [metadata] -name = "{{SERVICE_NAME}}" +name = "recon-silly-ation" version = "0.1.0" -description = "{{SERVICE_NAME}} container service" +description = "recon-silly-ation container service" author = "Jonathan D.A. Jewell " license = "MPL-2.0" -registry = "{{REGISTRY}}" +registry = "ghcr.io/hyperpolymath" [build] containerfile = "Containerfile" @@ -32,7 +32,7 @@ packages = [] cache = true [layers.build] -description = "{{SERVICE_NAME}} build" +description = "recon-silly-ation build" extends = "toolchain" commands = [] @@ -43,7 +43,7 @@ packages = ["ca-certificates", "curl"] copy-from = [ { layer = "build", src = "/app/", dst = "/app/" }, ] -entrypoint = ["/app/{{SERVICE_NAME}}"] +entrypoint = ["/app/recon-silly-ation"] user = "nonroot" # ── Security ─────────────────────────────────────────────────── diff --git a/.machine_readable/contractiles/Adjustfile.a2ml b/.machine_readable/contractiles/Adjustfile.a2ml index 6f01e89..877928b 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 recon-silly-ation # Author: Jonathan D.A. Jewell # # Cumulative-drift catchment: tolerance bands + corrective actions. @@ -8,20 +8,19 @@ # Fix with: adjust fix (applies deterministic patches; advisory otherwise) @abstract: -Drift tolerances and corrective actions for rsr-template-repo. Unlike -MUST (hard gate), ADJUST tracks cumulative drift against tolerance bands -and proposes corrective actions. Advisory — it warns and trends, it does -not block. +Drift tolerances and corrective actions for recon-silly-ation, an RSR-shaped +repository instantiated from rsr-template-repo. Unlike MUST (hard gate), +ADJUST tracks cumulative drift against tolerance bands and proposes +corrective actions. Advisory — it warns and trends, it does not block. @end -## Template Drift +## Instantiation Drift ### placeholder-drift -- description: Template placeholders should be replaced when copied -- tolerance: 0 placeholder markers in copied repos +- description: RSR identity placeholders should never reappear post-instantiation +- tolerance: 0 unfilled {{PLACEHOLDER}} markers outside docs-template/, machine-readable-design/, and the ADR/K9 component templates - corrective: Search and replace all {{PLACEHOLDER}} markers - severity: advisory -- notes: This check only applies to repos that copied from this template ### template-version-drift - description: Template version should match RSR spec version diff --git a/.machine_readable/contractiles/Intentfile.a2ml b/.machine_readable/contractiles/Intentfile.a2ml index ef74f45..945dc1d 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 recon-silly-ation # Author: Jonathan D.A. Jewell # # Paired runner: intend.ncl @@ -20,67 +20,52 @@ # contractile for hard gates. @abstract: -North-star contractile for rsr-template-repo. This repository is the -canonical template for Rhodium Standard Repository compliance. It provides -the scaffold that all hyperpolymath repos should copy and customize. +North-star contractile for recon-silly-ation, an RSR-compliant repository +instantiated from rsr-template-repo. It reconciles documents via a +WASM-hosted ReconForth VM, as an interop component of the reposystem tool +ecosystem. @end ## Purpose -The rsr-template-repo 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. - -Every new repository in the hyperpolymath estate should be initialized by -copying this template and substituting the placeholder values with -repo-specific content. +recon-silly-ation reconciles documents by running the ReconForth virtual +machine compiled to WebAssembly, registered in `reposystem` as an +`interop`-role tool exposing a `reconcile` action. ## Anti-Purpose This repository is NOT: -- A general-purpose project scaffold for external use (hyperpolymath-only) -- A replacement for per-repo customization (all files must be bespoke) -- A static template that never changes (evolves with RSR spec) -- A runtime library or framework (build-time only) +- The RSR template itself (that is rsr-template-repo, upstream) +- A general-purpose project scaffold (it is an instantiated consumer) +- A runtime library that other repos should copy wholesale ## If In Doubt If you are unsure whether a change is in scope, ask. Sensitive areas: - .machine_readable/ contractile definitions -- RSR specification files -- Governance templates -- License policy documents +- The Idris2 ABI / Zig FFI seam in src/interface/ +- Governance and license policy documents ## Committed Next-Actions -### repo-initialization -- description: Provide just copy-and-substitute template for new repos -- probe: test -f scripts/init-repo.sh -- status: done -- notes: Run with source scripts/init-repo.sh - ### contractile-completeness - description: Every RSR contractile has an a2ml and ncl implementation - probe: ls .machine_readable/contractiles/*.a2ml | wc -l | grep -q "^6$" - status: in_progress - notes: Currently 6 contractile verbs: intend, must, trust, adjust, bust, dust -### automation-scripts -- description: All repetitive tasks have just recipes -- probe: grep -c "^# " Justfile | grep -q "^[6-9][0-9]*$" -- status: in_progress +### ffi-tests-real +- description: integration_test.zig has real test bodies against the FFI surface, not just documentation stubs +- probe: grep -q 'export fn recon_silly_ation_' src/interface/ffi/test/integration_test.zig +- status: declared +- notes: see docs/status/TEST-NEEDS.adoc ## Wishes ### Near Horizon -#### cross-repo-validation -- description: Tooling to validate all repos against RSR spec -- horizon: near -- status: declared - -#### automated-substitution -- description: Script to automate repo-specific substitution in template +#### e2e-reconcile-roundtrip +- description: tests/e2e.sh exercises a real ReconForth reconcile round-trip via the WASM build - horizon: near - status: declared @@ -90,10 +75,3 @@ If you are unsure whether a change is in scope, ask. Sensitive areas: - description: Idris2 proofs for all critical contractile invariants - horizon: mid - status: declared - -### Far Horizon - -#### ecosystem-visualization -- description: Interactive graph of all hyperpolymath repos and dependencies -- horizon: far -- status: declared diff --git a/.machine_readable/contractiles/Justfile b/.machine_readable/contractiles/Justfile index 2db3d94..ccd8412 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 := "recon_silly_ation" OWNER := "hyperpolymath" -REPO := "rsr-template-repo" +REPO := "recon-silly-ation" version := "0.1.0" tier := "infrastructure" # 1 | 2 | infrastructure @@ -52,7 +52,7 @@ info: @echo "Version: {{version}}" @echo "RSR Tier: {{tier}}" @echo "Recipes: $(just --summary | wc -w)" - @[ -f ".machine_readable/STATE.a2ml" ] && grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml | head -1 | xargs -I{} echo "Phase: {}" || true + @[ -f ".machine_readable/6a2/STATE.a2ml" ] && grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/6a2/STATE.a2ml | head -1 | xargs -I{} echo "Phase: {}" || true # Run Invariant Path overlay tools for this repository invariant-path *ARGS: @@ -83,38 +83,24 @@ import? "build/just/assess.just" # Build the project (debug mode) 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 + cd src/interface/ffi && zig build {{args}} @echo "Build complete" # 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}} + cd src/interface/ffi && zig build -Doptimize=ReleaseFast {{args}} @echo "Release build complete" -# 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/interface/ffi -name '*.zig' | 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-out src/interface/ffi/.zig-cache # Deep clean including caches [reversible: rebuild] clean-all: clean @@ -127,40 +113,24 @@ clean-all: clean # Run all 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}} + cd src/interface/ffi && zig build test {{args}} @echo "Tests passed!" # Run tests with verbose output test-verbose: @echo "Running tests (verbose)..." - # TODO: Replace with verbose test command - -# Smoke test -test-smoke: - @echo "Smoke test..." - # TODO: Add basic sanity checks + cd src/interface/ffi && zig build test --summary all # 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 + bash tests/e2e.sh @echo "E2E tests passed!" # Run aspect tests (cross-cutting concern validation) 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 + bash tests/aspect_tests.sh # Aspect tests validate architectural invariants: # - Thread safety (mutex in FFI modules) # - ABI/FFI contract (declarations match exports) @@ -168,23 +138,6 @@ aspect: # - No dangerous patterns (believe_me, assert_total, etc.) @echo "Aspect tests passed!" -# Run benchmarks (performance regression detection) -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!" - # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line) crg-grade: @grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \ @@ -208,8 +161,8 @@ crg-badge: 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 +# Per STANDING rule: P2P + E2E + aspect +test-all: test e2e aspect @echo "All test categories passed — safe to merge!" # Run all quality checks @@ -227,49 +180,31 @@ fix: fmt # Format all source files [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 +# Run linter (Idris2 ABI typecheck + Zig compile check) lint: @echo "Linting source files..." - # TODO: Replace with your linter - # Examples: - # cargo clippy -- -D warnings - # mix credo --strict - # gleam check + @command -v idris2 >/dev/null 2>&1 && idris2 --typecheck abi.ipkg || echo "WARN: idris2 not found — skipping ABI typecheck" + 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 artifacts to PREFIX (default /usr/local; override with PREFIX env var) install: build-release @echo "Installing {{project}}..." - # TODO: Replace with your install command + @PREFIX="$${PREFIX:-/usr/local}"; \ + mkdir -p "$$PREFIX/lib" "$$PREFIX/include"; \ + cp -r src/interface/ffi/zig-out/lib/. "$$PREFIX/lib/" 2>/dev/null || echo " (no lib/ artifacts yet — build first)"; \ + cp -r generated/abi/*.h "$$PREFIX/include/" 2>/dev/null || echo " (no generated ABI headers yet)"; \ + echo "Installed to $$PREFIX" # ═══════════════════════════════════════════════════════════════════════════════ # DEPENDENCIES @@ -278,20 +213,13 @@ 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 + @command -v zig >/dev/null 2>&1 && echo " [OK] zig ($$(zig version))" || echo " [FAIL] zig not found" + @command -v idris2 >/dev/null 2>&1 && echo " [OK] idris2 ($$(idris2 --version))" || echo " [WARN] idris2 not found (only needed to regenerate ABI headers)" @echo "All dependencies satisfied" # Audit dependencies for vulnerabilities deps-audit: @echo "Auditing for vulnerabilities..." - # TODO: Replace with your audit command - # Examples: - # cargo audit - # mix audit @command -v trivy >/dev/null && trivy fs --severity HIGH,CRITICAL --quiet . || true @echo "Audit complete" @@ -362,7 +290,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 the RSR template scaffold." exit 1 fi @@ -549,14 +477,14 @@ import? "build/just/validate.just" # Update STATE.a2ml timestamp state-touch: - @if [ -f ".machine_readable/STATE.a2ml" ]; then \ - sed -i 's/last-updated = "[^"]*"/last-updated = "'"$(date +%Y-%m-%d)"'"/' .machine_readable/STATE.a2ml && \ + @if [ -f ".machine_readable/6a2/STATE.a2ml" ]; then \ + sed -i 's/last-updated = "[^"]*"/last-updated = "'"$(date +%Y-%m-%d)"'"/' .machine_readable/6a2/STATE.a2ml && \ echo "STATE.a2ml timestamp updated"; \ fi # Show current phase from STATE.a2ml state-phase: - @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" + @grep -oP 'phase\s*=\s*"\K[^"]+' .machine_readable/6a2/STATE.a2ml 2>/dev/null | head -1 || echo "unknown" # ═══════════════════════════════════════════════════════════════════════════════ # GUIX & NIX @@ -681,7 +609,7 @@ assail: # Self-diagnostic — checks dependencies, permissions, paths doctor: - @echo "Running diagnostics for rsr-template-repo..." + @echo "Running diagnostics for recon-silly-ation..." @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 +619,7 @@ doctor: # Guided tour of key features tour: - @echo "=== rsr-template-repo Tour ===" + @echo "=== recon-silly-ation Tour ===" @echo "" @echo "1. Project structure:" @ls -la @@ -706,12 +634,12 @@ tour: # Open feedback channel with diagnostic context help-me: - @echo "=== rsr-template-repo Help ===" + @echo "=== recon-silly-ation 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/recon-silly-ation/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..0d148e7 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 recon-silly-ation # Author: Jonathan D.A. Jewell # # What MUST be true about this repository. Hard requirements. @@ -7,9 +7,9 @@ # Fix with: must fix (where a deterministic fix exists) @abstract: -Physical-state invariants for rsr-template-repo. This is the canonical -RSR template repository. These are hard requirements — CI and pre-commit -hooks fail if any check fails. +Physical-state invariants for recon-silly-ation, an RSR-compliant repository +instantiated from rsr-template-repo. These are hard requirements — CI and +pre-commit hooks fail if any check fails. @end ## File Presence @@ -76,18 +76,13 @@ hooks fail if any check fails. - run: test -d .machine_readable/self-validating && test -d .machine_readable/self-validating/k9-svc && test -d .machine_readable/self-validating/examples - severity: warning -## Template Integrity +## Instantiation Integrity ### no-placeholder-values -- description: No placeholder values remain in template files -- run: test -z "$(grep -r '{{' .machine_readable/contractiles/ 2>/dev/null)" +- description: No RSR identity placeholder values remain +- run: test -z "$(grep -rE '\{\{[A-Z_]+\}\}|\{\{project\}\}|\{\{PROJECT\}\}' --exclude-dir=docs-template --exclude-dir=machine-readable-design . 2>/dev/null)" - severity: critical -- notes: All placeholders must be substituted when copying this template - -### template-readonly -- description: Template marker files are not modified -- run: grep -q 'RSR_TEMPLATE_DO_NOT_EDIT' .machine_readable/0.1-AI-MANIFEST.a2ml -- severity: warning +- notes: All identity placeholders must stay substituted post-instantiation ## Git State diff --git a/.machine_readable/contractiles/Trustfile.a2ml b/.machine_readable/contractiles/Trustfile.a2ml index e2028b5..185a159 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 recon-silly-ation # 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 recon-silly-ation. 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 +recon-silly-ation operates at trust level: maximal Trust levels: - maximal: Agent may read, build, test, lint, format, heal freely. @@ -57,13 +57,13 @@ Current trust level: maximal - run: grep -q 'PMPL\|MPL\|MIT\|Apache\|LGPL' LICENSE - severity: warning -## Template-Specific Trust +## Machine-Readable State Trust -### template-files-readonly -- description: Template scaffold files should not be modified except by maintainer +### state-files-reviewed +- description: Changes to .machine_readable/ should be reviewed, not silently drifted - run: test -z "$(git status --short .machine_readable/ 2>/dev/null | grep -v '^??' || true)" - severity: advisory -- notes: Changes to template files require careful review +- notes: Uncommitted changes to state/contractile files require review before commit ### trust-deny-areas - description: Sensitive areas from INTENT.contractile require explicit approval diff --git a/.machine_readable/contractiles/bust/Bustfile.a2ml b/.machine_readable/contractiles/bust/Bustfile.a2ml index c7fec2b..3b429bf 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 recon-silly-ation # Author: Jonathan D.A. Jewell # # Paired runner: bust.ncl @@ -13,40 +13,26 @@ # 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. -# Failure modes here relate to template distribution and substitution. +# This repository: recon-silly-ation, instantiated from rsr-template-repo. +# The failure modes below were inherited from the template's own +# distribution/substitution concerns; they mostly do not apply now that +# instantiation is complete. Kept as a reference for what to replace with +# recon-silly-ation-specific failure modes (e.g. ReconForth VM crashes, +# WASM boundary errors) as the project matures. @abstract: -Bustfile for rsr-template-repo. Lists failure modes specific to the template -repository itself, particularly around template distribution, substitution, -and synchronization across the hyperpolymath estate. +Bustfile for recon-silly-ation. Currently lists the template's own +distribution/substitution failure modes (inherited, mostly inapplicable +post-instantiation); needs project-specific failure modes added. @end -## Failure Modes - -### 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" -- recovery_probe: "git -C test-repo diff --quiet .machine_readable/contractiles/Intentfile.a2ml" -- expected_recovery_time_seconds: 10 -- status: declared -- notes: Verify that substitution scripts handle all placeholder replacements correctly - -### sync-drift-between-repos -- class: synchronization -- description: Drift occurs between rsr-template-repo 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 -- status: declared -- notes: The estate-wide sync scripts (see scripts/) should prevent this; verify with scripts/verify-sync.sh +## Failure Modes (inherited from rsr-template-repo — mostly inapplicable) ### 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' >> .machine_readable/contractiles/Intentfile.a2ml" +- recovery_probe: "git checkout .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..544c4d5 100644 --- a/.machine_readable/contractiles/dust/Dustfile.a2ml +++ b/.machine_readable/contractiles/dust/Dustfile.a2ml @@ -1,18 +1,19 @@ # SPDX-License-Identifier: MPL-2.0 -# Dustfile — Cleanup and hygiene contract for rsr-template-repo +# Dustfile — Cleanup and hygiene contract for recon-silly-ation # 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. -# Cleanup items here ensure the template itself remains pristine. +# This repository: recon-silly-ation, instantiated from rsr-template-repo. +# Cleanup items here ensure the instantiated repo stays free of leftover +# template machinery and drift. @abstract: -Cleanup and hygiene items for rsr-template-repo. These are maintenance tasks -that ensure the template repository remains clean and ready for distribution -to new repositories. +Cleanup and hygiene items for recon-silly-ation. These are maintenance tasks +that ensure the repository stays clean of stale template artefacts inherited +from rsr-template-repo. @end ## Stale Files diff --git a/.machine_readable/integrations/groove.a2ml b/.machine_readable/integrations/groove.a2ml index ea3fb8b..cace4cc 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 recon-silly-ation with your project name + (service "recon-silly-ation") (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..9e15cb1 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="recon_silly_ation" 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/methodology-guard.k9.ncl b/.machine_readable/self-validating/methodology-guard.k9.ncl index 4c43325..17f1409 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 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..9fad00e 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/recon-silly-ation/.well-known/security.txt +Policy: https://github.com/hyperpolymath/recon-silly-ation/blob/main/SECURITY.md diff --git a/0-AI-MANIFEST.a2ml b/0-AI-MANIFEST.a2ml index 68aad8c..8b1848c 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}}" +name = "recon-silly-ation" +purpose = "WASM document reconciliation (ReconForth VM); interop component of the reposystem tool ecosystem." [ai-allocation] agents = [ diff --git a/EXPLAINME.adoc b/EXPLAINME.adoc index 2a61d78..667f326 100644 --- a/EXPLAINME.adoc +++ b/EXPLAINME.adoc @@ -1,6 +1,6 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= RSR Template Repo - Explainme += recon-silly-ation - Explainme image:https://img.shields.io/badge/License-MPL_2.0-blue.svg[License: MPL-2.0,link="https://opensource.org/licenses/MPL-2.0"] :toc: @@ -59,33 +59,23 @@ Caveat: == Template Token Policy Claim: -Placeholders are explicit template content until initialization. +This repository has been instantiated from the RSR template — the +`{{PLACEHOLDER}}` tokens that once stood for project identity have been +substituted with recon-silly-ation's real values. How this is implemented: -* `README.adoc` and bootstrap recipes keep `{{TOKEN}}` placeholders visible. -* `just init` performs token replacement. +* `README.adoc` and the community-health files under `.github/` carry the + project's real name, owner, and licence instead of template tokens. +* `.machine_readable/ai/PLACEHOLDERS.adoc` remains as the historical + reference for the substitution mechanism `just init` used to perform. Caveat: -* Uninitialized placeholders must not be treated as project-specific truth. - -== Julia Registry Packages — Standalone Repo Requirement - -Claim: -If this template is used to create a Julia package, it must remain a standalone repository registered with the Julia package registry. - -How this is implemented: - -* Julia's package registry (General.jl or other) expects each package to be a standalone GitHub repository with `Project.toml` at the repository root. -* Installation via `Pkg.add()`, dependency resolution, and automated CI/CD all depend on this canonical structure. - -Caveat: - -* Do NOT move this repository into a monorepo or subdirectory, as this breaks registry registration and package discoverability. -* See `JULIA-REGISTRY-REQUIREMENT.md` (workspace root) for the complete list of 34 registered Julia packages and enforcement rationale. -* Non-registry Julia packages can be organized differently if they are not published to any registry. - +* `docs-template/`, the ADR template (`docs/decisions/0000-template.adoc`), + and the K9 component templates under `.machine_readable/self-validating/` + are deliberately still generic — they are seed kits for future + doc-authoring and component authoring, not this repo's own identity. == License diff --git a/Justfile b/Justfile index 9b2f200..ccd8412 100644 --- a/Justfile +++ b/Justfile @@ -19,9 +19,9 @@ set positional-arguments := true import? "build/contractile.just" # Project metadata — customize these -project := "rsr-template-repo" +project := "recon_silly_ation" OWNER := "hyperpolymath" -REPO := "rsr-template-repo" +REPO := "recon-silly-ation" version := "0.1.0" tier := "infrastructure" # 1 | 2 | infrastructure @@ -83,38 +83,24 @@ import? "build/just/assess.just" # Build the project (debug mode) 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 + cd src/interface/ffi && zig build {{args}} @echo "Build complete" # 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}} + cd src/interface/ffi && zig build -Doptimize=ReleaseFast {{args}} @echo "Release build complete" -# 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/interface/ffi -name '*.zig' | 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-out src/interface/ffi/.zig-cache # Deep clean including caches [reversible: rebuild] clean-all: clean @@ -127,40 +113,24 @@ clean-all: clean # Run all 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}} + cd src/interface/ffi && zig build test {{args}} @echo "Tests passed!" # Run tests with verbose output test-verbose: @echo "Running tests (verbose)..." - # TODO: Replace with verbose test command - -# Smoke test -test-smoke: - @echo "Smoke test..." - # TODO: Add basic sanity checks + cd src/interface/ffi && zig build test --summary all # 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 + bash tests/e2e.sh @echo "E2E tests passed!" # Run aspect tests (cross-cutting concern validation) 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 + bash tests/aspect_tests.sh # Aspect tests validate architectural invariants: # - Thread safety (mutex in FFI modules) # - ABI/FFI contract (declarations match exports) @@ -168,23 +138,6 @@ aspect: # - No dangerous patterns (believe_me, assert_total, etc.) @echo "Aspect tests passed!" -# Run benchmarks (performance regression detection) -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!" - # Print the current CRG grade (reads from READINESS.md '**Current Grade:** X' line) crg-grade: @grade=$$(grep -oP '(?<=\*\*Current Grade:\*\* )[A-FX]' READINESS.md 2>/dev/null | head -1); \ @@ -208,8 +161,8 @@ crg-badge: 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 +# Per STANDING rule: P2P + E2E + aspect +test-all: test e2e aspect @echo "All test categories passed — safe to merge!" # Run all quality checks @@ -227,49 +180,31 @@ fix: fmt # Format all source files [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 +# Run linter (Idris2 ABI typecheck + Zig compile check) lint: @echo "Linting source files..." - # TODO: Replace with your linter - # Examples: - # cargo clippy -- -D warnings - # mix credo --strict - # gleam check + @command -v idris2 >/dev/null 2>&1 && idris2 --typecheck abi.ipkg || echo "WARN: idris2 not found — skipping ABI typecheck" + 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 artifacts to PREFIX (default /usr/local; override with PREFIX env var) install: build-release @echo "Installing {{project}}..." - # TODO: Replace with your install command + @PREFIX="$${PREFIX:-/usr/local}"; \ + mkdir -p "$$PREFIX/lib" "$$PREFIX/include"; \ + cp -r src/interface/ffi/zig-out/lib/. "$$PREFIX/lib/" 2>/dev/null || echo " (no lib/ artifacts yet — build first)"; \ + cp -r generated/abi/*.h "$$PREFIX/include/" 2>/dev/null || echo " (no generated ABI headers yet)"; \ + echo "Installed to $$PREFIX" # ═══════════════════════════════════════════════════════════════════════════════ # DEPENDENCIES @@ -278,20 +213,13 @@ 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 + @command -v zig >/dev/null 2>&1 && echo " [OK] zig ($$(zig version))" || echo " [FAIL] zig not found" + @command -v idris2 >/dev/null 2>&1 && echo " [OK] idris2 ($$(idris2 --version))" || echo " [WARN] idris2 not found (only needed to regenerate ABI headers)" @echo "All dependencies satisfied" # Audit dependencies for vulnerabilities deps-audit: @echo "Auditing for vulnerabilities..." - # TODO: Replace with your audit command - # Examples: - # cargo audit - # mix audit @command -v trivy >/dev/null && trivy fs --severity HIGH,CRITICAL --quiet . || true @echo "Audit complete" @@ -362,7 +290,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 the RSR template scaffold." exit 1 fi @@ -681,7 +609,7 @@ assail: # Self-diagnostic — checks dependencies, permissions, paths doctor: - @echo "Running diagnostics for rsr-template-repo..." + @echo "Running diagnostics for recon-silly-ation..." @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 +619,7 @@ doctor: # Guided tour of key features tour: - @echo "=== rsr-template-repo Tour ===" + @echo "=== recon-silly-ation Tour ===" @echo "" @echo "1. Project structure:" @ls -la @@ -706,12 +634,12 @@ tour: # Open feedback channel with diagnostic context help-me: - @echo "=== rsr-template-repo Help ===" + @echo "=== recon-silly-ation 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/recon-silly-ation/issues/new" @echo "" @echo "Include the output of 'just doctor' in your report." diff --git a/README.adoc b/README.adoc index 120eb39..ae193b2 100644 --- a/README.adoc +++ b/README.adoc @@ -1,52 +1,47 @@ // 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}} += recon-silly-ation :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/recon-silly-ation"] 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. -==== +WASM document reconciliation, built around the ReconForth VM. It is an +`interop` component of the `reposystem` tool ecosystem (see +`reposystem/config/tools.ncl`), exposing a `reconcile` action. == 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. +recon-silly-ation reconciles documents by running the ReconForth virtual +machine compiled to WebAssembly. It is registered in `reposystem` as an +`interop`-role tool with `status = 'extracted` (a gitlink submodule of +`reposystem`), whose sole declared action is `reconcile`. -Replace this section with a description of *your* project once initialised. +The repository is scaffolded from the *Rhodium Standard Repository (RSR)* +template, so it 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}} +git clone https://github.com/hyperpolymath/recon-silly-ation.git +cd recon-silly-ation -# 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: +# Build the Zig FFI bridge: +just build + +# 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`, diff --git a/benches/template_bench.sh b/benches/template_bench.sh deleted file mode 100755 index 5fb58a8..0000000 --- a/benches/template_bench.sh +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/bash -# 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 - -set -euo pipefail - -REPO_ROOT="${1:-.}" -OUTPUT_FORMAT="${2:-human}" # human | json | csv - -# ANSI colors -BLUE='\033[0;34m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -NC='\033[0m' # No Color - -log_info() { - echo -e "${BLUE}→${NC} $*" -} - -log_pass() { - echo -e "${GREEN}✓${NC} $*" -} - -# Ensure we have required commands -command -v /usr/bin/time >/dev/null 2>&1 || { - echo "Warning: /usr/bin/time not available, using built-in time" - TIME_CMD="time" -} - -TIME_CMD="/usr/bin/time -f %e" 2>/dev/null || TIME_CMD="time" - -echo "" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "Template 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 -#============================================================================== - -log_info "Running Zig build benchmark" - -if ! command -v zig &> /dev/null; then - echo " ⚠ Zig compiler not found - skipping Zig build benchmark" - results[zig_build]="skipped" -else - cd "$REPO_ROOT/src/interface/ffi" - - # Warm-up - zig build --summary off > /dev/null 2>&1 || true - - # Clean build - BENCH_RUNS=2 - TOTAL_TIME=0 - - for i in $(seq 1 $BENCH_RUNS); do - rm -rf zig-cache - - START=$(date +%s%N) - zig build --summary off > /dev/null 2>&1 || true - END=$(date +%s%N) - - RUN_TIME=$(( (END - START) / 1000000 )) - TOTAL_TIME=$(( TOTAL_TIME + RUN_TIME )) - - [ "$OUTPUT_FORMAT" = "human" ] && echo " Run $i: ${RUN_TIME}ms" - done - - AVG_BUILD_TIME=$(( TOTAL_TIME / BENCH_RUNS )) - results[zig_build]=$AVG_BUILD_TIME - log_pass "Zig build: ${AVG_BUILD_TIME}ms average (clean build, ${BENCH_RUNS} runs)" - - cd - > /dev/null -fi - -#============================================================================== -# BENCHMARK 3: Zig Tests -#============================================================================== - -log_info "Running Zig test benchmark" - -if ! command -v zig &> /dev/null; then - echo " ⚠ Zig compiler not found - skipping Zig test benchmark" - results[zig_test]="skipped" -else - cd "$REPO_ROOT/src/interface/ffi" - - # Warm-up - zig build test --summary off > /dev/null 2>&1 || true - - START=$(date +%s%N) - TEST_OUTPUT=$(zig build test --summary off 2>&1 || true) - END=$(date +%s%N) - - TEST_TIME=$(( (END - START) / 1000000 )) - results[zig_test]=$TEST_TIME - log_pass "Zig tests: ${TEST_TIME}ms" - - # Count tests - TEST_COUNT=$(echo "$TEST_OUTPUT" | grep -c "^test " || echo "unknown") - echo " Test count: $TEST_COUNT" - - cd - > /dev/null -fi - -#============================================================================== -# BENCHMARK 4: Workflow Validation -#============================================================================== - -log_info "Running workflow validation benchmark" - -if [ -f "$REPO_ROOT/tests/workflows/validate_workflows_test.sh" ]; then - START=$(date +%s%N) - bash "$REPO_ROOT/tests/workflows/validate_workflows_test.sh" "$REPO_ROOT/.github/workflows" > /dev/null 2>&1 || true - END=$(date +%s%N) - - WORKFLOW_TIME=$(( (END - START) / 1000000 )) - results[workflow_validation]=$WORKFLOW_TIME - 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 -#============================================================================== - -echo "" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "BENCHMARK RESULTS" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "" - -if [ "$OUTPUT_FORMAT" = "json" ]; then - echo "{" - echo " \"timestamp\": \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\"," - echo " \"repo\": \"$REPO_ROOT\"," - echo " \"results\": {" - - count=0 - for key in "${!results[@]}"; do - value="${results[$key]}" - [ $count -gt 0 ] && echo "," - if [ "$value" = "skipped" ]; then - echo -n " \"$key\": \"skipped\"" - else - echo -n " \"$key\": $value" - fi - count=$((count + 1)) - done - echo "" - echo " }" - echo "}" -elif [ "$OUTPUT_FORMAT" = "csv" ]; then - echo "metric,value_ms,timestamp" - for key in "${!results[@]}"; do - value="${results[$key]}" - if [ "$value" != "skipped" ]; then - echo "$key,$value,$(date -u +%Y-%m-%dT%H:%M:%SZ)" - fi - done -else - # Human-readable format - for key in "${!results[@]}"; do - value="${results[$key]}" - if [ "$value" = "skipped" ]; then - printf " %-30s %s\n" "$key:" "SKIPPED" - else - printf " %-30s %5d ms\n" "$key:" "$value" - fi - done -fi - -echo "" -echo "Benchmark complete." -echo "" diff --git a/build/.guix-channel b/build/.guix-channel index f9bdf68..a0ddb0f 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 recon-silly-ation ;; ;; To use this channel, add to ~/.config/guix/channels.scm: ;; ;; (channel -;; (name '{{PROJECT_NAME}}) -;; (url "https://github.com/{{OWNER}}/{{PROJECT_NAME}}") +;; (name 'recon-silly-ation) +;; (url "https://github.com/hyperpolymath/recon-silly-ation") ;; (branch "main")) ;; ;; Then: guix pull (channel (version 0) - (url "https://github.com/{{OWNER}}/{{PROJECT_NAME}}") + (url "https://github.com/hyperpolymath/recon-silly-ation") (dependencies (channel (name 'guix) diff --git a/build/Containerfile b/build/Containerfile index d7266bc..c936ba0 100644 --- a/build/Containerfile +++ b/build/Containerfile @@ -1,41 +1,26 @@ # 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 recon-silly-ation +# Build: podman build -t recon_silly_ation:latest -f Containerfile . +# Run: podman run --rm -it recon_silly_ation:latest +# Seal: selur seal recon_silly_ation:latest # --- Build stage --- FROM cgr.dev/chainguard/wolfi-base:latest AS build -# TODO: Install build dependencies for your stack -# Examples: -# RUN apk add --no-cache rust cargo # Rust -# RUN apk add --no-cache elixir erlang # Elixir -# RUN apk add --no-cache zig # Zig +RUN apk add --no-cache zig WORKDIR /build COPY . . -# TODO: Replace with your build command -# Examples: -# RUN cargo build --release -# RUN mix deps.get && MIX_ENV=prod mix release -# RUN zig build -Doptimize=ReleaseSafe +RUN cd src/interface/ffi && zig build -Doptimize=ReleaseSafe # --- Runtime stage --- 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 built FFI/WASM artifacts from the build stage +COPY --from=build /build/src/interface/ffi/zig-out/lib/ /usr/local/lib/ # Non-root user (chainguard images default to nonroot) USER nonroot - -# TODO: Replace with your entrypoint -# ENTRYPOINT ["/usr/local/bin/{{project}}"] diff --git a/build/guix.scm b/build/guix.scm index 33b1a9a..3fc6d78 100644 --- a/build/guix.scm +++ b/build/guix.scm @@ -1,24 +1,25 @@ ;; 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 recon-silly-ation ;; ;; 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. -;; See: https://guix.gnu.org/manual/en/html_node/Defining-Packages.html +;; The build/check phases below invoke the Zig FFI bridge in +;; src/interface/ffi/. See: https://guix.gnu.org/manual/en/html_node/Defining-Packages.html (use-modules (guix packages) (guix gexp) (guix git-download) (guix build-system gnu) (guix licenses) - (gnu packages base)) + (gnu packages base) + (gnu packages zig)) (package - (name "{{PROJECT_NAME}}") + (name "recon-silly-ation") (version "0.1.0") (source (local-file "." "source" #:recursive? #t @@ -28,23 +29,13 @@ (arguments '(#:phases (modify-phases %standard-phases - ;; TODO: Customize build phases for your project - ;; Examples for common stacks: - ;; - ;; Rust: - ;; (replace 'build (lambda _ (invoke "cargo" "build" "--release"))) - ;; (replace 'check (lambda _ (invoke "cargo" "test"))) - ;; - ;; Elixir: - ;; (replace 'build (lambda _ (invoke "mix" "compile"))) - ;; (replace 'check (lambda _ (invoke "mix" "test"))) - ;; - ;; Zig: - ;; (replace 'build (lambda _ (invoke "zig" "build"))) - ;; (replace 'check (lambda _ (invoke "zig" "build" "test"))) (delete 'configure) - (delete 'build) - (delete 'check) + (replace 'build + (lambda _ (with-directory-excursion "src/interface/ffi" (invoke "zig" "build")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "src/interface/ffi" (invoke "zig" "build" "test"))))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -52,20 +43,14 @@ (copy-file "README.adoc" (string-append out "/share/doc/README.adoc")))))))) (native-inputs - (list - ;; TODO: Add build-time dependencies - ;; Examples: - ;; rust (gnu packages rust) - ;; elixir (gnu packages elixir) - ;; zig (gnu packages zig) - )) + (list zig)) (inputs - (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.") + (list)) + (home-page "https://github.com/hyperpolymath/recon-silly-ation") + (synopsis "WASM document reconciliation (ReconForth VM)") + (description "recon-silly-ation reconciles documents by running the +ReconForth virtual machine compiled to WebAssembly. It is an interop +component of the reposystem tool ecosystem, exposing a reconcile action.") (license (list ;; MPL-2.0 extends MPL-2.0 mpl2.0))) diff --git a/build/setup.sh b/build/setup.sh index 24c7e5e..e2c726a 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 recon-silly-ation # # 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/recon-silly-ation/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=== recon-silly-ation 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/recon-silly-ation.git" + info "Then: cd recon-silly-ation && ./setup.sh" exit 1 fi diff --git a/container/.gatekeeper.yaml b/container/.gatekeeper.yaml index 4aac671..b7393c6 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 recon-silly-ation # # Controls which operations are permitted through the edge gateway. # This template provides moderate security defaults — not wide-open test @@ -65,9 +65,9 @@ rate_limits: trust: # Only accept .ctp bundles signed by these keys. trusted_signers: - - key_id: "{{SERVICE_NAME}}-release" + - key_id: "recon-silly-ation-release" algorithm: "Ed25519" - public_key_file: "/etc/svalinn/keys/{{SERVICE_NAME}}-release.pub" + public_key_file: "/etc/svalinn/keys/recon-silly-ation-release.pub" # Require these attestations on all .ctp bundles. required_attestations: diff --git a/container/Containerfile b/container/Containerfile index ba85260..90ebcc6 100644 --- a/container/Containerfile +++ b/container/Containerfile @@ -1,18 +1,18 @@ # SPDX-License-Identifier: MPL-2.0 -# {{PROJECT_NAME}} Container Image +# recon-silly-ation Container Image # # Multi-stage build template for Chainguard Wolfi base images. # Customise the builder stage for your language and copy the # resulting binary/release into the minimal runtime stage. # # Build with Podman: -# podman build -t {{SERVICE_NAME}}:latest -f container/Containerfile . +# podman build -t recon-silly-ation:latest -f container/Containerfile . # # Run: -# podman run -p {{PORT}}:{{PORT}} {{SERVICE_NAME}}:latest +# podman run -p 8080:8080 recon-silly-ation:latest # # Run with persistent volume: -# podman run -p {{PORT}}:{{PORT}} -v {{SERVICE_NAME}}-data:/data {{SERVICE_NAME}}:latest +# podman run -p 8080:8080 -v recon-silly-ation-data:/data recon-silly-ation:latest # ============================================================================ # Stage 1: Builder @@ -29,7 +29,7 @@ # COPY Cargo.toml Cargo.lock ./ # COPY src/ ./src/ # RUN cargo build --release -# # Output: /build/target/release/{{SERVICE_NAME}} +# # Output: /build/target/release/recon-silly-ation # # --- Elixir --- # RUN apk add --no-cache erl27-elixir-1.18 erlang-27 erlang-27-dev git build-base @@ -39,14 +39,14 @@ # ENV MIX_ENV=prod # RUN mix local.hex --force && mix local.rebar --force && \ # mix deps.get --only prod && mix compile && mix release -# # Output: /build/_build/prod/rel/{{SERVICE_NAME}}/ +# # Output: /build/_build/prod/rel/recon-silly-ation/ # # --- Zig --- # RUN apk add --no-cache zig build-base # COPY build.zig build.zig.zon ./ # COPY src/ ./src/ # RUN zig build -Doptimize=ReleaseFast -# # Output: /build/zig-out/bin/{{SERVICE_NAME}} +# # Output: /build/zig-out/bin/recon-silly-ation # FROM cgr.dev/chainguard/wolfi-base:latest AS builder @@ -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="recon-silly-ation" \ + org.opencontainers.image.description="WASM document reconciliation (ReconForth VM)." \ + org.opencontainers.image.url="https://github.com/hyperpolymath/recon-silly-ation" \ + org.opencontainers.image.source="https://github.com/hyperpolymath/recon-silly-ation" \ + 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" @@ -96,9 +96,9 @@ WORKDIR /app # TODO: Copy compiled binary/release from builder stage. # Examples: -# COPY --from=builder /build/target/release/{{SERVICE_NAME}} /app/{{SERVICE_NAME}} -# COPY --from=builder /build/_build/prod/rel/{{SERVICE_NAME}} /app/release/ -# COPY --from=builder /build/zig-out/bin/{{SERVICE_NAME}} /app/{{SERVICE_NAME}} +# COPY --from=builder /build/target/release/recon-silly-ation /app/recon-silly-ation +# COPY --from=builder /build/_build/prod/rel/recon-silly-ation /app/release/ +# COPY --from=builder /build/zig-out/bin/recon-silly-ation /app/recon-silly-ation # Copy entrypoint script COPY container/entrypoint.sh /app/entrypoint.sh @@ -116,7 +116,7 @@ RUN chown -R appuser:appuser /app # Environment variables — customise for your application ENV APP_HOST=[::] -ENV APP_PORT={{PORT}} +ENV APP_PORT=8080 ENV APP_LOG_FORMAT=json ENV APP_DATA_DIR=/data @@ -127,7 +127,7 @@ VOLUME ["/data"] USER appuser # Expose the application port -EXPOSE {{PORT}} +EXPOSE 8080 # Health check — the application must respond 2xx at /health HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ diff --git a/container/README.adoc b/container/README.adoc index 78275d2..e8e1a02 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 += recon-silly-ation Container Templates :toc: left :toclevels: 3 :sectnums: diff --git a/container/compose.toml b/container/compose.toml index a14f8a0..6ed18e6 100644 --- a/container/compose.toml +++ b/container/compose.toml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: MPL-2.0 # -# {{PROJECT_NAME}} selur-compose configuration +# recon-silly-ation selur-compose configuration # # Orchestrates the container stack as verified container bundles (.ctp). # Uses selur zero-copy IPC between services on the same host. @@ -10,7 +10,7 @@ # selur-compose up --detach # Start in background # selur-compose verify # Verify all .ctp signatures # selur-compose ps # Check status -# selur-compose logs -f {{SERVICE_NAME}} # Stream logs +# selur-compose logs -f recon-silly-ation # Stream logs # selur-compose down # Stop all services # # Fallback (when selur is not installed): @@ -23,30 +23,30 @@ version = "1.0" # ============================================================================ # Primary application service -[services.{{SERVICE_NAME}}] -image = "{{REGISTRY}}/{{SERVICE_NAME}}:latest.ctp" -ports = ["{{PORT}}:{{PORT}}"] +[services.recon-silly-ation] +image = "ghcr.io/hyperpolymath/recon-silly-ation:latest.ctp" +ports = ["8080:8080"] environment = { APP_HOST = "[::]", - APP_PORT = "{{PORT}}", + APP_PORT = "8080", APP_LOG_FORMAT = "json", APP_DATA_DIR = "/data", } -volumes = ["{{SERVICE_NAME}}-data:/data"] +volumes = ["recon-silly-ation-data:/data"] restart = "always" -healthcheck = { test = "curl -sf http://localhost:{{PORT}}/health", interval = "30s", timeout = "5s", retries = 3 } +healthcheck = { test = "curl -sf http://localhost:8080/health", interval = "30s", timeout = "5s", retries = 3 } # Svalinn edge gateway: validates requests, enforces policies, TLS termination [services.svalinn] image = "ghcr.io/hyperpolymath/svalinn:latest.ctp" ports = ["443:443", "80:80"] environment = { - SVALINN_BACKEND = "http://{{SERVICE_NAME}}:{{PORT}}", + SVALINN_BACKEND = "http://recon-silly-ation:8080", SVALINN_POLICY_FILE = "/etc/svalinn/gatekeeper.yaml", SVALINN_TLS_AUTO = "true", } volumes = ["svalinn-config:/etc/svalinn:ro"] -depends_on = ["{{SERVICE_NAME}}"] +depends_on = ["recon-silly-ation"] restart = "always" healthcheck = { test = "curl -sf http://localhost:80/health", interval = "30s", timeout = "5s", retries = 3 } @@ -54,7 +54,7 @@ healthcheck = { test = "curl -sf http://localhost:80/health", interval = "30s", # Volumes # ============================================================================ -[volumes.{{SERVICE_NAME}}-data] +[volumes.recon-silly-ation-data] driver = "local" [volumes.svalinn-config] diff --git a/container/ct-build.sh b/container/ct-build.sh index a54a541..34c6b49 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 +# recon-silly-ation — 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 @@ -18,8 +18,8 @@ # CT_KEY_ID=my-key ./ct-build.sh # Use specific signing key # # Environment variables: -# CT_KEY_ID — Signing key identifier (default: {{SERVICE_NAME}}-release) -# CT_REGISTRY — OCI registry to push to (default: {{REGISTRY}}) +# CT_KEY_ID — Signing key identifier (default: recon-silly-ation-release) +# CT_REGISTRY — OCI registry to push to (default: ghcr.io/hyperpolymath) # CT_TAG — Image tag (default: latest) set -euo pipefail @@ -38,15 +38,15 @@ for arg in "$@"; do fi done -CT_KEY_ID="${CT_KEY_ID:-{{SERVICE_NAME}}-release}" -CT_REGISTRY="${CT_REGISTRY:-{{REGISTRY}}}" +CT_KEY_ID="${CT_KEY_ID:-recon-silly-ation-release}" +CT_REGISTRY="${CT_REGISTRY:-ghcr.io/hyperpolymath}" CT_TAG="${CT_TAG:-latest}" -IMAGE_NAME="{{SERVICE_NAME}}" +IMAGE_NAME="recon-silly-ation" 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 "=== recon-silly-ation 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..5f7604f 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 — recon-silly-ation deployment component (Hunt level) # # k9-svc deployment specification with full pedigree (L1-L5). # Security Level: 'Hunt (requires cryptographic handshake for execution). @@ -18,11 +18,11 @@ let component_pedigree = { # L1: The Snout — Identity # ───────────────────────────────────────────────────────────── metadata = { - name = "{{SERVICE_NAME}}-deploy", - version = "{{VERSION}}", + name = "recon-silly-ation-deploy", + version = "0.1.0", breed = "application/vnd.k9+nickel", magic_number = "K9!", - description = "{{PROJECT_NAME}} deployment component (Hunt level)", + description = "recon-silly-ation deployment component (Hunt level)", }, # ───────────────────────────────────────────────────────────── @@ -93,8 +93,8 @@ let deployment = { # Container configuration container = { - image = "{{REGISTRY}}/{{SERVICE_NAME}}", - port = {{PORT}}, + image = "ghcr.io/hyperpolymath/recon-silly-ation", + port = 8080, health_check = "/health", readiness_check = "/ready", }, @@ -113,7 +113,7 @@ let scripts = { pre_deploy = m%" #!/bin/sh set -eu -echo "K9: Pre-deployment validation for {{SERVICE_NAME}}..." +echo "K9: Pre-deployment validation for recon-silly-ation..." cd container && selur-compose verify || podman compose --file compose.toml config echo "K9: Validation passed." "%, @@ -123,7 +123,7 @@ echo "K9: Validation passed." #!/bin/sh set -eu ENV="${1:-dev}" -echo "K9: Deploying {{SERVICE_NAME}} to $ENV environment..." +echo "K9: Deploying recon-silly-ation to $ENV environment..." cd container ./ct-build.sh selur-compose up --detach || podman compose --file compose.toml up --detach @@ -134,7 +134,7 @@ echo "K9: Deployment to $ENV complete." rollback = m%" #!/bin/sh set -eu -echo "K9: Rolling back {{SERVICE_NAME}} deployment..." +echo "K9: Rolling back recon-silly-ation deployment..." cd container selur-compose down || podman compose --file compose.toml down echo "K9: Rollback complete." diff --git a/container/entrypoint.sh b/container/entrypoint.sh index a7a0369..31330c5 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 +# recon-silly-ation container entrypoint # # Handles signal propagation, startup logging, and health check # preparation before exec-ing into the main application process. @@ -15,7 +15,7 @@ set -e # when Podman sends stop signals (e.g. `podman stop`, `selur-compose down`). cleanup() { - echo "Received shutdown signal — stopping {{SERVICE_NAME}}..." + echo "Received shutdown signal — stopping recon-silly-ation..." # If the main process is backgrounded, kill it here: # kill "$MAIN_PID" 2>/dev/null || true # wait "$MAIN_PID" 2>/dev/null || true @@ -27,9 +27,9 @@ trap cleanup TERM INT # Startup logging # --------------------------------------------------------------------------- -echo "Starting {{SERVICE_NAME}}..." +echo "Starting recon-silly-ation..." echo " Host: ${APP_HOST:-[::]}" -echo " Port: ${APP_PORT:-{{PORT}}}" +echo " Port: ${APP_PORT:-8080}" echo " Data: ${APP_DATA_DIR:-/data}" echo " Log: ${APP_LOG_FORMAT:-json}" @@ -56,8 +56,8 @@ fi # # TODO: Replace the command below with your application binary. # Examples: -# exec /app/{{SERVICE_NAME}} -# exec /app/release/bin/{{SERVICE_NAME}} start -# exec /app/{{SERVICE_NAME}} serve --host "${APP_HOST}" --port "${APP_PORT}" +# exec /app/recon-silly-ation +# exec /app/release/bin/recon-silly-ation start +# exec /app/recon-silly-ation serve --host "${APP_HOST}" --port "${APP_PORT}" exec "$@" diff --git a/container/manifest.toml b/container/manifest.toml index f55fcb3..6be9af8 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 recon-silly-ation .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}}" +name = "recon-silly-ation" +version = "0.1.0" revision = 1 -summary = "{{PROJECT_DESCRIPTION}}" +summary = "WASM document reconciliation (ReconForth VM)." description = """ -{{PROJECT_NAME}} — containerised service packaged as a verified +recon-silly-ation — 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/recon-silly-ation" +maintainer = "Jonathan D.A. Jewell " [provenance] -upstream = "https://{{FORGE}}/{{OWNER}}/{{REPO}}" -import_date = {{CURRENT_DATE}}T00:00:00Z +upstream = "https://github.com/hyperpolymath/recon-silly-ation" +import_date = 2026-07-27T00:00:00Z [dependencies] runtime = ["ca-certificates", "curl"] @@ -32,10 +32,10 @@ system = "podman" [build.environment] APP_HOST = "[::]" -APP_PORT = "{{PORT}}" +APP_PORT = "8080" [outputs] -primary = "{{SERVICE_NAME}}" +primary = "recon-silly-ation" split = [] [attestations] @@ -54,7 +54,7 @@ drop = ["ALL"] add = ["NET_BIND_SERVICE"] [security.network] -listen_tcp = [{{PORT}}] +listen_tcp = [8080] [security.filesystem] read = ["/app/", "/data/"] diff --git a/container/vordr.toml b/container/vordr.toml index af38fc5..566196e 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 recon-silly-ation # # Vordr watches container health, detects crashes, tracks resource usage, # and emits structured logs. It runs alongside the application stack and @@ -12,8 +12,8 @@ # vordr report [metadata] -name = "{{SERVICE_NAME}}" -version = "{{VERSION}}" +name = "recon-silly-ation" +version = "0.1.0" # ============================================================================ # Health Monitoring @@ -25,13 +25,13 @@ version = "{{VERSION}}" [health] # Primary health endpoint — must return 2xx. -endpoint = "http://localhost:{{PORT}}/health" +endpoint = "http://localhost:8080/health" interval = "30s" timeout = "5s" failure_threshold = 3 # Readiness endpoint — checked during startup and after restarts. -readiness_endpoint = "http://localhost:{{PORT}}/ready" +readiness_endpoint = "http://localhost:8080/ready" readiness_timeout = "10s" # Action on failure: "alert" (log + notify) or "restart" (alert + podman restart). @@ -79,7 +79,7 @@ format = "json" level = "info" # Write vordr logs to stdout (captured by Podman) and optionally to file. output = "stdout" -# file = "/var/log/vordr/{{SERVICE_NAME}}.log" +# file = "/var/log/vordr/recon-silly-ation.log" # ============================================================================ # Notifications (optional) @@ -94,7 +94,7 @@ output = "stdout" # on = ["failure", "recovery", "resource_critical"] # [notifications.email] -# to = "{{EMAIL}}" -# from = "vordr@{{SERVICE_NAME}}.local" +# to = "j.d.a.jewell@open.ac.uk" +# from = "vordr@recon-silly-ation.local" # smtp = "smtp://localhost:25" # on = ["failure", "resource_critical"] diff --git a/docs/QUICKSTART.adoc b/docs/QUICKSTART.adoc index 754fd5e..f72fe10 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/rsr-template-repo 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..ed976b1 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: recon-silly-ation ## Document Info | Field | Value | |---------------|--------------------------------| -| Project | {{PROJECT_NAME}} | +| Project | recon-silly-ation | | 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 recon-silly-ation 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..50e319f 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: "recon-silly-ation" 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/recon-silly-ation" +repository-code: "https://github.com/hyperpolymath/recon-silly-ation" license: MPL-2.0 keywords: - "rsr" diff --git a/docs/attribution/CITATIONS.adoc b/docs/attribution/CITATIONS.adoc index 0a8b419..fd7ab98 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 += recon-silly-ation - 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{recon-silly-ation_2026, + author = {Jewell, Jonathan}, + title = {recon-silly-ation}, + year = {2026}, + url = {https://github.com/hyperpolymath/recon-silly-ation}, 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, JDAJ (2026) _recon-silly-ation_ [Computer software]. Available at: https://github.com/hyperpolymath/recon-silly-ation == OSCOLA -{{AUTHOR}}, '{{PROJECT_NAME}}' ({{CURRENT_YEAR}}) +Jonathan D.A. Jewell, 'recon-silly-ation' (2026) == MLA -{{AUTHOR_LAST}}, {{AUTHOR_FIRST}} "{{PROJECT_NAME}}." {{CURRENT_YEAR}}, github.com/{{OWNER}}/{{PROJECT_NAME}}. +Jewell, Jonathan "recon-silly-ation." 2026, github.com/hyperpolymath/recon-silly-ation. == APA 7 -{{AUTHOR_LAST}}, {{AUTHOR_INITIALS}} ({{CURRENT_YEAR}}). _{{PROJECT_NAME}}_ [Computer software]. GitHub. https://github.com/{{OWNER}}/{{PROJECT_NAME}} +Jewell, JDAJ (2026). _recon-silly-ation_ [Computer software]. GitHub. https://github.com/hyperpolymath/recon-silly-ation == 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/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..cf30c67 100644 --- a/docs/developer/ABI-FFI-README.adoc +++ b/docs/developer/ABI-FFI-README.adoc @@ -1,9 +1,8 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell = ABI/FFI Standards -{{~ Aditionally delete this line and fill out the template below ~}} -# {{PROJECT}} ABI/FFI Documentation +# recon-silly-ation ABI/FFI Documentation ## Overview @@ -29,7 +28,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: ▼ ┌─────────────────────────────────────────────┐ │ C Headers (auto-generated) │ -│ generated/abi/{{project}}.h │ +│ generated/abi/recon_silly_ation.h │ └─────────────────┬───────────────────────────┘ │ │ imported by @@ -42,7 +41,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 librecon_silly_ation.so/.a ▼ ┌─────────────────────────────────────────────┐ │ Any Language via C ABI │ @@ -53,7 +52,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: ## Directory Structure ``` -{{project}}/ +recon_silly_ation/ ├── src/ │ ├── abi/ # ABI definitions (Idris2) │ │ ├── Types.idr # Core type definitions with proofs @@ -70,11 +69,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) +│ └── recon_silly_ation.h # C header (optional, can be generated) │ ├── generated/ # Auto-generated files │ └── abi/ -│ └── {{project}}.h # Generated from Idris2 ABI +│ └── recon_silly_ation.h # Generated from Idris2 ABI │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ @@ -202,7 +201,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/recon_silly_ation.h ``` ### Cross-Compile @@ -225,32 +224,32 @@ zig build -Dtarget=x86_64-windows ### From C ```c -#include "{{project}}.h" +#include "recon_silly_ation.h" int main() { - void* handle = {{project}}_init(); + void* handle = recon_silly_ation_init(); if (!handle) return 1; - int result = {{project}}_process(handle, 42); + int result = recon_silly_ation_process(handle, 42); if (result != 0) { - const char* err = {{project}}_last_error(); + const char* err = recon_silly_ation_last_error(); fprintf(stderr, "Error: %s\n", err); } - {{project}}_free(handle); + recon_silly_ation_free(handle); return 0; } ``` Compile with: ```bash -gcc -o example example.c -l{{project}} -L./zig-out/lib +gcc -o example example.c -lrecon_silly_ation -L./zig-out/lib ``` ### From Idris2 ```idris -import {{PROJECT}}.ABI.Foreign +import ReconSillyAtion.ABI.Foreign main : IO () main = do @@ -267,22 +266,22 @@ main = do ### From Rust ```rust -#[link(name = "{{project}}")] +#[link(name = "recon_silly_ation")] 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 recon_silly_ation_init() -> *mut std::ffi::c_void; + fn recon_silly_ation_free(handle: *mut std::ffi::c_void); + fn recon_silly_ation_process(handle: *mut std::ffi::c_void, input: u32) -> i32; } fn main() { unsafe { - let handle = {{project}}_init(); + let handle = recon_silly_ation_init(); assert!(!handle.is_null()); - let result = {{project}}_process(handle, 42); + let result = recon_silly_ation_process(handle, 42); assert_eq!(result, 0); - {{project}}_free(handle); + recon_silly_ation_free(handle); } } ``` @@ -290,21 +289,21 @@ fn main() { ### From Julia ```julia -const lib{{project}} = "lib{{project}}" +const librecon_silly_ation = "librecon_silly_ation" function init() - handle = ccall((:{{project}}_init, lib{{project}}), Ptr{Cvoid}, ()) + handle = ccall((:recon_silly_ation_init, librecon_silly_ation), 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((:recon_silly_ation_process, librecon_silly_ation), Cint, (Ptr{Cvoid}, UInt32), handle, input) result end function cleanup(handle) - ccall((:{{project}}_free, lib{{project}}), Cvoid, (Ptr{Cvoid},), handle) + ccall((:recon_silly_ation_free, librecon_silly_ation), Cvoid, (Ptr{Cvoid},), handle) end # Usage @@ -358,7 +357,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/recon_silly_ation.h ``` 3. **Update FFI implementation** (`ffi/zig/src/main.zig`) @@ -377,10 +376,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/onboarding/QUICKSTART-DEV.adoc b/docs/onboarding/QUICKSTART-DEV.adoc index 5be2757..48dc415 100644 --- a/docs/onboarding/QUICKSTART-DEV.adoc +++ b/docs/onboarding/QUICKSTART-DEV.adoc @@ -1,14 +1,12 @@ // 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 += recon-silly-ation — Quick Start for Developers :toc: :toclevels: 2 == Tech Stack -{{LANG_STACK}} +Zig (FFI bridge, `src/interface/ffi/`), Idris2 (ABI definitions, `abi.ipkg`) == Set Up Development Environment @@ -30,8 +28,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/recon-silly-ation.git +cd recon-silly-ation just setup-dev ---- @@ -39,21 +37,21 @@ just setup-dev [source,bash] ---- -{{BUILD_CMD}} +cd src/interface/ffi && zig build ---- == Test [source,bash] ---- -{{TEST_CMD}} +cd src/interface/ffi && zig build test ---- == Project Structure [source] ---- -rsr-template-repo/ +recon-silly-ation/ ├── src/ # Source code ├── src/abi/ # Idris2 ABI definitions (if applicable) ├── ffi/zig/ # Zig FFI bridge (if applicable) @@ -89,10 +87,9 @@ just panic-scan # No new security issues == Contractile Invariants -Read `.machine_readable/MUST.contractile` before making changes. -Key invariants that must never be violated: - -{{MUST_INVARIANTS}} +Read `.machine_readable/contractiles/Mustfile.a2ml` before making changes. +It enumerates the hard gates (SPDX headers, no unsubstituted `{{...}}` +placeholders, licence consistency) that must never be violated. == LLM/AI Agent Development @@ -108,5 +105,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/recon-silly-ation/wiki * **Report issue**: `just help-me` diff --git a/docs/onboarding/QUICKSTART-MAINTAINER.adoc b/docs/onboarding/QUICKSTART-MAINTAINER.adoc index 9e6039e..cc808e0 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 += recon-silly-ation — Quick Start for Platform Maintainers :toc: :toclevels: 2 == Overview -This guide covers packaging, deploying, and maintaining rsr-template-repo for -distribution on your platform. +This guide covers packaging, deploying, and maintaining recon-silly-ation +(WASM document reconciliation via the ReconForth VM) for distribution on +your platform. == Runtime Dependencies -{{DEPS}} +Zig 0.16.0 toolchain (build-time); a WASM-capable runtime at execution time. +Idris2 is only needed if regenerating the ABI headers from `abi.ipkg`. == 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/recon-silly-ation.git +cd recon-silly-ation just build-release ---- -Output: `{{BUILD_OUTPUT_PATH}}` +Output: `src/interface/ffi/zig-out/` == Packaging @@ -47,7 +47,7 @@ nix build [source,bash] ---- just stapeln-export # Generates Containerfile -podman build -t rsr-template-repo . +podman build -t recon-silly-ation . ---- === Manual Package @@ -66,10 +66,10 @@ Files installed: | `$PREFIX/bin/` | Executables -| `$PREFIX/share/{{PACKAGE_NAME}}/` +| `$PREFIX/share/recon_silly_ation/` | Data files, assets -| `$PREFIX/share/doc/{{PACKAGE_NAME}}/` +| `$PREFIX/share/doc/recon_silly_ation/` | Documentation | `$PREFIX/share/applications/` @@ -81,17 +81,19 @@ Files installed: == Configuration -Default config location: `$XDG_CONFIG_HOME/{{PACKAGE_NAME}}/config.toml` +Default config location: `$XDG_CONFIG_HOME/recon_silly_ation/config.toml` -Fallback: `$HOME/.config/{{PACKAGE_NAME}}/config.toml` +Fallback: `$HOME/.config/recon_silly_ation/config.toml` == Health Checks +recon-silly-ation is an FFI/WASM library (the ReconForth VM), not a +standalone executable, so there is no `just run`. Use: + [source,bash] ---- just doctor # Full diagnostic -just run --version # Version check -just run --selftest # Built-in self-test +just test # Runs the Zig FFI test suite (zig build test) ---- == Updating @@ -103,7 +105,7 @@ just build-release just install --prefix=/usr/local ---- -Or via OPSM: `opsm update {{PACKAGE_NAME}}` +Or via OPSM: `opsm update recon_silly_ation` == Security Notes @@ -118,13 +120,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/recon_silly_ation-instance1 --config=/etc/recon_silly_ation/instance1.toml +just install --prefix=/opt/recon_silly_ation-instance2 --config=/etc/recon_silly_ation/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/recon-silly-ation/issues * With diagnostic: `just help-me` (pre-fills context) 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..6252911 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: @@ -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/status/PROOF-NEEDS.adoc b/docs/status/PROOF-NEEDS.adoc index 96b529d..b042c77 100644 --- a/docs/status/PROOF-NEEDS.adoc +++ b/docs/status/PROOF-NEEDS.adoc @@ -2,7 +2,7 @@ // Copyright (c) Jonathan D.A. Jewell // Template: rsr-template-repo/docs/status/PROOF-NEEDS.adoc // Authoritative master list: ~/Desktop/PROOF-REQUIREMENTS-MASTER.adoc -= Proof Requirements — {{PROJECT}} += Proof Requirements — recon-silly-ation == Proof Tier diff --git a/docs/status/PROOF-STATUS.adoc b/docs/status/PROOF-STATUS.adoc index aca702c..84bd10b 100644 --- a/docs/status/PROOF-STATUS.adoc +++ b/docs/status/PROOF-STATUS.adoc @@ -2,7 +2,7 @@ // Copyright (c) Jonathan D.A. Jewell // Template: rsr-template-repo/docs/status/PROOF-STATUS.adoc // Tracks proof completion. Requirements defined in PROOF-NEEDS.adoc -= Proof Status — {{PROJECT}} += Proof Status — recon-silly-ation == Summary diff --git a/docs/status/READINESS.adoc b/docs/status/READINESS.adoc index 5a6bd02..5919997 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 += recon-silly-ation 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: __. diff --git a/docs/status/TEST-NEEDS.adoc b/docs/status/TEST-NEEDS.adoc index 59fbf85..2151132 100644 --- a/docs/status/TEST-NEEDS.adoc +++ b/docs/status/TEST-NEEDS.adoc @@ -1,118 +1,49 @@ // SPDX-License-Identifier: CC-BY-SA-4.0 // Copyright (c) Jonathan D.A. Jewell -= TEST-NEEDS: rsr-template-repo += TEST-NEEDS: recon-silly-ation -== CRG Grade: C — ACHIEVED 2026-04-04 +== Current State (Updated 2026-07-27) -== Current State (Updated 2026-04-04) +recon-silly-ation was instantiated from `rsr-template-repo`. This document +previously described the *template's own* test suite for validating +instantiation itself (placeholder substitution, `just init`, etc.) — that +machinery has now been removed as no longer applicable: + +* `scripts/validate-template.sh` — removed (validated an un-instantiated template) +* `tests/e2e/template_instantiation_test.sh` — removed (tested the `just init` workflow) +* `benches/template_bench.sh` — removed (benchmarked template validation, not this project) [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 +| *Source modules* | 6 | 3 Idris2 ABI (Foreign, Layout, Types), 2 Zig FFI (build, main), 1 Zig integration test +| *Unit tests* | 0 | None in main source (inline tests in main.zig, if any) +| *Integration tests* | 1 | `src/interface/ffi/test/integration_test.zig` — still template-shaped (see below) +| *E2E tests* | 1 | `tests/e2e.sh` — banner + mostly-commented example matrix, not yet wired to real ReconForth flows +| *Aspect tests* | 1 | `tests/aspect_tests.sh` — cross-cutting invariant checks +| *Workflow tests* | 1 | `tests/workflows/validate_workflows_test.sh` — validates GitHub Actions workflow structure |=== -== 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) +== Known Gaps -=== Benchmarks ✅ +* [ ] `src/interface/ffi/test/integration_test.zig` still contains the + template's documentation-only test stubs (`extern fn mylib_init()` etc. + are commented out). It needs real test bodies linked against the + `recon_silly_ation_*` FFI functions in `src/interface/ffi/src/main.zig`. +* [ ] `tests/e2e.sh` has a real banner and structure but its actual + assertions are still example/commented-out matrix entries — it does not + yet exercise a real ReconForth reconciliation round-trip. +* [ ] No fuzz harness is wired up yet (see `benches/` history above). -* [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) +== CRG Notes -=== 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) +* *Author Attribution*: Jonathan D.A. Jewell -* [ ] 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 +== Next Steps -== Priority: P0 (COMPLETE) ✅ +* [ ] Give `integration_test.zig` real test bodies against the FFI surface. +* [ ] Wire `tests/e2e.sh` to a real ReconForth reconcile round-trip via the + WASM build. +* [ ] Integrate `just test` / `just e2e` / `just aspect` into CI. 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/scripts/check-root-shape.sh b/scripts/check-root-shape.sh index 8f75343..a75b5e2 100644 --- a/scripts/check-root-shape.sh +++ b/scripts/check-root-shape.sh @@ -5,9 +5,6 @@ # check-root-shape.sh — fail when the repository root contains entries that # are not on the canonical allowlist (.machine_readable/root-allow.txt). # -# Companion to scripts/validate-template.sh: that script enforces required -# files; this one enforces that nothing else has crept in. -# # Exit codes: # 0 — root matches allowlist # 1 — extras found at root (drift) diff --git a/scripts/validate-template.sh b/scripts/validate-template.sh deleted file mode 100755 index f54b899..0000000 --- a/scripts/validate-template.sh +++ /dev/null @@ -1,384 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: MPL-2.0 -# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) -# -# RSR Template Validation Script -# Verifies that a repository follows the RSR template structure and contains all required files -# -# Exit codes: -# 0 = validation passed -# 1 = validation failed with errors -# 2 = validation failed with warnings (but can proceed) - -set -euo pipefail - -REPO_ROOT="${1:-.}" -VERBOSE="${2:-0}" -ERRORS=0 -WARNINGS=0 - -# 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_error() { - echo -e "${RED}ERROR${NC}: $*" >&2 - ERRORS=$((ERRORS + 1)) -} - -log_warning() { - echo -e "${YELLOW}WARN${NC}: $*" >&2 - WARNINGS=$((WARNINGS + 1)) -} - -log_info() { - echo -e "${BLUE}INFO${NC}: $*" >&2 -} - -log_pass() { - echo -e "${GREEN}PASS${NC}: $*" >&2 -} - -check_file_exists() { - local file="$1" - local description="${2:-}" - if [ -f "$REPO_ROOT/$file" ]; then - [ "$VERBOSE" = "1" ] && log_pass "File exists: $file" - return 0 - else - log_error "Required file missing: $file ${description:+(${description})}" - return 1 - fi -} - -check_dir_exists() { - local dir="$1" - local description="${2:-}" - if [ -d "$REPO_ROOT/$dir" ]; then - [ "$VERBOSE" = "1" ] && log_pass "Directory exists: $dir" - return 0 - else - log_error "Required directory missing: $dir ${description:+(${description})}" - return 1 - fi -} - -# Case-tolerant ABI seam checks: accept the canonical case-consistent -# src/interface/Abi/ (matches `module Abi.*`) OR a lowercase src/interface/abi/ -# that some downstream repos ship. Never require BOTH (that would be a case-fold -# collision on case-insensitive filesystems). -check_abi_dir_exists() { - local description="${1:-}" - if [ -d "$REPO_ROOT/src/interface/Abi" ] || [ -d "$REPO_ROOT/src/interface/abi" ]; then - [ "$VERBOSE" = "1" ] && log_pass "Directory exists: src/interface/{Abi,abi}" - return 0 - fi - log_error "Required directory missing: src/interface/Abi ${description:+(${description})}" - return 1 -} -check_abi_file_exists() { - local fname="$1" - local description="${2:-}" - if [ -f "$REPO_ROOT/src/interface/Abi/$fname" ] || [ -f "$REPO_ROOT/src/interface/abi/$fname" ]; then - [ "$VERBOSE" = "1" ] && log_pass "File exists: src/interface/{Abi,abi}/$fname" - return 0 - fi - log_error "Required file missing: src/interface/Abi/$fname ${description:+(${description})}" - return 1 -} - -has_spdx_header() { - local file="$1" - if head -10 "$file" | grep -q "SPDX-License-Identifier"; then - return 0 - fi - return 1 -} - -has_placeholder() { - local file="$1" - if grep -q "{{REPO\|{{OWNER\|{{FORGE\|{{PROJECT\|{{project\|{{AUTHOR" "$file" 2>/dev/null; then - return 0 - fi - return 1 -} - -#============================================================================== -# VALIDATION PHASE 1: CORE STRUCTURE -#============================================================================== - -echo "" -log_info "Phase 1: Core repository structure" -echo "" - -# Root files -check_file_exists "0-AI-MANIFEST.a2ml" "AI manifest (universal entry point)" -check_file_exists "README.adoc" "High-level pitch" -check_file_exists "EXPLAINME.adoc" "Developer deep-dive" -check_file_exists "LICENSE" "License file" -check_file_exists "Justfile" "Task runner" -check_file_exists "AUDIT.adoc" "Release audit gate" - -# Directories -check_dir_exists ".machine_readable" "Machine-readable metadata" -check_dir_exists ".github" "GitHub community metadata" -check_abi_dir_exists "Idris2 ABI definitions" -check_dir_exists "src/interface/ffi" "Zig FFI implementation" -check_dir_exists "src/interface/generated/abi" "Generated C headers" -check_dir_exists "docs" "Documentation" - -#============================================================================== -# VALIDATION PHASE 2: MACHINE-READABLE METADATA -#============================================================================== - -echo "" -log_info "Phase 2: Machine-readable metadata (.machine_readable/)" -echo "" - -check_file_exists ".machine_readable/6a2/STATE.a2ml" "Project state" -check_file_exists ".machine_readable/6a2/META.a2ml" "Architecture decisions" -check_file_exists ".machine_readable/6a2/ECOSYSTEM.a2ml" "Ecosystem position" -check_file_exists ".machine_readable/6a2/anchors/ANCHOR.a2ml" "Semantic boundary anchor" -check_file_exists ".machine_readable/policies/MAINTENANCE-AXES.a2ml" "Maintenance axes" - -#============================================================================== -# VALIDATION PHASE 3: REQUIRED WORKFLOWS (17 minimum) -#============================================================================== - -echo "" -log_info "Phase 3: GitHub Actions workflows" -echo "" - -REQUIRED_WORKFLOWS=( - "hypatia-scan.yml" - "codeql.yml" - "scorecard.yml" - "quality.yml" - "mirror.yml" - "instant-sync.yml" - "guix-nix-policy.yml" - "rsr-antipattern.yml" - "security-policy.yml" - "wellknown-enforcement.yml" - "workflow-linter.yml" - "npm-bun-blocker.yml" - "ts-blocker.yml" - "scorecard-enforcer.yml" - "secret-scanner.yml" -) - -# Check required workflows -for workflow in "${REQUIRED_WORKFLOWS[@]}"; do - if [ -f "$REPO_ROOT/.github/workflows/$workflow" ]; then - [ "$VERBOSE" = "1" ] && log_pass "Workflow found: $workflow" - else - log_error "Required workflow missing: $workflow" - fi -done - -# Verify all workflows have SPDX headers and proper structure -WORKFLOW_FILES=$(find "$REPO_ROOT/.github/workflows" -name "*.yml" -type f 2>/dev/null || true) -WORKFLOW_COUNT=$(echo "$WORKFLOW_FILES" | grep -c "." || true) - -if [ "$WORKFLOW_COUNT" -ge 15 ]; then - log_pass "Found $WORKFLOW_COUNT workflows (>= 15 expected)" -else - log_warning "Found only $WORKFLOW_COUNT workflows (expected >= 15)" -fi - -# Spot-check workflow files for issues -while IFS= read -r workflow_file; do - if [ -z "$workflow_file" ]; then continue; fi - - # Check for SPDX header (optional in YAML workflows, but best practice) - if ! head -5 "$workflow_file" | grep -q "SPDX-License-Identifier"; then - log_warning "Workflow missing SPDX header: $(basename "$workflow_file")" - fi - - # Check for proper YAML structure - if ! grep -q "^name:" "$workflow_file"; then - log_error "Workflow missing 'name' field: $(basename "$workflow_file")" - fi -done <<< "$WORKFLOW_FILES" - -#============================================================================== -# VALIDATION PHASE 4: ABI/FFI SOURCE FILES -#============================================================================== - -echo "" -log_info "Phase 4: Idris2 ABI and Zig FFI source files" -echo "" - -# Idris2 ABI files -check_abi_file_exists "Types.idr" "Core type definitions" -check_abi_file_exists "Layout.idr" "Memory layout specifications" -check_abi_file_exists "Foreign.idr" "FFI foreign declarations" - -# Zig FFI files -check_file_exists "src/interface/ffi/build.zig" "Zig build configuration" -check_file_exists "src/interface/ffi/src/main.zig" "Zig implementation" -check_file_exists "src/interface/ffi/test/integration_test.zig" "Integration tests" - -#============================================================================== -# VALIDATION PHASE 5: PLACEHOLDER TOKENS -#============================================================================== - -echo "" -log_info "Phase 5: Placeholder token replacement (skipped in template repo)" -echo "" - -# Note: Template repo is allowed to have placeholders -# For derived repos, we'd check that placeholders are replaced -if [ "$(basename "$REPO_ROOT")" = "rsr-template-repo" ]; then - log_pass "Skipping placeholder check for template repo" -else - # Check that key files don't have unresolved placeholders - for file in "$REPO_ROOT/README.adoc" "$REPO_ROOT/Justfile" "$REPO_ROOT/.machine_readable/6a2/STATE.a2ml"; do - if [ -f "$file" ]; then - if has_placeholder "$file"; then - log_warning "File contains unresolved placeholders: $(basename "$file")" - fi - fi - done -fi - -#============================================================================== -# VALIDATION PHASE 6: SPDX LICENSE HEADERS -#============================================================================== - -echo "" -log_info "Phase 6: SPDX License Headers" -echo "" - -# Check source files for SPDX headers (excluding build artifacts) -SOURCE_FILES=$(find "$REPO_ROOT/src" -type f \( -name "*.idr" -o -name "*.zig" \) \ - ! -path "*/.zig-cache/*" ! -path "*/zig-cache/*" 2>/dev/null || true) -SOURCE_COUNT=$(echo "$SOURCE_FILES" | grep -c "." || true) -SPDX_COUNT=0 - -while IFS= read -r src_file; do - if [ -z "$src_file" ]; then continue; fi - if has_spdx_header "$src_file"; then - SPDX_COUNT=$((SPDX_COUNT + 1)) - else - log_warning "Source file missing SPDX header: $(basename "$src_file")" - fi -done <<< "$SOURCE_FILES" - -if [ "$SOURCE_COUNT" -gt 0 ]; then - PERCENT=$((SPDX_COUNT * 100 / SOURCE_COUNT)) - log_pass "SPDX headers: $SPDX_COUNT/$SOURCE_COUNT ($PERCENT%)" - if [ "$PERCENT" -lt 100 ]; then - log_warning "Not all source files have SPDX headers" - fi -fi - -#============================================================================== -# VALIDATION PHASE 7: BUILD VERIFICATION -#============================================================================== - -echo "" -log_info "Phase 7: Build system verification" -echo "" - -# Check Zig build -if [ -f "$REPO_ROOT/src/interface/ffi/build.zig" ]; then - if command -v zig &> /dev/null; then - cd "$REPO_ROOT/src/interface/ffi" - if zig build 2>&1 | grep -q "error"; then - log_error "Zig build failed" - else - log_pass "Zig build successful" - fi - cd - > /dev/null - else - log_warning "Zig compiler not found - skipping Zig build check" - fi -else - log_error "Zig build.zig not found" -fi - -# Check Idris2. Prefer a REAL typecheck via the package (abi.ipkg sets the -# sourcedir so the `module Abi.*` namespace resolves); this catches namespace / -# path / import breakage that a bare per-file `idris2 --check` masks as a -# tolerated "module name does not match file name" warning. -if command -v idris2 &> /dev/null; then - if [ -f "$REPO_ROOT/abi.ipkg" ]; then - if (cd "$REPO_ROOT" && idris2 --typecheck abi.ipkg) > /dev/null 2>&1; then - log_pass "Idris2 ABI typechecks (abi.ipkg)" - else - log_error "Idris2 ABI does NOT typecheck (abi.ipkg)" - fi - else - # No package: fall back to a best-effort per-file syntax check (warns on - # the expected namespace/path mismatch). Look in either case of the dir. - IDS_FILES=$(find "$REPO_ROOT/src/interface/Abi" "$REPO_ROOT/src/interface/abi" -name "*.idr" -type f 2>/dev/null || true) - while IFS= read -r ids_file; do - if [ -z "$ids_file" ]; then continue; fi - if ! idris2 --check "$ids_file" 2>&1 | grep -q "Error"; then - log_pass "Idris2 syntax OK: $(basename "$ids_file")" - else - log_warning "Idris2 syntax issue: $(basename "$ids_file")" - fi - done <<< "$IDS_FILES" - fi -else - log_warning "Idris2 compiler not found - skipping Idris2 syntax checks" -fi - -#============================================================================== -# VALIDATION PHASE 8: DOCUMENTATION -#============================================================================== - -echo "" -log_info "Phase 8: Documentation requirements" -echo "" - -check_file_exists "docs/developer/ABI-FFI-README.adoc" "ABI/FFI documentation" -# TOPOLOGY may live at root or under docs/architecture/, .md or .adoc -if [ -f "$REPO_ROOT/TOPOLOGY.adoc" ] || [ -f "$REPO_ROOT/TOPOLOGY.md" ] || \ - [ -f "$REPO_ROOT/docs/architecture/TOPOLOGY.adoc" ] || [ -f "$REPO_ROOT/docs/architecture/TOPOLOGY.md" ]; then - [ "$VERBOSE" = "1" ] && log_pass "Architecture topology found" -else - log_error "Required file missing: TOPOLOGY (root or docs/architecture/, .adoc or .md)" -fi -# CONTRIBUTING.md may live at root or in .github/ (GitHub auto-discovers either) -if [ -f "$REPO_ROOT/CONTRIBUTING.md" ] || [ -f "$REPO_ROOT/.github/CONTRIBUTING.md" ]; then - [ "$VERBOSE" = "1" ] && log_pass "Contribution guide found" -else - log_error "Required file missing: CONTRIBUTING.md (root or .github/)" -fi - -# Governance can be at root or in docs/governance/ -if [ -f "$REPO_ROOT/GOVERNANCE.adoc" ] || [ -f "$REPO_ROOT/GOVERNANCE.md" ] || [ -d "$REPO_ROOT/docs/governance" ]; then - [ "$VERBOSE" = "1" ] && log_pass "Governance files found" -else - log_warning "Governance documentation not found" -fi - -#============================================================================== -# VALIDATION SUMMARY -#============================================================================== - -echo "" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "VALIDATION SUMMARY" -echo "═══════════════════════════════════════════════════════════════════════════════" -echo "" -echo -e "Errors: ${RED}${ERRORS}${NC}" -echo -e "Warnings: ${YELLOW}${WARNINGS}${NC}" -echo "" - -if [ "$ERRORS" -eq 0 ]; then - echo -e "${GREEN}✓ Validation PASSED${NC}" - [ "$WARNINGS" -gt 0 ] && echo -e " (with $WARNINGS warnings)" - exit 0 -else - echo -e "${RED}✗ Validation FAILED${NC}" - echo " Please fix the errors above." - exit 1 -fi diff --git a/src/interface/ffi/build.zig b/src/interface/ffi/build.zig index 2607c11..94bb43e 100644 --- a/src/interface/ffi/build.zig +++ b/src/interface/ffi/build.zig @@ -1,19 +1,49 @@ // 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 +// recon-silly-ation FFI Build Configuration (Zig 0.16.0) +// +// Builds the FFI bridge (src/main.zig) as a static library and wires up +// `zig build test` to run both the in-source unit tests and the +// integration test suite. 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_module = b.createModule(.{ + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, + }); + + const lib = b.addLibrary(.{ + .name = "recon_silly_ation", + .root_module = main_module, + .linkage = .static, + }); + b.installArtifact(lib); + + // `zig build test` — runs the in-source unit tests in src/main.zig. + const main_tests = b.addTest(.{ + .root_module = main_module, + }); + const run_main_tests = b.addRunArtifact(main_tests); + + // ... and the FFI integration test suite in test/integration_test.zig. + const integration_module = b.createModule(.{ + .root_source_file = b.path("test/integration_test.zig"), + .target = target, + .optimize = optimize, + }); + const integration_tests = b.addTest(.{ + .root_module = integration_module, + }); + 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 the FFI 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..29ea4d3 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 +// recon_silly_ation 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 = "recon_silly_ation built with Zig " ++ @import("builtin").zig_version_string; /// Thread-local error storage threadlocal var last_error: ?[]const u8 = null; @@ -38,47 +38,59 @@ 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 (opaque to C callers; the real layout is `HandleImpl` below). +/// Zig's `opaque` types cannot themselves carry fields, so the state lives in +/// `HandleImpl` and we `@ptrCast`/`@alignCast` between the two at the FFI seam. +pub const Handle = opaque {}; + +const HandleImpl = struct { allocator: std.mem.Allocator, initialized: bool, // Add your fields here }; +fn toImpl(handle: *Handle) *HandleImpl { + return @ptrCast(@alignCast(handle)); +} + +fn toHandle(impl: *HandleImpl) *Handle { + return @ptrCast(impl); +} + //============================================================================== // Library Lifecycle //============================================================================== /// Initialize the library /// Returns a handle, or null on failure -export fn {{project}}_init() ?*Handle { - const allocator = std.heap.c_allocator; +export fn recon_silly_ation_init() ?*Handle { + const allocator = std.heap.page_allocator; - const handle = allocator.create(Handle) catch { + const impl = allocator.create(HandleImpl) catch { setError("Failed to allocate handle"); return null; }; // Initialize handle - handle.* = .{ + impl.* = .{ .allocator = allocator, .initialized = true, }; clearError(); - return handle; + return toHandle(impl); } /// Free the library handle -export fn {{project}}_free(handle: ?*Handle) void { +export fn recon_silly_ation_free(handle: ?*Handle) void { const h = handle orelse return; - const allocator = h.allocator; + const impl = toImpl(h); + const allocator = impl.allocator; // Clean up resources - h.initialized = false; + impl.initialized = false; - allocator.destroy(h); + allocator.destroy(impl); clearError(); } @@ -87,13 +99,14 @@ export fn {{project}}_free(handle: ?*Handle) void { //============================================================================== /// Process data (example operation) -export fn {{project}}_process(handle: ?*Handle, input: u32) Result { +export fn recon_silly_ation_process(handle: ?*Handle, input: u32) Result { const h = handle orelse { setError("Null handle"); return .null_pointer; }; + const impl = toImpl(h); - if (!h.initialized) { + if (!impl.initialized) { setError("Handle not initialized"); return .@"error"; } @@ -111,19 +124,20 @@ 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 { +export fn recon_silly_ation_get_string(handle: ?*Handle) ?[*:0]const u8 { const h = handle orelse { setError("Null handle"); return null; }; + const impl = toImpl(h); - if (!h.initialized) { + if (!impl.initialized) { setError("Handle not initialized"); return null; } // Example: allocate and return a string - const result = h.allocator.dupeZ(u8, "Example result") catch { + const result = impl.allocator.dupeZ(u8, "Example result") catch { setError("Failed to allocate string"); return null; }; @@ -133,9 +147,9 @@ 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 { +export fn recon_silly_ation_free_string(str: ?[*:0]const u8) void { const s = str orelse return; - const allocator = std.heap.c_allocator; + const allocator = std.heap.page_allocator; const slice = std.mem.span(s); allocator.free(slice); @@ -146,7 +160,7 @@ export fn {{project}}_free_string(str: ?[*:0]const u8) void { //============================================================================== /// Process an array of data -export fn {{project}}_process_array( +export fn recon_silly_ation_process_array( handle: ?*Handle, buffer: ?[*]const u8, len: u32, @@ -160,8 +174,9 @@ export fn {{project}}_process_array( setError("Null buffer"); return .null_pointer; }; + const impl = toImpl(h); - if (!h.initialized) { + if (!impl.initialized) { setError("Handle not initialized"); return .@"error"; } @@ -182,11 +197,11 @@ export fn {{project}}_process_array( /// Get the last error message /// Returns null if no error -export fn {{project}}_last_error() ?[*:0]const u8 { +export fn recon_silly_ation_last_error() ?[*:0]const u8 { const err = last_error orelse return null; // Return C string (static storage, no need to free) - const allocator = std.heap.c_allocator; + const allocator = std.heap.page_allocator; const c_str = allocator.dupeZ(u8, err) catch return null; return c_str.ptr; } @@ -196,12 +211,12 @@ export fn {{project}}_last_error() ?[*:0]const u8 { //============================================================================== /// Get the library version -export fn {{project}}_version() [*:0]const u8 { +export fn recon_silly_ation_version() [*:0]const u8 { return VERSION.ptr; } /// Get build information -export fn {{project}}_build_info() [*:0]const u8 { +export fn recon_silly_ation_build_info() [*:0]const u8 { return BUILD_INFO.ptr; } @@ -210,10 +225,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( +export fn recon_silly_ation_register_callback( handle: ?*Handle, callback: ?Callback, ) Result { @@ -226,8 +241,9 @@ export fn {{project}}_register_callback( setError("Null callback"); return .null_pointer; }; + const impl = toImpl(h); - if (!h.initialized) { + if (!impl.initialized) { setError("Handle not initialized"); return .@"error"; } @@ -244,9 +260,9 @@ export fn {{project}}_register_callback( //============================================================================== /// Check if handle is initialized -export fn {{project}}_is_initialized(handle: ?*Handle) u32 { +export fn recon_silly_ation_is_initialized(handle: ?*Handle) u32 { const h = handle orelse return 0; - return if (h.initialized) 1 else 0; + return if (toImpl(h).initialized) 1 else 0; } //============================================================================== @@ -254,22 +270,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 = recon_silly_ation_init() orelse return error.InitFailed; + defer recon_silly_ation_free(handle); - try std.testing.expect({{project}}_is_initialized(handle) == 1); + try std.testing.expect(recon_silly_ation_is_initialized(handle) == 1); } test "error handling" { - const result = {{project}}_process(null, 0); + const result = recon_silly_ation_process(null, 0); try std.testing.expectEqual(Result.null_pointer, result); - const err = {{project}}_last_error(); + const err = recon_silly_ation_last_error(); try std.testing.expect(err != null); } test "version" { - const ver = {{project}}_version(); + const ver = recon_silly_ation_version(); const ver_str = std.mem.span(ver); try std.testing.expectEqualStrings(VERSION, ver_str); } diff --git a/tests/aspect_tests.sh b/tests/aspect_tests.sh index 028b2c0..8f54445 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 " recon-silly-ation — Aspect Tests (Cross-Cutting Concerns)" echo "═══════════════════════════════════════════════════════════════" echo "" diff --git a/tests/e2e.sh b/tests/e2e.sh index 11143fc..63bfccc 100755 --- a/tests/e2e.sh +++ b/tests/e2e.sh @@ -62,7 +62,7 @@ skip_test() { } echo "═══════════════════════════════════════════════════════════════" -echo " {{PROJECT}} — End-to-End Tests" +echo " recon-silly-ation — End-to-End Tests" echo "═══════════════════════════════════════════════════════════════" echo "" @@ -122,7 +122,7 @@ echo "" # 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"}') +# -d '{"tool":"recon-silly-ation","modality":"document","content":"e2e test"}') # check_status "hexad POST" "201" "$STATUS" # fi 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 ""