Skip to content

Commit b9b98d7

Browse files
fix: instantiate the RSR template for contractiles (#21)
## Summary Contractiles was scaffolded from the RSR template but never instantiated: `{{PLACEHOLDER}}` tokens (and the literal string `rsr-template-repo`) survived across ~100 files, including the Zig FFI source, which genuinely failed to parse (`export fn {{project}}_init()`). - Substituted identity placeholders with this repo's real values, derived from its own SPDX headers, GitHub metadata, and what "contractiles" (the normative half of the contractile/descriptile pattern in the A2ML/K9 ecosystem) actually is. - De-clobbered `CODE_OF_CONDUCT.md`, which an unrelated estate-wide sweep had stamped with a different project's identity ("Squisher Corpus"). - Fixed real Zig bugs beyond substitution: `Handle` was an `opaque` type with fields (invalid — opaque types can't have fields), `callconv(.C)` isn't valid under Zig 0.16 (`.c` is), and `std.heap.c_allocator` needs libc, which `build.zig` never linked. Rewrote `build.zig` to produce a real static-library artifact and wire `zig build test` to both the inline unit tests and a genuine `integration_test.zig` (was a fully-commented placeholder). - Replaced Justfile fake-gate stubs (`build`/`test`/`e2e`/`aspect`/`bench`/`lint`/`deps`/`install` — all unconditional `echo`) with real `idris2`/`zig` invocations; deleted recipes with nothing real to do. - Removed template-only machinery: `scripts/validate-template.sh`, `tests/e2e/template_instantiation_test.sh`, `.machine_readable/ai/PLACEHOLDERS.adoc`, and the corresponding sections of `benches/template_bench.sh`. - Rewrote `README.adoc`, `SECURITY.md`, `CODE_OF_CONDUCT.md`, `security.txt`, and `docs/status/TEST-NEEDS.adoc` to describe this repo truthfully; dropped fabricated-risk fields (PGP fingerprint/key URL, hiring line) rather than invent them. ## Verification (literal exit codes) ``` zig fmt --check . → 0 zig build (in ffi dir) → 0 zig build test → 0 (11/11 tests passing) just --list → 0 (Justfile parses) just build / just test → 0 ``` ## Known residue (left deliberately) `container/*`, `machine-readable-design/canonical-directory-structure/*`, and `.machine_readable/configs/{selur-compose,stapeln}.toml` still carry `{{SERVICE_NAME}}`/`{{PORT}}`/etc. — these are a legitimate *recurring* template substituted by `just container-init`, not one-time instantiation artifacts (documented in `container/README.adoc`). `docs/governance/*-AUDIT-TEMPLATE.adoc`, `.machine_readable/contractiles/Justfile` (a stale duplicate of the root Justfile), and `build/just/init.just` (the now-vestigial bootstrap wizard) were not touched. ## Test plan - [x] `zig fmt --check .` exits 0 - [x] `zig build` exits 0 in `src/interface/ffi` - [x] `zig build test` exits 0, 11/11 tests pass - [x] `just --list` parses the Justfile - [x] `bash tests/e2e.sh` and `bash tests/aspect_tests.sh` run for real (aspect currently reports one known false-positive, documented in `docs/status/TEST-NEEDS.adoc`) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 86b979a commit b9b98d7

111 files changed

Lines changed: 734 additions & 1408 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Containerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}>
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
#
4-
# Dev Container image for {{PROJECT_NAME}}
4+
# Dev Container image for Contractiles
55
# Base: Chainguard Wolfi (minimal, supply-chain-secure)
6-
# Build: podman build -t {{PROJECT_NAME}}-dev -f .devcontainer/Containerfile .
6+
# Build: podman build -t Contractiles-dev -f .devcontainer/Containerfile .
77

88
FROM cgr.dev/chainguard/wolfi-base:latest
99

@@ -24,7 +24,7 @@ RUN groupadd -g 1000 nonroot || true \
2424
&& useradd -m -u 1000 -g 1000 -s /bin/bash nonroot || true
2525

2626
# Set workspace directory
27-
WORKDIR /workspaces/{{PROJECT_NAME}}
27+
WORKDIR /workspaces/Contractiles
2828

2929
# Default shell
3030
ENV SHELL=/bin/bash

.devcontainer/README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: CC-BY-SA-4.0
22
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
33
= Dev Container Usage
4-
:author: {{AUTHOR}} <{{AUTHOR_EMAIL}}>
4+
:author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
55

66
== Overview
77

@@ -25,4 +25,4 @@ This dev container uses `cgr.dev/chainguard/wolfi-base` with git, curl, bash, an
2525

2626
== Customization
2727

28-
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.
28+
Replace `Contractiles` placeholders in both `devcontainer.json` and `Containerfile` with your actual project name. Run `just deps` to verify the environment after first launch.

.devcontainer/devcontainer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: MPL-2.0
2-
// Copyright (c) {{CURRENT_YEAR}} {{AUTHOR}} ({{OWNER}}) <{{AUTHOR_EMAIL}}>
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
//
4-
// Dev Container configuration for {{PROJECT_NAME}}
4+
// Dev Container configuration for Contractiles
55
// Works with: VS Code Dev Containers, GitHub Codespaces, Gitpod
66
// Container runtime: Podman (recommended) or any OCI-compliant runtime
77
{
8-
"name": "{{PROJECT_NAME}}",
8+
"name": "Contractiles",
99

1010
"build": {
1111
"dockerfile": "Containerfile",

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if has nix && [ -f flake.nix ]; then
1818
fi
1919

2020
# Project environment variables
21-
export PROJECT_NAME="{{PROJECT_NAME}}"
21+
export PROJECT_NAME="Contractiles"
2222
export RSR_TIER="infrastructure"
2323
# export DATABASE_URL="..."
2424
# export API_KEY="..."

.github/.mailmap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{AUTHOR}} <{{AUTHOR_EMAIL}}> <{{AUTHOR_EMAIL_ALT}}>
1+
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> <>

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# CODEOWNERS - Define code review assignments
33
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
44
#
5-
# Replace {{OWNER}} with your GitHub username or team
5+
# Replace hyperpolymath with your GitHub username or team
66

77
# Default owners for everything
8-
* @{{OWNER}}
8+
* @hyperpolymath
99

1010
# Security-sensitive files require explicit review
11-
SECURITY.md @{{OWNER}}
12-
.github/workflows/ @{{OWNER}}
13-
Trustfile.a2ml @{{OWNER}}
14-
.machine_readable/ @{{OWNER}}
11+
SECURITY.md @hyperpolymath
12+
.github/workflows/ @hyperpolymath
13+
Trustfile.a2ml @hyperpolymath
14+
.machine_readable/ @hyperpolymath

.github/CODE_OF_CONDUCT.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,9 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
-->
55
# Code of Conduct
66

7-
<!--
8-
============================================================================
9-
TEMPLATE INSTRUCTIONS (delete this block before publishing)
10-
============================================================================
11-
Replace all {{PLACEHOLDER}} values:
12-
{{PROJECT_NAME}} - Your project name
13-
{{OWNER}} - GitHub/GitLab username or org
14-
{{REPO}} - Repository name
15-
{{CONDUCT_EMAIL}} - Email for conduct reports
16-
{{CONDUCT_TEAM}} - Name of conduct team/committee
17-
{{RESPONSE_TIME}} - Initial response SLA (e.g., 48 hours)
18-
{{CURRENT_YEAR}} - Current year
19-
20-
Review and customise:
21-
- Adjust enforcement ladder for your community size
22-
- Add/remove examples based on your context
23-
- Ensure contact methods work for your team
24-
============================================================================
25-
-->
26-
277
## Our Pledge
288

29-
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.
9+
We as members, contributors, and leaders pledge to make participation in Contractiles a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, colour, religion, or sexual identity and orientation.
3010

3111
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
3212

@@ -140,7 +120,7 @@ If you experience or witness unacceptable behaviour, or have any other concerns,
140120

141121
| Method | Details | Best For |
142122
|--------|---------|----------|
143-
| **Email** | {{CONDUCT_EMAIL}} | Detailed reports, sensitive matters |
123+
| **Email** | j.d.a.jewell@open.ac.uk | Detailed reports, sensitive matters |
144124
| **Private Message** | Contact any maintainer directly | Quick questions, minor issues |
145125
| **Anonymous Form** | [Link to form if available] | When you need anonymity |
146126

@@ -156,8 +136,8 @@ If you experience or witness unacceptable behaviour, or have any other concerns,
156136

157137
**What Happens Next**
158138

159-
1. You will receive acknowledgment within **{{RESPONSE_TIME}}**
160-
2. The {{CONDUCT_TEAM}} will review the report
139+
1. You will receive acknowledgment within **48 hours**
140+
2. The the maintainer will review the report
161141
3. We may ask for additional information
162142
4. We will determine appropriate action
163143
5. We will inform you of the outcome (respecting others' privacy)
@@ -173,7 +153,7 @@ All reports will be handled with discretion:
173153

174154
### Conflicts of Interest
175155

176-
If a {{CONDUCT_TEAM}} member is involved in an incident:
156+
If a the maintainer member is involved in an incident:
177157

178158
- They will recuse themselves from the process
179159
- Another maintainer or external party will handle the report
@@ -183,7 +163,7 @@ If a {{CONDUCT_TEAM}} member is involved in an incident:
183163

184164
## Enforcement Guidelines
185165

186-
The {{CONDUCT_TEAM}} will follow these guidelines in determining consequences:
166+
The the maintainer will follow these guidelines in determining consequences:
187167

188168
### 1. Correction
189169

@@ -235,13 +215,13 @@ For contributors with elevated access (Perimeter 2 or 1):
235215
If you believe an enforcement decision was made in error:
236216

237217
1. **Wait 7 days** after the decision (cooling-off period)
238-
2. **Email** {{CONDUCT_EMAIL}} with subject line "Appeal: [Original Report ID]"
218+
2. **Email** j.d.a.jewell@open.ac.uk with subject line "Appeal: [Original Report ID]"
239219
3. **Explain** why you believe the decision should be reconsidered
240220
4. **Provide** any new information not previously available
241221

242222
**Appeals Process**
243223

244-
- Appeals are reviewed by a different {{CONDUCT_TEAM}} member than the original
224+
- Appeals are reviewed by a different the maintainer member than the original
245225
- You will receive a response within 14 days
246226
- The appeals decision is final
247227
- You may only appeal once per incident
@@ -314,8 +294,8 @@ We thank these communities for their leadership in creating welcoming spaces.
314294

315295
If you have questions about this Code of Conduct:
316296

317-
- Open a [Discussion](https://{{FORGE}}/{{OWNER}}/{{REPO}}/discussions) (for general questions)
318-
- Email {{CONDUCT_EMAIL}} (for private questions)
297+
- Open a [Discussion](https://github.com/hyperpolymath/contractiles/discussions) (for general questions)
298+
- Email j.d.a.jewell@open.ac.uk (for private questions)
319299
- Contact any maintainer directly
320300

321301
---
@@ -328,4 +308,4 @@ We're all here because we care about this project. Let's make it a place where e
328308

329309
---
330310

331-
<sub>Last updated: {{CURRENT_YEAR}} · Based on Contributor Covenant 2.1</sub>
311+
<sub>Last updated: 2026 · Based on Contributor Covenant 2.1</sub>

.github/CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ SPDX-License-Identifier: CC-BY-SA-4.0
33
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
44
-->
55
# Clone the repository
6-
git clone https://{{FORGE}}/{{OWNER}}/{{REPO}}.git
7-
cd {{REPO}}
6+
git clone https://github.com/hyperpolymath/contractiles.git
7+
cd contractiles
88

99
# Using Nix (recommended for reproducibility)
1010
nix develop
1111

1212
# Or using toolbox/distrobox
13-
toolbox create {{REPO}}-dev
14-
toolbox enter {{REPO}}-dev
13+
toolbox create contractiles-dev
14+
toolbox enter contractiles-dev
1515
# Install dependencies manually
1616

1717
# Verify setup
@@ -21,7 +21,7 @@ just test # Run test suite
2121
2222
### Repository Structure
2323
```
24-
{{REPO}}/
24+
contractiles/
2525
├── src/ # Source code (Perimeter 1-2)
2626
├── lib/ # Library code (Perimeter 1-2)
2727
├── extensions/ # Extensions (Perimeter 2)
@@ -62,7 +62,7 @@ just test # Run test suite
6262
6363
**Before reporting**:
6464
1. Search existing issues
65-
2. Check if it's already fixed in `{{MAIN_BRANCH}}`
65+
2. Check if it's already fixed in `main`
6666
3. Determine which perimeter the bug affects
6767
6868
**When reporting**:
@@ -95,10 +95,10 @@ Use the [feature request template](.github/ISSUE_TEMPLATE/feature_request.md) an
9595
9696
Look for issues labelled:
9797
98-
- [`good first issue`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/good%20first%20issue) — Simple Perimeter 3 tasks
99-
- [`help wanted`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/help%20wanted) — Community help needed
100-
- [`documentation`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/documentation) — Docs improvements
101-
- [`perimeter-3`](https://{{FORGE}}/{{OWNER}}/{{REPO}}/labels/perimeter-3) — Community sandbox scope
98+
- [`good first issue`](https://github.com/hyperpolymath/contractiles/labels/good%20first%20issue) — Simple Perimeter 3 tasks
99+
- [`help wanted`](https://github.com/hyperpolymath/contractiles/labels/help%20wanted) — Community help needed
100+
- [`documentation`](https://github.com/hyperpolymath/contractiles/labels/documentation) — Docs improvements
101+
- [`perimeter-3`](https://github.com/hyperpolymath/contractiles/labels/perimeter-3) — Community sandbox scope
102102
103103
---
104104

.github/FUNDING.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: MPL-2.0
2-
# Funding platforms for {{OWNER}} projects
2+
# Funding platforms for hyperpolymath projects
33
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
44

5-
github: {{OWNER}}
6-
ko_fi: {{OWNER}}
7-
liberapay: {{OWNER}}
5+
github: hyperpolymath
6+
ko_fi: hyperpolymath
7+
liberapay: hyperpolymath

.github/MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Format: Name <email> (role)
55
# Replace placeholders with actual maintainer information.
66

7-
{{AUTHOR}} <{{AUTHOR_EMAIL}}> (Lead Maintainer)
7+
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> (Lead Maintainer)
88

99
# Additional maintainers:
1010
# Name <email> (role)

0 commit comments

Comments
 (0)