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.
| Tier | foundation |
| Role | value_object |
| Path | crates/foundation/encounter-vocabulary |
| Edition | 2021 |
| Targets | foundation_encounter_vocabulary |
| Public items | 8 across 0 modules |
| Tests | 9 |
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`
| Item | What it is |
|---|---|
pub enum DerivesSexual | What one token settles about whether an encounter was sexual |
pub struct Action | One token of the site's closed vocabulary. |
pub enum Sexual | The derived axis: was this person someone the operator has been sexual with |
Sexual :: fn as_str(self) -> & 'static str | The stored form, matching sighting_relationship.sexual's CHECK constraint. |
Sexual :: fn parse(s : & str) -> Self | Read 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>) -> Sexual | Derive 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 |
| Location | crates/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
| Kind | Name | Source |
|---|---|---|
| lib | foundation_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
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none 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.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 9 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 6 | 0 | 0 |
What the tests establish, by name:
a_token_can_be_looked_up_by_name—src/lib.rsa_token_the_site_added_later_is_a_question_too—src/lib.rsan_unratified_token_is_a_question_not_a_no—src/lib.rsencounters_that_settle_nothing_settle_no—src/lib.rsevery_token_is_classified—src/lib.rsno_encounters_is_unknown_and_never_no—src/lib.rsone_settling_token_settles_it—src/lib.rsthe_seed_parses_and_is_not_empty—src/lib.rsthe_stored_form_round_trips_and_matches_the_check_constraint—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 8 | 8 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 8
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 1 |
| Source lines | 295 |
| Code lines | 175 |
| Public API items | 8 |
| Public modules | 0 |
| Tests | 9 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 0 |
| Workspace reverse dependencies | 0 |
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.