Skip to main content

Module shape

Module shape 

Source
Expand description

Structural shape classifier for tool responses.

Ports the classifier from docs/research/scripts/extract_paper2_format_events.py into Rust. Keep the two in sync so offline analyses and online decisions share the same taxonomy.

Shape is detected by a two-step rule:

  1. If the content parses as JSON, classify by JSON structure.
  2. Otherwise, scan the text for markdown / code / numbered-list patterns.

Structs§

ClassifiedResponse
Result of classifying one response.

Enums§

InnerFormat
Categories of inner formats we sniff inside string leaves and prose.

Functions§

classify
Classify a response body. Never panics; always returns a Shape (Unknown if nothing matches).