tools tier

tools-doc-shape

tools-doc-shape: detect a document's structural shape (tabular, speaker-turn transcript, or prose) and report which sharder applies, without ever printing real content -- structural counts only. Routes to domain-table-shard or domain-transcript-shard; reports prose honestly as unsupported rather than guessing.

tools-doc-shape: detect a document's structural shape (tabular, speaker-turn transcript, or prose) and report which sharder applies, without ever printing real content -- structural counts only. Routes to domain-table-shard or domain-transcript-shard; reports prose honestly as unsupported rather than guessing.

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/doc-shape
Edition2021
Targetstools-doc-shape, tools_doc_shape
Public items3 across 0 modules
Tests7

What it is for

Detect a document's structural shape so the right sharder gets picked automatically instead of the operator guessing: tabular (GFM tables) -> domain-table-shard, speaker-turn dialogue -> primitives- transcript-shard, otherwise prose, which neither existing sharder covers -- reported honestly as unsupported rather than forced into the wrong shape.

Reuses both sharders' own real parsers to detect shape (never a separate heuristic reimplementation of table/turn detection) and never prints or returns a real cell value, cell, or line of prose -- only structural counts, the same disclosure boundary as both sharders themselves.

Capabilities

DocShape

Detect a document's structural shape so the right sharder gets picked

Item
pub enum DocShape

ShapeReport

Detect a document's structural shape so the right sharder gets picked

Item
pub struct ShapeReport
fn detect_shape(text : & str) -> ShapeReport

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 DocShapeThe detected shape, and which sharder (if any) applies.
pub struct ShapeReportStructural counts only -- no table headers, no turn text, no real content of any kind
fn detect_shape(text : & str) -> ShapeReportDetect text's shape

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

Boundary

Reaches into domain.

Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-book-report, … (84 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)tools
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/tools/doc-shape
Vocabulary in force (lexicon)current

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

flowchart LR
  n_tools["tools"] --> n_domain["domain"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`domain-table-shard`domainnoalways
`domain-transcript-shard`domainnoalways

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. 2 workspace crates.

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

flowchart LR
  n_tools_doc_ask["tools-doc-ask"] -->|uses| SELF
  n_tools_knowitall["tools-knowitall"] -->|uses| SELF
  SELF["tools-doc-shape"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  SELF -->|runtime| n_domain_table_shard["domain-table-shard"]
  SELF -->|runtime| n_domain_transcript_shard["domain-transcript-shard"]
  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
bintools-doc-shape`src/main.rs`
libtools_doc_shape`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.

2 workspace crates depend on this one: tools-doc-ask, tools-knowitall.

Verification

KindCount
Unit tests7
Integration tests0
Examples0
Doctests0

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

ModuleTestsExamplesConsumers
crate root304

What the tests establish, by name:

Documentation coverage

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

Metrics

MetricValue
Rust source files2
Source lines216
Code lines148
Public API items3
Public modules0
Tests7
Examples0
Cargo features0
Direct runtime dependencies5
Workspace reverse dependencies2
pie showData
    title Public API by kind
    "enum" : 1
    "function" : 1
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 148
    "Blank or comment" : 68

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