Skip to content

Commit ce6dd58

Browse files
committed
chore(sync): proof guide carries the checked-cone exception; anchor override names allowed languages (rsr-template-repo#416)
Carries rsr-template-repo#416 here, at template 3396f1f: - verification/proofs/README.adoc gains the PROOF-POLICY §1.1 exception (a whole import cone that passes safe mode with zero postulates is checked, not ASSUMED), so the guide and the generated Proofs block agree. governance_policy_test.sh asserts it in both. - arrival-pack.ncl also names any language the anchor allows that the estate policy denies; extract.sh gets a default case (SonarCloud shell:S131). New controls: tests/workflows/arrival_pack_anchor_override_test.sh, wired into estate-rules.yml as one step. - CLAUDE.md regenerated. The Anchor override line is unchanged here; the only new text is the template's chora/CLADE note (rsr-template-repo#415), which the same engine file carries. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0136P7Zoc4g7WLgAwdMTnzPM
1 parent 26066d4 commit ce6dd58

7 files changed

Lines changed: 159 additions & 7 deletions

File tree

‎.github/workflows/estate-rules.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ jobs:
114114
run: bash scripts/validate-session-contracts.sh
115115
- name: Check Nickel typecheck controls
116116
run: bash tests/workflows/k9_typecheck_test.sh
117+
# An anchor that allows an estate-denied language must show in the pack.
118+
- name: Arrival pack renders both sides of an anchor override
119+
run: bash tests/workflows/arrival_pack_anchor_override_test.sh
117120
- name: Verify session envelope controls
118121
run: bash tests/workflows/session_contracts_test.sh
119122
- name: Verify mint cleanup controls

‎.machine_readable/arrival-pack/arrival-pack.ncl‎

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,33 @@ let data = import "claude-md-data.json" in
2020
# owner's voice. Until then the estate-common block is explicitly DRAFT.
2121
let manifesto_pin = "DRAFT-unratified" in
2222

23+
# The estate deny list, stated once: the language-policy line below prints it,
24+
# and the anchor override compares the anchor's allowed list against it.
25+
let estate_denied = ["Nix", "Python", "Go", "TypeScript", "ReScript", "AGPL"] in
26+
27+
# An anchor overrides the estate policy for its repo in two ways: it forbids
28+
# what the estate permits, and it allows what the estate denies. Both are
29+
# rendered, or the pack would tell an agent that an estate denial applies in a
30+
# repo whose anchor allows the language (Codex review of sholes#13). A language
31+
# the anchor allows and the estate does not deny is no override and is not
32+
# listed. Names are compared as written.
33+
let anchor_allows_denied =
34+
std.array.filter (fun l => std.array.elem l estate_denied) data.anchor_allowed
35+
in
2336
let anchor_override =
24-
if std.array.length data.anchor_forbidden == 0 then ""
25-
else "\n- **Anchor override** (ANCHOR) — This repo's anchor forbids: %{std.string.join ", " data.anchor_forbidden}. The anchor overrides the estate policy above."
37+
let allows = std.string.join ", " anchor_allows_denied in
38+
let forbids = std.string.join ", " data.anchor_forbidden in
39+
let has_allows = std.array.length anchor_allows_denied > 0 in
40+
let has_forbids = std.array.length data.anchor_forbidden > 0 in
41+
let lead = "\n- **Anchor override** (ANCHOR) — This repo's anchor " in
42+
let tail = ". The anchor overrides the estate policy above." in
43+
if has_allows && has_forbids then
44+
"%{lead}allows, where the estate policy above denies: %{allows}; it forbids: %{forbids}%{tail}"
45+
else if has_allows then
46+
"%{lead}allows, where the estate policy above denies: %{allows}%{tail}"
47+
else if has_forbids then
48+
"%{lead}forbids: %{forbids}%{tail}"
49+
else ""
2650
in
2751

2852
let provenance = "DEED@%{data.h_deed} ANCHOR@%{data.h_anchor}"
@@ -70,6 +94,12 @@ The descriptive family (working name *descriptiles*) describes what-is; the **co
7094
| contractiles | Normative doctrine: **Intend** (north-star) · **Must** (invariants) · **Trust** (security) · **Adjust** (accessibility / inclusive design) — the integral core that holds strong; plus **Dust** (exnovation drift) · **Bust** (failure / breakage, not drift). |
7195
| k9 | *Validation*. Kennel (data) / Yard (pure eval) / Hunt (guarded exec). |
7296
97+
**The chora and CLADE are different things** (owner, 2026-11-15; standards A1 CHORA-SPEC §11.1):
98+
- **The chora is ontological/metaphysical**: what this repo *is* and is meant to be in its context, code as identity: its intension (what defines it) and its extension (what it is an instance of). A `(clade …)` placement in it is an identity fact, copied from chora-registry, and the registry wins; never take one from a legacy file.
99+
- **`CLADE.deed` is logical/epistemological**: how this repo's own content is ordered. Its scheme may be strict (Linnaean), judgement or none; membership may be single or multiple; a category is decided by its criterion. It is a descriptile and never identity; none is created until A7 M3 `clade` lands.
100+
- **The aesthetic spans both**: what one experiences of the repo from outside, and in its ordering within.
101+
- A legacy `CLADE.a2ml`, or A2ML named `CLADE.deed`, feeds the chora and `STATE.deed` (standards `clade-to-repo-deed.adoc`), never a `CLADE.deed`.
102+
73103
## Canon pointers
74104
Estate data-format route: **kyq** handles exactly **TOML, Dhall, KYAML,
75105
I-JSON/JCS**. Preserve TOML/Dhall; migrate YAML/YML to KYAML and JSON variants
@@ -83,7 +113,7 @@ checks until a pinned kyq executable passes positive and negative tests.
83113
- **Before you invent, rename, or consolidate anything: STOP and check the map + IS-NOT.**
84114
85115
## Estate language policy (overridable per-repo via AGENTIC)
86-
Deny: **Nix, Python, Go, TypeScript, ReScript, AGPL**. (Guix, not Nix.)
116+
Deny: **%{std.string.join ", " estate_denied}**. (Guix, not Nix.)
87117
JavaScript runtime: **Bun** > Deno > pnpm > npm (last resort, permitted), from one `package.json` that carries every runtime's lock (`bun.lock`, `deno.lock`, `pnpm-lock.yaml`), all written by `js-runtimes regen` (owner ruling 2026-10-14, standards LANGUAGE-POLICY §1.3–§1.4). Deno is permitted again; `package-lock.json` stays refused.
88118
Use plain JavaScript when this tooling is needed. TypeScript and ReScript migrate to AffineScript.
89119

‎.machine_readable/arrival-pack/extract.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ fi
8282
case "$uuid" in
8383
'#u5"'*|'#uuid"'????????-????-5*)
8484
echo "extract.sh: v5-identity: $(basename "$DEED") :repo-uuid $uuid is a version 5 id; the chora id is #uuid\"<v8 id of the birth path>\" (standards A1 V8)" >&2 ;;
85+
*) ;; # any other identity is printed as written, with nothing to report
8586
esac
8687

8788
# read_clauses -> the clauses this pack reads, one token per line. Hashing only

‎CLAUDE.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ The descriptive family (working name *descriptiles*) describes what-is; the **co
4747
| contractiles | Normative doctrine: **Intend** (north-star) · **Must** (invariants) · **Trust** (security) · **Adjust** (accessibility / inclusive design) — the integral core that holds strong; plus **Dust** (exnovation drift) · **Bust** (failure / breakage, not drift). |
4848
| k9 | *Validation*. Kennel (data) / Yard (pure eval) / Hunt (guarded exec). |
4949

50+
**The chora and CLADE are different things** (owner, 2026-11-15; standards A1 CHORA-SPEC §11.1):
51+
- **The chora is ontological/metaphysical**: what this repo *is* and is meant to be in its context, code as identity: its intension (what defines it) and its extension (what it is an instance of). A `(clade …)` placement in it is an identity fact, copied from chora-registry, and the registry wins; never take one from a legacy file.
52+
- **`CLADE.deed` is logical/epistemological**: how this repo's own content is ordered. Its scheme may be strict (Linnaean), judgement or none; membership may be single or multiple; a category is decided by its criterion. It is a descriptile and never identity; none is created until A7 M3 `clade` lands.
53+
- **The aesthetic spans both**: what one experiences of the repo from outside, and in its ordering within.
54+
- A legacy `CLADE.a2ml`, or A2ML named `CLADE.deed`, feeds the chora and `STATE.deed` (standards `clade-to-repo-deed.adoc`), never a `CLADE.deed`.
55+
5056
## Canon pointers
5157
Estate data-format route: **kyq** handles exactly **TOML, Dhall, KYAML,
5258
I-JSON/JCS**. Preserve TOML/Dhall; migrate YAML/YML to KYAML and JSON variants
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: MPL-2.0
3+
# SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
4+
#
5+
# arrival_pack_anchor_override_test.sh — controls for the "Anchor override"
6+
# line of the CLAUDE.md arrival pack (.machine_readable/arrival-pack/).
7+
#
8+
# An anchor overrides the estate language policy in two ways: it forbids what
9+
# the estate permits, and it allows what the estate denies. The engine once
10+
# rendered only the first, so a repo whose anchor allowed a denied language
11+
# still told its agents the estate denial applied (Codex review of sholes#13).
12+
# Each case renders the engine over a fixture and reads the one line.
13+
#
14+
# Requires nickel and jq. Exit: 0 all controls hold; 1 a control failed.
15+
16+
set -uo pipefail
17+
18+
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
19+
AP="$REPO_DIR/.machine_readable/arrival-pack"
20+
for tool in nickel jq; do
21+
command -v "$tool" >/dev/null 2>&1 || { echo "FAIL: $tool is required" >&2; exit 1; }
22+
done
23+
WORK="$(mktemp -d)"
24+
trap 'rm -rf "$WORK"' EXIT
25+
26+
# The fixture is this repo's own extract, so every field the engine reads is
27+
# present; only the two anchor lists are replaced per case.
28+
BASE="$WORK/base.json"
29+
bash "$AP/extract.sh" "$REPO_DIR" > "$BASE" || { echo "FAIL: extract.sh did not run" >&2; exit 1; }
30+
31+
FAILED=0
32+
CHECKS=0
33+
# render ALLOWED_JSON FORBIDDEN_JSON -> the rendered region on stdout
34+
render() {
35+
local allowed="$1" forbidden="$2" dir="$WORK/case.$CHECKS"
36+
mkdir -p "$dir"
37+
cp "$AP/arrival-pack.ncl" "$dir/"
38+
jq -cS --argjson a "$allowed" --argjson f "$forbidden" '.anchor_allowed = $a | .anchor_forbidden = $f' \
39+
"$BASE" > "$dir/claude-md-data.json"
40+
nickel export --format raw "$dir/arrival-pack.ncl"
41+
}
42+
# check LABEL ALLOWED_JSON FORBIDDEN_JSON EXPECTED_LINE ("" = no override line)
43+
check() {
44+
local label="$1" want="$4" out line count
45+
CHECKS=$((CHECKS + 1))
46+
out="$(render "$2" "$3" 2>&1)" || { FAILED=$((FAILED + 1)); echo " FAIL $label (engine did not render)"; echo "$out" | sed 's/^/ /'; return; }
47+
count="$(grep -c -- '- \*\*Anchor override\*\*' <<<"$out")"
48+
line="$(grep -- '- \*\*Anchor override\*\*' <<<"$out")"
49+
if [[ -z "$want" && "$count" -eq 0 ]]; then
50+
echo " PASS $label"
51+
elif [[ -n "$want" && "$count" -eq 1 && "$line" == "$want" ]]; then
52+
echo " PASS $label"
53+
else
54+
FAILED=$((FAILED + 1)); echo " FAIL $label"
55+
echo " want: ${want:-<no Anchor override line>}"
56+
echo " got ($count line(s)): $line"
57+
fi
58+
}
59+
60+
LEAD="- **Anchor override** (ANCHOR) — This repo's anchor"
61+
TAIL="The anchor overrides the estate policy above."
62+
63+
check "no lists: no override line" '[]' '[]' ""
64+
check "forbids only: the wording minted repos already carry" \
65+
'[]' '["Node.js","npm"]' \
66+
"$LEAD forbids: Node.js, npm. $TAIL"
67+
check "allowed languages the estate does not deny are no override" \
68+
'["Rust","Idris2","Zig"]' '["Node.js","npm"]' \
69+
"$LEAD forbids: Node.js, npm. $TAIL"
70+
check "allows a denied language: it is named" \
71+
'["Rust","Go"]' '[]' \
72+
"$LEAD allows, where the estate policy above denies: Go. $TAIL"
73+
check "allows a denied language and forbids: both are named" \
74+
'["Go","Rust","Python"]' '["Node.js","npm"]' \
75+
"$LEAD allows, where the estate policy above denies: Go, Python; it forbids: Node.js, npm. $TAIL"
76+
check "allowed but not denied, nothing forbidden: no override line" \
77+
'["Rust","Zig"]' '[]' ""
78+
79+
# The deny list is stated once in the engine: the policy line prints the same
80+
# list the override compares against.
81+
CHECKS=$((CHECKS + 1))
82+
if render '[]' '[]' 2>/dev/null | grep -qF 'Deny: **Nix, Python, Go, TypeScript, ReScript, AGPL**. (Guix, not Nix.)'; then
83+
echo " PASS the language-policy line prints the estate deny list"
84+
else
85+
FAILED=$((FAILED + 1)); echo " FAIL the language-policy line prints the estate deny list"
86+
fi
87+
88+
echo "$CHECKS controls, $FAILED failed"
89+
[[ "$FAILED" -eq 0 ]]

‎tests/workflows/governance_policy_test.sh‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,21 @@ for (const text of [dependencies, arrival]) {
204204
assert.match(prose(text), /fit equally well.*prefer one that carries its own verification/i);
205205
assert.match(prose(text), /preference, not a gate/i);
206206
}
207-
console.log("PASS: third-party dependencies remain ASSUMED boundaries and verification is a preference");
207+
// PROOF-POLICY section 1.1: a dependency whose whole import cone passes safe
208+
// mode with zero postulates is checked, not assumed. The guide and the arrival
209+
// guidance must both carry the exception, or they give opposite instructions
210+
// for the same dependency (Codex review of sholes#13).
211+
for (const [name, text] of [["proof guide", dependencies], ["arrival guidance", arrival]]) {
212+
assert.match(prose(text), /import cone.*safe mode with zero postulates.*checked, not assumed/i,
213+
`${name} must carry the checked-cone exception`);
214+
assert.match(prose(text), /record the cone.*instead of an ASSUMED row/i,
215+
`${name} must say a checked cone is recorded instead of an ASSUMED row`);
216+
assert.match(prose(text), /root module.*flags.*postulate count.*library name, version and pin/i,
217+
`${name} must list what a recorded cone holds`);
218+
assert.match(prose(text), /postulate.*outside safe mode.*not checked/i,
219+
`${name} must say a cone with a postulate or outside safe mode is not checked`);
220+
}
221+
console.log("PASS: third-party dependencies are ASSUMED boundaries unless the whole import cone is checked; verification is a preference");
208222
209223
// Negative regression: a shipped example, even one with a gated manifest
210224
// entry, must never become evidence of completed proofs or a theory recheck.

‎verification/proofs/README.adoc‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,18 @@ Dependencies (crates, libraries, vendored or forked code) are not converted,
7676
re-proved or annotated to meet this policy. Where a proof here relies on a
7777
dependency's behaviour, state that reliance as a trusted boundary
7878
specification and record it as `ASSUMED`, with the dependency and version,
79-
in `docs/status/PROOF-STATUS.adoc`. When choosing between dependencies that
80-
fit equally well, prefer one that carries its own verification. This is a
81-
preference, not a gate.
79+
in `docs/status/PROOF-STATUS.adoc`.
80+
81+
A dependency the prover itself checks is not an assumption (policy §1.1).
82+
When the whole import cone of a proof (every module it transitively imports,
83+
first-party or library) compiles under the prover's safe mode with zero
84+
postulates, the dependency is checked, not assumed. Record the cone instead
85+
of an `ASSUMED` row: the root module, the flags in force, the postulate count
86+
(zero), and the library name, version and pin. A cone that contains a
87+
postulate, or that was compiled outside safe mode, is not checked.
88+
89+
When choosing between dependencies that fit equally well, prefer one that
90+
carries its own verification. This is a preference, not a gate.
8291

8392
== Directory structure
8493

0 commit comments

Comments
 (0)