We define the Knowledge Context standards package for SocioProphet: canonical knowledge artifacts (Note/Claim/Annotation/Edge), meriotopographic semantics (part/whole + placement + derivation + governance), and a provable transport/payload contract using TriTRPC v1 + Avro Path-A + byte fixtures.
This repo is not “docs-only.” We treat standards as executable: schemas define shapes, fixtures define bytes, verifiers prove compliance, and round-trip checks prove semantic correctness.
- Platform governance / context index:
SocioProphet/socioprophet-standards-storage - Canonical transport / envelope / AEAD / framing:
SocioProphet/tritrpc(TriTRPC; we may say triRPC/trirpc/triunerpc interchangeably)
Run from the repo root:
python3 -m venv .venv && ./.venv/bin/python -m pip install -U pip && ./.venv/bin/python -m pip install -r requirements-dev.txt && make hygiene && make verify && make roundtrip
make hygiene
Removes.DS_Storeraces (macOS Finder) and runsmake validate.make validate
Repo sanity checks (no.DS_Store, schema/workload parsing where applicable).make verify
TriTRPC fixture verification: AEAD/AAD boundary, schema/context IDs, SERVICE/METHOD decode, AUX coverage.make roundtrip
Avro Path-A semantic round-trip: encoded bytes decode back to deterministic sample objects.
We standardize knowledge as explicit artifacts with provenance and validation fields:
NoteClaim(assertion + optional evidence + validation state)Annotation(anchored spans)MeriotopographicEdge(relations + governance)ProvenanceRecord(traceability spine)
Canonical structure is documented via JSON Schemas under schemas/jsonschema/.
We define a predicate registry and invariants for:
- part/whole (e.g.,
part_of,has_part) - placement/anchors (e.g.,
located_in,anchors_to,overlaps) - derivation/provenance (e.g.,
derives_from) - epistemic relations (e.g.,
supports,contradicts) - governance/privacy (e.g.,
validated_by,masked_by,redacted_by)
See: docs/standards/020-meriotopographics.md
We bind Knowledge Context RPC calls onto TriTRPC v1:
- envelope field ordering
- AEAD rule (AAD = bytes before tag field)
- schema/context IDs derived from frozen labels
- method naming conventions
- AUX behavior (when present, included in AAD)
See: docs/standards/030-tritrpc-binding.md
Label/ID freeze: docs/standards/031-schema-context-id-registry.md
TriTRPC Path-A uses Avro binary payload bytes. We define protocols for:
knowledge.store.v0requests/responses (REQ/RESP methods);v0remains the initial placeholder store surfaceknowledge.store.v1expansion forAnnotation,ProvenanceRecord,Entity,Passage,Mention,EmbeddingRef, andEntityResolutionRecord- deterministic constraints (no nondeterministic maps; prefer arrays or canonicalized bytes)
See:
schemas/avro/knowledge.store.v0/knowledge.store.v0.avprschemas/avro/knowledge.store.v1/knowledge.store.v1.avpr
We provide JSON-LD contexts for semantic expansion without changing wire payloads:
- canonical
v0context:schemas/jsonld/contexts/knowledge/context.jsonld - draft
v1context:schemas/jsonld/contexts/knowledge.v1/context.jsonld
We define minimal Avro event schemas (separate from RPC payloads):
- note changed
- claim proposed
- claim validated
See: schemas/avro/events.v1/
docs/standards/
Normative documents (MUST/SHOULD language), registries, binding rules.schemas/schemas/avro/— Avro contracts (RPC payload protocol + lifecycle events)schemas/jsonld/— JSON-LD contextsschemas/jsonschema/— canonical structural schemas
rpc/
Service surfaces and TriTRPC wire mapping metadata (e.g.,rpc/knowledge.store.v0.yaml,rpc/knowledge.store.v1.yaml).fixtures/
Hex fixture vectors + nonces (TriTRPC compliance), including AUX coverage.tools/
Generators/verifiers and Avro payload helpers:- TriTRPC fixture generator + verifier
- Avro payload byte builder (Path-A)
- Avro round-trip verifier
benchmarks/
Workload definitions and early benchmark tooling (report-first).
This repo is a compatibility surface. When we change it, we change it carefully.
- If we change envelope rules, we update:
docs/standards/030-tritrpc-binding.md- fixtures in
fixtures/ - verifier in
tools/
- If we change schema/context labels or IDs, we:
- do not rename labels
- add new labels (e.g.,
KNOWLEDGE_AVRO_v1) - update the registry
docs/standards/031-schema-context-id-registry.md
- If we extend the store surface, we prefer adding a new versioned contract rather than mutating a frozen label in place.
- If we change payload schema semantics, we update:
- Avro protocol (
.avpr) - fixture generator (payload bytes)
- JSON-LD contexts when semantic coverage changes
make roundtripexpectations
- Avro protocol (
- Work in
~/dev/clones. - Use
ghCLI for PR operations. - Keep changes small and mainline via PR merges.
- Always run:
make hygiene && make verify && make roundtripbefore pushing a PR.
Last updated: update via PR when this README changes