From 11c65e8a458ad8a869dcf269d4707468fe5ddb5c Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sat, 19 Sep 2026 09:36:04 +0000 Subject: [PATCH] refactor(root): move root artefacts to their canonical locations Applies the estate root-shape rollout: files that are not root-level by necessity move to where their tooling and the estate canon expect them, and every reference to them is updated in the same change. * .github/hooks/validate-a2ml.sh (from .githooks/validate-a2ml.sh) -> .github/hooks/validate-a2ml.sh * .github/hooks/validate-k9.sh (from .githooks/validate-k9.sh) -> .github/hooks/validate-k9.sh * .github/workflows/dogfood-gate.yml * .gitignore * .machine_readable/contractiles/Justfile * .machine_readable/root-allow.txt * .pre-commit-config.yaml * Justfile * src/interface/abi.ipkg (from abi.ipkg) -> src/interface/abi.ipkg Verified with `git apply --check` against current main before committing; no behaviour change intended, the Justfile entry points keep working. --- {.githooks => .github/hooks}/validate-a2ml.sh | 0 {.githooks => .github/hooks}/validate-k9.sh | 0 .github/workflows/dogfood-gate.yml | 4 ++-- .gitignore | 2 +- .machine_readable/contractiles/Justfile | 2 +- .machine_readable/root-allow.txt | 3 +-- .pre-commit-config.yaml | 2 +- Justfile | 2 +- abi.ipkg => src/interface/abi.ipkg | 4 ++-- 9 files changed, 9 insertions(+), 10 deletions(-) rename {.githooks => .github/hooks}/validate-a2ml.sh (100%) rename {.githooks => .github/hooks}/validate-k9.sh (100%) rename abi.ipkg => src/interface/abi.ipkg (94%) diff --git a/.githooks/validate-a2ml.sh b/.github/hooks/validate-a2ml.sh similarity index 100% rename from .githooks/validate-a2ml.sh rename to .github/hooks/validate-a2ml.sh diff --git a/.githooks/validate-k9.sh b/.github/hooks/validate-k9.sh similarity index 100% rename from .githooks/validate-k9.sh rename to .github/hooks/validate-k9.sh diff --git a/.github/workflows/dogfood-gate.yml b/.github/workflows/dogfood-gate.yml index ab57ac4..ad5d6d7 100644 --- a/.github/workflows/dogfood-gate.yml +++ b/.github/workflows/dogfood-gate.yml @@ -42,7 +42,7 @@ jobs: - name: Validate A2ML manifests if: steps.detect.outputs.count > 0 - run: bash .githooks/validate-a2ml.sh + run: bash .github/hooks/validate-a2ml.sh - name: Write summary run: | A2ML_COUNT="${{ steps.detect.outputs.count }}" @@ -87,7 +87,7 @@ jobs: - name: Validate K9 contracts if: steps.detect.outputs.k9_count > 0 - run: bash .githooks/validate-k9.sh + run: bash .github/hooks/validate-k9.sh - name: Write summary run: | K9_COUNT="${{ steps.detect.outputs.k9_count }}" diff --git a/.gitignore b/.gitignore index cb3cb35..87e91e8 100644 --- a/.gitignore +++ b/.gitignore @@ -120,6 +120,6 @@ dist/ !/build/ !/build/** -# ...but never track Idris2 typecheck output. `idris2 --typecheck abi.ipkg` +# ...but never track Idris2 typecheck output. `idris2 --typecheck src/interface/abi.ipkg` # writes compiled .ttc/.ttm under build/ttc/; these are generated artifacts. /build/ttc/ diff --git a/.machine_readable/contractiles/Justfile b/.machine_readable/contractiles/Justfile index ccd8412..1d265fe 100644 --- a/.machine_readable/contractiles/Justfile +++ b/.machine_readable/contractiles/Justfile @@ -190,7 +190,7 @@ fmt-check: # Run linter (Idris2 ABI typecheck + Zig compile check) lint: @echo "Linting source files..." - @command -v idris2 >/dev/null 2>&1 && idris2 --typecheck abi.ipkg || echo "WARN: idris2 not found — skipping ABI typecheck" + @command -v idris2 >/dev/null 2>&1 && idris2 --typecheck src/interface/abi.ipkg || echo "WARN: idris2 not found — skipping ABI typecheck" cd src/interface/ffi && zig build # ═══════════════════════════════════════════════════════════════════════════════ diff --git a/.machine_readable/root-allow.txt b/.machine_readable/root-allow.txt index f237689..31c4275 100644 --- a/.machine_readable/root-allow.txt +++ b/.machine_readable/root-allow.txt @@ -28,7 +28,6 @@ CHANGELOG.md # ─── Build entry points (must live at root for their tooling) ──────────────── Justfile # delegates phases to build/just/*.just coordination.k9 # repo-local session binding (template-mandated) -abi.ipkg # Idris2 package for the ABI seam; sourcedir=src/interface (estate canon: root-level *-abi.ipkg). Single case-consistent src/interface/Abi/ dir. Typecheck: `idris2 --typecheck abi.ipkg`. # ─── Conventional dotfiles (tool-required at root) ─────────────────────────── .editorconfig @@ -81,7 +80,7 @@ flake.nix # TOLERATED, NOT BLESSED. Nix was retired estate-wide # these are this project's real top-level shape. Moving them would # break every path that references them, to satisfy a map that was # never written for it. Read from the estate-rules gate's own output. -.githooks/ # Top-level component directory of this project. +.github/hooks/ # Top-level component directory of this project. REQUIRES_INITIALISATION.md # Project documentation. CHANGELOG.adoc CONTRIBUTING.adoc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4f921fa..c3ad96f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: hooks: - id: validate-k9 name: Validate K9 contracts - entry: .githooks/validate-k9.sh + entry: .github/hooks/validate-k9.sh language: system pass_filenames: false diff --git a/Justfile b/Justfile index ccd8412..1d265fe 100644 --- a/Justfile +++ b/Justfile @@ -190,7 +190,7 @@ fmt-check: # Run linter (Idris2 ABI typecheck + Zig compile check) lint: @echo "Linting source files..." - @command -v idris2 >/dev/null 2>&1 && idris2 --typecheck abi.ipkg || echo "WARN: idris2 not found — skipping ABI typecheck" + @command -v idris2 >/dev/null 2>&1 && idris2 --typecheck src/interface/abi.ipkg || echo "WARN: idris2 not found — skipping ABI typecheck" cd src/interface/ffi && zig build # ═══════════════════════════════════════════════════════════════════════════════ diff --git a/abi.ipkg b/src/interface/abi.ipkg similarity index 94% rename from abi.ipkg rename to src/interface/abi.ipkg index 4b62c0b..14ec249 100644 --- a/abi.ipkg +++ b/src/interface/abi.ipkg @@ -14,7 +14,7 @@ -- A bare `idris2 --check src/interface/Abi/Foo.idr` still warns ("module name -- does not match file name") because Idris derives the expected module from the -- full path; that is expected. Use the package for a real typecheck: --- idris2 --typecheck abi.ipkg (or --build) +-- idris2 --typecheck src/interface/abi.ipkg (or --build) -- -- The RSR validators accept either Abi/ (canonical, case-consistent) or a -- lowercase abi/ for downstream repos that ship lowercase — but never both. @@ -27,7 +27,7 @@ authors = "Jonathan D.A. Jewell" brief = "Formally-typed ABI/FFI seam (Idris2 type + layout proofs) for an RSR-templated repository" -sourcedir = "src/interface" +sourcedir = "." depends = base