foundation tier

foundation-encounter-vocabulary

The closed vocabulary for what happened between two people, and what a log of it implies. Compiled from a ratified registry seed; no storage, no framework, no identity model -- so two consumers that key their subjects differently still speak one language.

The closed vocabulary for what happened between two people, and what a log of it implies. Compiled from a ratified registry seed; no storage, no framework, no identity model -- so two consumers that key their subjects differently still speak one language.

Tierfoundation
Rolevalue_object
Pathcrates/foundation/encounter-vocabulary
Edition2021
Targetsfoundation_encounter_vocabulary
Public items8 across 0 modules
Tests9

What it is for

What happened between two people, and what a log of it implies.

# Why this is a crate and not a table

Two consumers need this and they key their subjects differently. The sighting archive records encounters with people observed on a site — (site, external_id), no account, no Party row. The adult application records them between members with real accounts. A shared table would have to pick one of those keys and make the other consumer wrong; a shared vocabulary makes neither wrong, and each keeps its own store.

That is the ViewMode split repeated: the words live once, below both, and each consumer renders and stores them its own way. Change a token here and both fail to compile.

# Why not domain-encounters

It exists, and Gate 0.5 names Encounter. It was read before this was written. It models scheduled visits — Visit / Call / Appointment, scheduled-versus-actual times, a state machine — with participants keyed party_id REFERENCES parties(id). Neither consumer here schedules anything, and the sighting archive has no parties table and is not getting one this sprint. Operator ruling 2026-08-26.

# The vocabulary is not this crate's to invent

The tokens are the site's, measured from 3,056 profiles. They arrive here through docs/reference/scene-action-vocabulary.tsv, which carries the query that re-derives the counts. This crate compiles that file in rather than restating it, so the registry seed is the single source and drift is a build error rather than a discrepancy nobody looks for.

Capabilities

Action

What happened between two people, and what a log of it implies.

Item
pub struct Action
fn vocabulary() -> Vec <Action>
fn action(token : & str) -> Option <Action>

DerivesSexual

What happened between two people, and what a log of it implies.

Item
pub enum DerivesSexual

Sexual

What happened between two people, and what a log of it implies.

Item
pub enum Sexual
Sexual :: fn as_str(self) -> & 'static str
Sexual :: fn parse(s : & str) -> Self
fn derive_sexual <'a>(encounters : impl IntoIterator <Item = & 'a String>) -> Sexual

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub enum DerivesSexualWhat one token settles about whether an encounter was sexual
pub struct ActionOne token of the site's closed vocabulary.
pub enum SexualThe derived axis: was this person someone the operator has been sexual with
Sexual :: fn as_str(self) -> & 'static strThe stored form, matching sighting_relationship.sexual's CHECK constraint.
Sexual :: fn parse(s : & str) -> SelfRead a stored value
fn vocabulary() -> Vec <Action>Every token in the ratified vocabulary, in the seed's order (most-carried first)
fn action(token : & str) -> Option <Action>Look up one token.
fn derive_sexual <'a>(encounters : impl IntoIterator <Item = & 'a String>) -> SexualDerive Sexual from a log of encounters

No pub use re-exports: every item above is declared in this crate.

Boundary

Depends on no other workspace tier.

Shares tier foundation with 27 other crates: foundation-audit-log, foundation-basemodels, foundation-bounded-io, foundation-conversation-closure, foundation-crypto-sign, foundation-decisioning, foundation-fs-metadata, foundation-i18n, … (27 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)foundation
Architectural role (taxonomy)value_object
Locationcrates/foundation/encounter-vocabulary
Vocabulary in force (lexicon)current

Dependencies

Runtime. None.

Development. None.

Build. None.

Depended on by. Nothing in this workspace.

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
libfoundation_encounter_vocabulary`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

No workspace crate depends on this one.

Verification

KindCount
Unit tests9
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root600

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc88
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 8
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files1
Source lines295
Code lines175
Public API items8
Public modules0
Tests9
Examples0
Cargo features0
Direct runtime dependencies0
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "enum" : 2
    "function" : 3
    "method" : 2
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 175
    "Blank or comment" : 120

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All foundation · Manual