domain tier

domain-transcript-shard

Local, deterministic structural decomposition of speaker-turn transcripts (court transcripts, depositions, interviews, meeting minutes): line-number parsing, speaker-turn grouping, citation-phrase detection, and pattern-based statement classification, emitting an opaque-ID shard with every real name and citation spelling replaced -- the AI never sees the raw prose. Implements the document-structural-decomposition gap named in ADR 0035 (semantic mediation). Pure logic, zero I/O, zero AI calls -- it produces input for a disclosure-minimized AI question, it never asks one itself.

Local, deterministic structural decomposition of speaker-turn transcripts (court transcripts, depositions, interviews, meeting minutes): line-number parsing, speaker-turn grouping, citation-phrase detection, and pattern-based statement classification, emitting an opaque-ID shard with every real name and citation spelling replaced -- the AI never sees the raw prose. Implements the document-structural-decomposition gap named in ADR 0035 (semantic mediation). Pure logic, zero I/O, zero AI calls -- it produces input for a disclosure-minimized AI question, it never asks one itself.

Tierdomain
Roleunclassified (baselined)
Pathcrates/domain/transcript-shard
Edition2021
Targetstranscript-shard, domain_transcript_shard
Public items12 across 0 modules
Tests11

What it is for

Local, deterministic structural decomposition of speaker-turn transcripts: numbered lines -> speaker turns -> pattern-classified statement types -> an opaque-ID shard.

This is the "document structural decomposition" layer named as a real gap in docs/architecture/adr/0035-privacy-preserving-semantic- mediation.md's inventory ("nothing in the inventory parses an arbitrary document into structure in this direction"). Every step here is string parsing and pattern matching -- nothing in this crate calls an AI, makes a network request, or shells out. It produces the minimal disclosure shard a caller would hand to an AI for one narrow question; it never asks that question itself.

Applies to any speaker-turn transcript -- court transcripts, depositions, interviews, meeting minutes -- not only legal proceedings. StatementType's ProceduralCourtesy/ProceduralRuling variants are formal-proceeding-flavored, but the parsing/detection machinery itself is generic (Gate 4.5 AC-generic; Gate 1.5 consensus, docs/userstories/sprint-3.48-transcript-shard.md).

Capabilities

crate root

Local, deterministic structural decomposition of speaker-turn

Item
fn split_speaker_prefix(text : & str) -> Option <(String, String)>
fn detect_repeated_title_case_phrases(texts : & & str) -> Vec <String>

RawLine

Local, deterministic structural decomposition of speaker-turn

Item
pub struct RawLine
fn parse_raw_lines(text : & str) -> Vec <RawLine>

Shard

Local, deterministic structural decomposition of speaker-turn

Item
pub struct Shard
fn build_shard(turns : & Turn, task : & str, allowed_outputs : Vec <String>) -> Shard

StatementRef

Local, deterministic structural decomposition of speaker-turn

Item
pub struct StatementRef

StatementType

Local, deterministic structural decomposition of speaker-turn

Item
pub enum StatementType
fn classify_statement(text : & str) -> StatementType

Turn

Local, deterministic structural decomposition of speaker-turn

Item
pub struct Turn
fn group_turns(lines : & RawLine) -> Vec <Turn>
fn detect_citation_phrases(turns : & Turn) -> Vec <String>

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 struct RawLineOne physical line of the source text: an optional leading line number (the transcript's own numbering) and the text after it
fn parse_raw_lines(text : & str) -> Vec <RawLine>Parse raw transcript text into numbered lines
fn split_speaker_prefix(text : & str) -> Option <(String, String)>If text starts with an all-uppercase word sequence followed by a colon ("LORD PANNICK:", "THE PRESIDENT:"), split it into (speaker, rest)
pub struct TurnOne speaker's contiguous turn: who spoke, the transcript line range it spans, and the full text (continuation lines merged with a space)
fn group_turns(lines : & RawLine) -> Vec <Turn>Group numbered lines into speaker turns
pub enum StatementTypeA turn's structural type, decided by pattern alone -- no AI
fn classify_statement(text : & str) -> StatementTypeClassify one turn's text
fn detect_repeated_title_case_phrases(texts : & & str) -> Vec <String>Find candidate document/case-citation phrases across any set of texts: runs of 2+ consecutive Title-Case words, repeated at least twice across all of them
fn detect_citation_phrases(turns : & Turn) -> Vec <String>Same detection, over a transcript's turns specifically -- thin wrapper kept for callers already working with Turns.
pub struct StatementRefOne statement in the emitted shard: an opaque speaker ID, the opaque document IDs it references, and its structural type
pub struct ShardThe minimal-disclosure shard: opaque parties, opaque documents, typed statements referencing them, and the fixed question being asked.
fn build_shard(turns : & Turn, task : & str, allowed_outputs : Vec <String>) -> ShardBuild a shard from turns: detect citation phrases, assign each unique speaker and each citation an opaque ID in first-appearance order, and classify every turn

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

Boundary

Reaches into foundation.

Shares tier domain with 41 other crates: domain-agreements, domain-ai-report, domain-billing, domain-catalog, domain-classify, domain-comments, domain-competitive-intel, domain-contact, … (41 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)domain
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/domain/transcript-shard
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_domain["domain"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-text-signals`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
clap^4derivenoalways
serde^1derive, derivenoalways
serde_json^1noalways

Development, in this workspace.

CrateTierOptionalOnly on
`tools-cli-conformance`toolsnoalways

Build. None.

Depended on by. 4 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_domain_prose_shard["domain-prose-shard"] -->|uses| SELF
  n_tools_doc_ask["tools-doc-ask"] -->|uses| SELF
  n_tools_doc_shape["tools-doc-shape"] -->|uses| SELF
  n_tools_knowitall["tools-knowitall"] -->|uses| SELF
  SELF["domain-transcript-shard"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  SELF -->|runtime| n_foundation_text_signals["foundation-text-signals"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

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

Targets

KindNameSource
bintranscript-shard`src/main.rs`
libdomain_transcript_shard`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.

4 workspace crates depend on this one: domain-prose-shard, tools-doc-ask, tools-doc-shape, tools-knowitall.

Verification

KindCount
Unit tests11
Integration tests0
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root12013

What the tests establish, by name:

Documentation coverage

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

Metrics

MetricValue
Rust source files2
Source lines632
Code lines458
Public API items12
Public modules0
Tests11
Examples0
Cargo features0
Direct runtime dependencies4
Workspace reverse dependencies4
pie showData
    title Public API by kind
    "enum" : 1
    "function" : 7
    "struct" : 4
pie showData
    title Rust source composition
    "Code" : 458
    "Blank or comment" : 174

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 domain · Manual