Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/estate-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ jobs:
run: bash tests/workflows/check_no_a2ml_test.sh
- name: Deed clause writer controls
run: bash tests/workflows/deed_clause_test.sh
# The repo uuid is derived the same on every machine (sha1sum, shasum or
# openssl), equal to uuidgen --sha1; with no SHA-1 tool it is refused.
- name: Repo uuid derivation is machine-independent
run: bash tests/workflows/uuid5_url_test.sh
# A #uuid body is read as written, and a legacy #u8 literal is derived
# through scripts/uuid-v8.sh, equal to standards scripts/uuid-v8.js.
- name: Repo chora id is read as written, and #u8 is derived as UUIDv8
run: bash tests/workflows/uuid_v8_test.sh
- name: Install verified Nickel 1.17.0
run: |
mkdir -p "$RUNNER_TEMP/nickel-bin"
Expand Down
19 changes: 14 additions & 5 deletions .machine_readable/arrival-pack/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ the repo's own machine-readable truth.
[source]
----
<repo>_chora.deed extract.sh arrival-pack.ncl CLAUDE.md
+ anchors/ANCHOR ──▶ (deed → JSON, ──▶ (Nickel projection ──▶ region between
the thin reader) = the engine) BEGIN/END markers
(incl. its (anchor (deed → JSON, (Nickel projection region between
(golden-path))) ──▶ the thin reader) ──▶ = the engine) ──▶ BEGIN/END markers
----

Two halves of the generated region:

* *Estate-common* — identical in every repo; the Manifesto doctrine + format-family
orientation + canon pointers + language policy. Pinned to a Manifesto SHA once
orientation + canon pointers + language policy + the proof guidance (which
prover for which obligation; moved in from hand-authored text on 2026-11-15
so a wording fix reaches every repo by regenerating). Pinned to a Manifesto SHA once
the wording is ratified (today: `DRAFT-unratified`).
* *Repo-specific* — projected from this repo's deed: identity, IS / IS-NOT,
position, constraints, golden path, state.
Expand Down Expand Up @@ -52,7 +54,14 @@ just validate-claude-md # fail if the committed region drifted / was hand-edit

* Estate-common doctrine is a *DRAFT* in the agent's words — owner to ratify into
his voice, then pin to a `hyperpolymath/manifesto` commit SHA.
* `ECOSYSTEM.what-this-is-not` is empty here, so IS-NOT renders as "not yet
declared". Populating it is the boundary-erosion fix (the `lith` lesson).
* IS-NOT comes from the deed's `(ecosystem :not (…))`. When that list is empty,
IS-NOT renders as "not yet declared" and the deed should gain the list (the
boundary-erosion fix, the `lith` lesson).
* A repo's `(anchor (implementation-policy …))` renders as one "Anchor
override" line in the repo-specific part: what `:forbidden` lists, and any
language `:allowed` lists that the estate policy denies. An allowed language
the estate does not deny is no override and is not listed. The line is
hidden when there is neither. Controls:
`tests/workflows/arrival_pack_anchor_override_test.sh`.
* The `(anchor)` clause currently encodes semantic-authority + golden-path; the
recognised-drift / re-anchor-ledger aspect is a pending standards change.
86 changes: 80 additions & 6 deletions .machine_readable/arrival-pack/arrival-pack.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,35 @@ let data = import "claude-md-data.json" in
# owner's voice. Until then the estate-common block is explicitly DRAFT.
let manifesto_pin = "DRAFT-unratified" in

# The estate deny list, stated once: the language-policy line below prints it,
# and the anchor override compares the anchor's allowed list against it.
let estate_denied = ["Nix", "Python", "Go", "TypeScript", "ReScript", "AGPL"] in

# An anchor overrides the estate policy for its repo in two ways: it forbids
# what the estate permits, and it allows what the estate denies. Both are
# rendered, or the pack would tell an agent that an estate denial applies in a
# repo whose anchor allows the language (Codex review of sholes#13). A language
# the anchor allows and the estate does not deny is no override and is not
# listed. Names are compared as written.
let anchor_allows_denied =
std.array.filter (fun l => std.array.elem l estate_denied) data.anchor_allowed
in
let anchor_override =
let allows = std.string.join ", " anchor_allows_denied in
let forbids = std.string.join ", " data.anchor_forbidden in
let has_allows = std.array.length anchor_allows_denied > 0 in
let has_forbids = std.array.length data.anchor_forbidden > 0 in
let lead = "\n- **Anchor override** (ANCHOR) — This repo's anchor " in
let tail = ". The anchor overrides the estate policy above." in
if has_allows && has_forbids then
"%{lead}allows, where the estate policy above denies: %{allows}; it forbids: %{forbids}%{tail}"
else if has_allows then
"%{lead}allows, where the estate policy above denies: %{allows}%{tail}"
else if has_forbids then
"%{lead}forbids: %{forbids}%{tail}"
else ""
in

let provenance = "DEED@%{data.h_deed} ANCHOR@%{data.h_anchor}"
in

Expand Down Expand Up @@ -57,14 +86,20 @@ The descriptive family (working name *descriptiles*) describes what-is; the **co

| File | Answers |
|---|---|
| `%{data.deed}` | **CHORA**, the repo deed. Its `(identity)` `(clade)` `(lineage)` clauses say what this repo IS (registers into `gv-clade-index`); `(meta)` the architecture axes; `(agentic)` *may I act now?*; `(ecosystem)` where it sits and what it is not; `(status)` and `(maturity)` where it is now. Read fields with `scripts/deed-field.sh`. |
| `%{data.deed}` | **CHORA**, the repo deed. Its header `:repo-uuid` is the repo's one id, and `(identity)` and `(lineage)` say what this repo IS; a `(clade)` clause, when present, records the repo's clade placements: identity facts about where it sits, never its id and never an edict. chora-registry (formerly `gv-clade-index`) is authoritative for them; this repo's validation checks only that a declared clade is one of the 12 shelves; `(meta)` the architecture axes; `(agentic)` *may I act now?*; `(ecosystem)` where it sits and what it is not; `(status)` and `(maturity)` where it is now. Read fields with `scripts/deed-field.sh`. |
| `(anchor)` | *Semantic authority + golden path* — what downstream may extend-not-redefine; if a recognised-drift / re-anchor marker is present, it **supersedes** accumulated context — read it first. |
| `(neurosym)` | *Meaning* of operations — proof obligations. |
| `(playbook)` | *How* permitted actions run. |
| `docs/status/ROADMAP.adoc` | *What is next* — milestones, blockers, next actions. |
| 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). |
| k9 | *Validation*. Kennel (data) / Yard (pure eval) / Hunt (guarded exec). |

**The chora and CLADE are different things** (owner, 2026-11-15; standards A1 CHORA-SPEC §11.1):
- **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.
- **`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.
- **The aesthetic spans both**: what one experiences of the repo from outside, and in its ordering within.
- 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`.

## Canon pointers
Estate data-format route: **kyq** handles exactly **TOML, Dhall, KYAML,
I-JSON/JCS**. Preserve TOML/Dhall; migrate YAML/YML to KYAML and JSON variants
Expand All @@ -74,27 +109,66 @@ grammars. Canon: `metadatastician/standards/3-practice/DATA-FORMAT-ROUTING.adoc`
Planned support is not operational evidence: retain explicit transitional
checks until a pinned kyq executable passes positive and negative tests.

- `hyperpolymath/standards` — the canon source. · `hyperpolymath/gv-clade-index` — the estate map (identity registry). · `hyperpolymath/manifesto` — this doctrine.
- `hyperpolymath/standards` — the canon source. · `hyperpolymath/gv-clade-index` (being renamed chora-registry) — the estate registry of repo identities and classification schemes. · `hyperpolymath/manifesto` — this doctrine.
- **Before you invent, rename, or consolidate anything: STOP and check the map + IS-NOT.**

## Estate language policy (overridable per-repo via AGENTIC)
Deny: **Nix, Python, Go, TypeScript, ReScript, AGPL**. (Guix, not Nix.)
Deny: **%{std.string.join ", " estate_denied}**. (Guix, not Nix.)
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.
Use plain JavaScript when this tooling is needed. TypeScript and ReScript migrate to AffineScript.

## Asking the owner
Put every question that needs the owner's decision through the selector (the AskUserQuestion tool), not as prose at the end of a report. Batch up to four per call, offer concrete options with the recommended one first, and say what each option would cause.

## Proofs — which prover for which obligation

Normative source: `3-practice/PROOF-POLICY.adoc` in `hyperpolymath/standards`.
Read it there; `verification/proofs/README.adoc` maps it onto this repo.

| Code or obligation | Verifier |
|---|---|
| Rust code | **Creusot** with **Pearlite** contracts, and **Verus**, by default and on the code (§1.2). Kani for `unsafe`/FFI seams and Aeneas for Rust that implements an Agda theorem run alongside, never instead |
| Ada code | **SPARK** |
| APIs, ABIs, engineering properties | **Idris2** |
| Theory | **Agda**, rechecked in **Rocq** and **Lean** (no Mathlib) |

Always name Creusot, Pearlite and Verus in Rust verification plans and in
`docs/status/PROOF-STATUS.adoc`. Pearlite is Creusot's specification
language, not a third verifier. Plan scopes for both verifiers, and record
any that is unsupported, inapplicable or not yet run, with its reason; never
present an unexecuted check as a pass. Using both does not make two
independent witnesses (policy §1.2).

Third-party code (crates such as Bevy, libraries, forks) is **not** converted
or re-proved. Where a proof relies on a dependency the prover does not check,
state the reliance as an `ASSUMED` boundary specification. Where the
dependency's whole import cone compiles under the prover's safe mode with zero
postulates, it is *checked, not assumed*: record the cone (root module, flags,
postulate count of zero, library name, version and pin) instead of an
`ASSUMED` row (policy §1.1). A cone with a postulate, or compiled outside safe
mode, is not checked. When choosing between dependencies that fit equally
well, prefer one that carries its own verification. A preference, not a gate.

Proof Witness Grades are policy §8. They apply to *theory* theorems only: Agda
source, rechecked in Rocq and Lean (§8.1). Engineering proofs (Creusot, Verus,
SPARK, Idris2) are not graded on this ladder; they use the §5 tokens only. For
a theory theorem, `PWG-3` < `PWG-2i` < `PWG-2ii` < `PWG-1`, where `PWG-1` is
strongest. A theorem that does not reach `PWG-3` is `ungraded`, with no
qualifier. A grade is derived from receipts, never asserted. A "verified" or
"machine-checked" claim needs current receipts. Report a census with its
denominator, never a percentage. Always write the `PWG-` prefix: CRG, TRG, ARG
and FRG letters, and ECHIDNA's `TrustLevel`, are different schemes.

---

# This repo: `%{data.canonical_name}` · clade `%{data.prefixed_name}`
# This repo: `%{data.canonical_name}`

- **Identity** — uuid `%{data.uuid}`; clade `%{data.clade_primary}` (secondary `%{data.clade_secondary}`); born %{data.born}; forge `%{data.forge_gh}`.
- **Identity** — chora id `%{data.uuid}`; clade: %{data.clade_aid}; born %{data.born}; forge `%{data.forge_gh}`.
- **IS** — %{data.purpose}
- **IS-NOT** — %{data.isnot}
- **Where it sits** — pipeline position **%{data.pipeline_pos}**; chain `%{data.chain}`; coordination = `%{data.coordination}`.
- **Constraints here** (AGENTIC) — fail-closed; evidence-per-step; no-silent-skip; rerun-after-fix; release-claim-requires-hard-pass. Never: banned langs (above), secrets, state files in repo root, AGPL. Details: the deed's `(bot-directives (methodology) (coverage) (debt))` clauses.
- **Golden path** (ANCHOR) — `%{data.golden_smoke}` → %{data.golden_crit}.
- **Golden path** (ANCHOR) — `%{data.golden_smoke}` → %{data.golden_crit}.%{anchor_override}
- **State** — phase %{data.phase}; maturity %{data.maturity}. Milestones and next actions: `docs/status/ROADMAP.adoc`.

<!-- ARRIVAL-PACK:END · provenance: %{provenance} · Manifesto@%{manifesto_pin} · regenerate: `just claude-md` (k9 drift-detects; do not hand-edit above) -->
Expand Down
65 changes: 51 additions & 14 deletions .machine_readable/arrival-pack/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,44 @@ items() {
printf '%s' "$out"
}

# lines PATH KEY -> the deed list :KEY ( … ), one item per line, "" when absent
lines() {
local out rc=0
out="$(bash "$READ" --list "$DEED" "$1" "$2")" || rc=$?
[[ "$rc" -le 1 ]] || return "$rc"
printf '%s' "$out"
}

# hash12 -> short content hash of stdin (drift provenance)
hash12() { sha256sum | cut -c1-12; }

# The identity is the deed's own TYPED literal (#u5"<name>", later #u8"<domain:name>"),
# never a computed hex uuid. The uuid is derived from that name and never
# stored (deed.abnf); printing its hex form put a version-5 literal in
# CLAUDE.md, which ADR-008's strict gate (owner ruling D320, standards
# governance job uuid-v7-conformance) rejects in every minted repo. The
# typed literal says what the identifier is, as ADR-008 asks of legacy ids,
# and follows the deed when it moves to version 8.
# The identity is the deed's own TYPED literal, printed as written:
# #uuid"<v8 id>" (minted once, A7 J11), or the computed #u8"<domain:name>".
# The pack never prints a derived hex form of a name literal: that once put a
# version 5 id in CLAUDE.md, which ADR-008's strict gate (owner ruling D320)
# rejects in every minted repo. The typed literal says what the identifier is,
# as ADR-008 asks.
uuid_name="$(field '' repo-uuid)"
uuid=""
[ -z "$uuid_name" ] || uuid="$(sed -n -E 's/^[[:space:]]*:repo-uuid[[:space:]]+(#u[0-9]+"[^"]*").*/\1/p' "$DEED" | head -1)"
if [[ -n "$uuid_name" ]]; then
# --typed keeps the tag and quotes, and reads the literal wherever the layout puts it
rc=0
uuid="$(bash "$READ" --typed "$DEED" '' repo-uuid)" || rc=$?
[[ "$rc" -le 1 ]] || exit "$rc"
[[ "$uuid" =~ ^#u(uid|[0-9]+)\"[^\"]*\"$ ]] || uuid=""
fi
[ -z "$uuid_name" ] || [ -n "$uuid" ] \
|| { echo "extract.sh: $(basename "$DEED") :repo-uuid is not a typed #u<n>\"...\" literal" >&2; exit 2; }
|| { echo "extract.sh: $(basename "$DEED") :repo-uuid is not a typed #uuid\"...\" or #u<n>\"...\" literal" >&2; exit 2; }
# A version 5 identity is reported, not refused, here: this is the arrival-pack
# reader, not the gate. Standards A1 v0.4.5 C10 and T30 (ruling Q2) make
# v5-identity and u5-identity errors in every mode, and `just validate-rsr`
# and estate-rules (scripts/check-identity.sh) refuse them. The chora id is the
# v8 id of the birth path.
case "$uuid" in
'#u5"'*|'#uuid"'????????-????-5*)
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 ;;
*) ;; # any other identity is printed as written, with nothing to report
esac

# read_clauses -> the clauses this pack reads, one token per line. Hashing only
# these keeps an unrelated deed edit (say a canon-pin bump) from reading as drift.
Expand All @@ -81,9 +104,18 @@ isnot="$(items ecosystem not ' · ')"
canonical_name="$(field '' canonical-name)"
[ -n "$canonical_name" ] \
|| { echo "extract.sh: $(basename "$DEED") has no :canonical-name" >&2; exit 2; }
prefixed_name="$(field identity prefixed-name)"
# Clade placements are identity facts about where the repo sits, never its id
# and never an edict; chora-registry is authoritative for them (standards A1
# §11, ruling W10). The clause is optional.
clade_primary="$(field clade primary)"
clade_secondary="$(items clade secondary ', ')"
if [[ -z "$clade_primary" ]]; then
clade_aid="none declared (optional placement)"
elif [[ -n "$clade_secondary" ]]; then
clade_aid="$clade_primary (secondary $clade_secondary; placement)"
else
clade_aid="$clade_primary (placement)"
fi
born="$(field lineage born)"
forge_gh="$(field forges github)"
purpose="$(field ecosystem purpose)"
Expand All @@ -94,16 +126,17 @@ phase="$(field status phase)"
maturity="$(field maturity level)"
golden_smoke="$(items anchor/golden-path smoke-test-command ' && ')"
golden_crit="$(items anchor/golden-path success-criteria '; ')"
# The anchor may override the estate language policy for this repo only.
anchor_forbidden="$(lines anchor/implementation-policy forbidden)"
anchor_allowed="$(lines anchor/implementation-policy allowed)"
anchor_clause="$(bash "$READ" --clause "$DEED" anchor)"
h_deed="$(read_clauses | hash12)"
h_anchor="$(printf '%s\n' "$anchor_clause" | hash12)"

jq -cnS \
--arg canonical_name "$canonical_name" \
--arg prefixed_name "$prefixed_name" \
--arg clade_aid "$clade_aid" \
--arg uuid "$uuid" \
--arg clade_primary "$clade_primary" \
--arg clade_secondary "$clade_secondary" \
--arg born "$born" \
--arg forge_gh "$forge_gh" \
--arg purpose "$purpose" \
Expand All @@ -118,4 +151,8 @@ jq -cnS \
--arg golden_crit "$golden_crit" \
--arg h_deed "$h_deed" \
--arg h_anchor "$h_anchor" \
'$ARGS.named'
--arg anchor_forbidden "$anchor_forbidden" \
--arg anchor_allowed "$anchor_allowed" \
'$ARGS.named
| .anchor_forbidden |= (split("\n") | map(select(. != "")))
| .anchor_allowed |= (split("\n") | map(select(. != "")))'
Loading
Loading