Carries the SHACL contract shipped at jouleclaw/vocab/v1.shapes.ttl across every TX Science sister standard. Each standard now has a SHACL Core shape graph that validates its main wire types locally — before a payload crosses a tool boundary, a rail driver, a lockstep replicator, a CDN cache, an inference vendor. Live at the same prefix as the JSON-LD + Turtle vocab: https://arl.transaction.science/vocab/v1.shapes.ttl https://openpay.transaction.science/vocab/v1.shapes.ttl https://byte.transaction.science/vocab/v1.shapes.ttl https://eoc.transaction.science/vocab/v1.shapes.ttl https://wai.transaction.science/vocab/v1.shapes.ttl All five serve with Content-Type: text/turtle (joulecode.t.s does not yet have a site config so the file lives in repo only). What each shape graph covers: arl/vocab/v1.shapes.ttl Claim (four-axis: 1–9 validation depth, A–E convergence, energy profile, S0–S4 security, plus derived arlScore in 1–9), Session (Tier 0–3 isolation + replayable/tampering booleans + joules), Attestation (Ed25519 signature 128 hex + public key 64 hex + signedAt), Evaluation (input/output BLAKE3 hex 64). openpay/vocab/v1.shapes.ttl Money (signed integer + ISO 4217 3-letter currency), Receipt (method ∈ {Card, A2A, Stablecoin, Wallet, EMV}; rail ∈ {FedNow, PIX, SEPAInstant, USDC, USDT}; status ∈ {Authorized, Captured, Settled, Refunded, Voided, Disputed, Failed}; idempotencyKey required), Refund (refundedAt required), Card (scheme ∈ {Visa, Mastercard, Amex, Discover} + vaultRef required). smart-byte/vocab/v1.shapes.ttl Byte (BLAKE3 64-hex content hash, issuer IRI, cargo + cargoClass ∈ {Value, Coding, Identity, Telemetry, Custom}, energy provenance, signature 128 hex, sequence ≥ 0), LockstepEvent (previousHash + contentHash hex + lockstepHeight ≥ 0 + signature), AID ([A-Za-z0-9_-]+ identifier). eoc/vocab/v1.shapes.ttl Receipt (stageClosed ∈ {Cache, KeyValue, Graph, Neural} + joules_uj ≥ 0 + energy provenance + input/output BLAKE3 hex 64 + closedAt RFC 3339), CarbonRecord (carbonGrams ≥ 0), Query (queryText required). wai/vocab/v1.shapes.ttl Manifest (modality ∈ {Image, Audio, Video, Volume, Mesh, Compressed}; path ∈ {NeuralPath, ZerothPath}; codec ∈ the v1 registered menu of nine; contentHash BLAKE3 hex 64; size ≥ 0; mediaType IANA-shaped), NeuralPrior (sharedPriorUri IRI + sharedPriorHash hex 64). joule-code/vocab/v1.shapes.ttl Receipt (tierClosed ∈ {L0Cache, L1Lawful, L2Embed, L3Model, L4Wire} + joulesMeasuredUj + joulesEstimatedUj + energy provenance + closedAt), Transition (operation ∈ {Edit, Refactor, Generate} + sourceBefore/ AfterHash BLAKE3 hex 64), Agent (agentId + agentVendor ∈ {ClaudeCode, Gemini, Codex, GenericAgent} + acpEndpoint). Every shape graph uses SHACL Core only — no SPARQL constraints, no qualified value shapes. Consumable by: - Any full SHACL validator (pyshacl, Apache Jena, TopBraid). - The lightweight jouleclaw-shacl Rust validator, which is the reference and ships in ~600 LOC; WASM-compilable for in-browser validation. - The Python + Go reference clients in jouleclaw-hydra-client/clients/{python,go}/. Each vocab README also gains a row pointing at the shapes file. Operational follow-up done in parallel: the canonical Caddyfile at site-ops/ adds an @<site>_jsonld matcher per site so .jsonld files serve as application/ld+json across all five sister-site hosts (joulecode.t.s does not yet have a site). The Caddyfile is in a separate repo and is being committed via that repo's own flow. The Gen-3 architecture — vocabulary, Hydra discovery, SHACL validation — now spans the entire TX Science open-standards portfolio. A consumer reading any TX-Science wire form can validate it locally before sending; can ground its meaning in typed RDF via JSON-LD; can discover what services it can talk to via Hydra (where the service publishes one). One pattern, seven standards.
31 lines
1.9 KiB
Turtle
31 lines
1.9 KiB
Turtle
@prefix eoc: <https://eoc.transaction.science/vocab/v1#> .
|
|
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
|
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
|
|
# EOC v1 SHACL shapes — validates EOC Receipts + Resolutions
|
|
# against the v1 vocabulary. Enforces the four-stage cascade
|
|
# enum, the energy-provenance enum, and the carbon-record shape.
|
|
|
|
eoc:ReceiptShape a sh:NodeShape ;
|
|
sh:targetClass eoc:Receipt ;
|
|
sh:property [ sh:path eoc:stageClosed ; sh:nodeKind sh:IRI ; sh:minCount 1 ; sh:maxCount 1 ;
|
|
sh:in ( eoc:Cache eoc:KeyValue eoc:Graph eoc:Neural ) ] ;
|
|
sh:property [ sh:path eoc:joulesMicrojoules ; sh:datatype xsd:nonNegativeInteger ; sh:minCount 1 ; sh:maxCount 1 ] ;
|
|
sh:property [ sh:path eoc:energyProvenance ; sh:nodeKind sh:IRI ; sh:minCount 1 ; sh:maxCount 1 ;
|
|
sh:in ( eoc:HwShunt eoc:ModelBased eoc:Estimator ) ] ;
|
|
sh:property [ sh:path eoc:inputHash ; sh:datatype xsd:string ; sh:minCount 1 ; sh:maxCount 1 ;
|
|
sh:pattern "^[a-f0-9]{64}$" ] ;
|
|
sh:property [ sh:path eoc:outputHash ; sh:datatype xsd:string ; sh:minCount 1 ; sh:maxCount 1 ;
|
|
sh:pattern "^[a-f0-9]{64}$" ] ;
|
|
sh:property [ sh:path eoc:closedAt ; sh:datatype xsd:dateTime ; sh:minCount 1 ; sh:maxCount 1 ] ;
|
|
sh:property [ sh:path eoc:modelId ; sh:datatype xsd:string ; sh:maxCount 1 ] ;
|
|
sh:property [ sh:path eoc:vendorId ; sh:datatype xsd:string ; sh:maxCount 1 ] .
|
|
|
|
eoc:CarbonRecordShape a sh:NodeShape ;
|
|
sh:targetClass eoc:CarbonRecord ;
|
|
sh:property [ sh:path eoc:carbonGrams ; sh:datatype xsd:double ; sh:minCount 1 ; sh:maxCount 1 ;
|
|
sh:minInclusive 0.0 ] .
|
|
|
|
eoc:QueryShape a sh:NodeShape ;
|
|
sh:targetClass eoc:Query ;
|
|
sh:property [ sh:path eoc:queryText ; sh:datatype xsd:string ; sh:minCount 1 ; sh:maxCount 1 ] .
|