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
62 changes: 57 additions & 5 deletions .machine_readable/arrival-pack/arrival-pack.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ 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

let anchor_override =
if std.array.length data.anchor_forbidden == 0 then ""
else "\n- **Anchor override** (ANCHOR) — This repo's anchor forbids: %{std.string.join ", " data.anchor_forbidden}. The anchor overrides the estate policy above."
Comment on lines +24 to +25

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include allowed languages in the anchor override

When a repository's anchor/implementation-policy/allowed list permits a language denied by the estate policy (for example, Go), this condition either omits the override entirely when forbidden is empty or renders only the forbidden entries. Although extract.sh now reads and exports anchor_allowed, the generated guidance still tells agents that the estate denial applies, so minted repositories can receive instructions that contradict their anchor. Build the override from both allowed and forbidden entries.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked. The description is accurate: extract.sh exports anchor_allowed, and arrival-pack.ncl renders only anchor_forbidden, so an anchor that allows an estate-denied language would not show in the generated pack.

It does not bite in this repo: sholes' anchor allows Rust, Idris2, Zig, Scheme, Shell, Just, AsciiDoc and Markdown, none of which the estate policy denies, and forbids Node.js and npm, which the line renders.

Not fixed in this PR: both files are the template's, carried unchanged, so a change to the engine belongs in rsr-template-repo. Raised with the owner.


Generated by Claude Code

in

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

Expand Down Expand Up @@ -57,7 +62,7 @@ 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. |
Expand All @@ -66,7 +71,15 @@ The descriptive family (working name *descriptiles*) describes what-is; the **co
| k9 | *Validation*. Kennel (data) / Yard (pure eval) / Hunt (guarded exec). |

## Canon pointers
- `hyperpolymath/standards` — the canon source. · `hyperpolymath/gv-clade-index` — the estate map (identity registry). · `hyperpolymath/manifesto` — this doctrine.
Estate data-format route: **kyq** handles exactly **TOML, Dhall, KYAML,
I-JSON/JCS**. Preserve TOML/Dhall; migrate YAML/YML to KYAML and JSON variants
through kyq using **hyperpolymath/ijson-jcs**, the actual estate implementation
repository. **kyX** owns wider projection. DEED/K9/coordination keep their own
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` (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)
Expand All @@ -77,16 +90,55 @@ Use plain JavaScript when this tooling is needed. TypeScript and ReScript migrat
## 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
66 changes: 51 additions & 15 deletions .machine_readable/arrival-pack/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,43 @@
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

Check failure on line 82 in .machine_readable/arrival-pack/extract.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Add a default case (*) to handle unexpected values.

See more on https://sonarcloud.io/project/issues?id=hyperpolymath_sholes&issues=AaHekzzQMjp1Ei8xNNow&open=AaHekzzQMjp1Ei8xNNow&pullRequest=13
'#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 ;;
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 +103,18 @@
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 +125,17 @@
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 -n \
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 +150,8 @@
--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