From 9e733c8ba277986d7fe2b0b3a6060672b6dd00c2 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 22:19:45 +0000 Subject: [PATCH] fix(proofs): run Agda with --without-K --cubical-compatible PROOF-POLICY 2.1: fix the Agda template at the source. Add the OPTIONS pragma to both template modules and the canonical flags to the template Justfile and ci.yml, so generated repos start strict. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0165rGu3tsKmJtevmrdMVyfJ --- aletheia/templates/agda/.github/workflows/ci.yml | 4 ++-- aletheia/templates/agda/Justfile | 4 ++-- aletheia/templates/agda/src/@@MOD_CAMEL@@.agda | 2 ++ aletheia/templates/agda/src/Properties.agda | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aletheia/templates/agda/.github/workflows/ci.yml b/aletheia/templates/agda/.github/workflows/ci.yml index 134fb0a..486ec74 100644 --- a/aletheia/templates/agda/.github/workflows/ci.yml +++ b/aletheia/templates/agda/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: sudo apt-get install -y --no-install-recommends agda - name: Typecheck (this is the build) - run: agda src/@@MOD_CAMEL@@.agda + run: agda --safe --without-K --cubical-compatible src/@@MOD_CAMEL@@.agda - name: Typecheck the proofs - run: agda src/Properties.agda + run: agda --safe --without-K --cubical-compatible src/Properties.agda diff --git a/aletheia/templates/agda/Justfile b/aletheia/templates/agda/Justfile index 6a5b299..abcd0a9 100644 --- a/aletheia/templates/agda/Justfile +++ b/aletheia/templates/agda/Justfile @@ -17,7 +17,7 @@ default: # Typecheck the main module. In Agda, typechecking IS the build. build: - agda src/@@MOD_CAMEL@@.agda + agda --safe --without-K --cubical-compatible src/@@MOD_CAMEL@@.agda # NOTE: there is no `run` recipe. This is a proof library, not a program: # there is no executable to run, and inventing one would be a fake gate. @@ -26,7 +26,7 @@ build: # Typecheck the proof suite. There is no separate test runner: a proof # that does not typecheck fails, which is the strongest form of "test". test: - agda src/Properties.agda + agda --safe --without-K --cubical-compatible src/Properties.agda # Verify RSR compliance using the estate checker verify: diff --git a/aletheia/templates/agda/src/@@MOD_CAMEL@@.agda b/aletheia/templates/agda/src/@@MOD_CAMEL@@.agda index 5e81fda..3a6786e 100644 --- a/aletheia/templates/agda/src/@@MOD_CAMEL@@.agda +++ b/aletheia/templates/agda/src/@@MOD_CAMEL@@.agda @@ -4,6 +4,8 @@ -- Self-contained by design: only Agda.Builtin is imported, so there is no -- standard-library dependency to fetch. Replace these with your own -- definitions and theorems. +{-# OPTIONS --safe --without-K --cubical-compatible #-} + module @@MOD_CAMEL@@ where open import Agda.Builtin.Nat using (Nat; zero; suc; _+_) diff --git a/aletheia/templates/agda/src/Properties.agda b/aletheia/templates/agda/src/Properties.agda index 2f2f290..eff6c86 100644 --- a/aletheia/templates/agda/src/Properties.agda +++ b/aletheia/templates/agda/src/Properties.agda @@ -4,6 +4,8 @@ -- This module is a *consumer* of the core library: it proves new facts -- from the exported lemmas, so a regression in the core shows up here as -- a typecheck failure rather than passing unnoticed. +{-# OPTIONS --safe --without-K --cubical-compatible #-} + module Properties where open import Agda.Builtin.Nat using (Nat; zero; suc; _+_)