038-structured-extraction
Structured extraction step and the model-derived input pattern (amends 002, 003 and 036)
An amendment of approved specs 002, 003 and 036 (R-16), for #76 child B6. Two supported ways to turn free text into typed decision inputs, both keeping extracted values model-derived. Pattern A: the host extracts and submits snapshot entries with provenance `model-derived` and an optional producer identity (artifact, template digest, production time), recorded in evidence and lineage. Pattern B: an `extract` step, a model step of spec 037's bounded envelope, asks a backend for a typed record against a declared schema and vocabularies under an identified prompt template; every field is validated and is present or absent with a reason, never coerced, clamped or truncated; each field carries its origin (`extracted`, `fallback`, `absent`) and derivation; a deterministic in-core fallback extractor (`rustev.extract-rules/1`) yields exact-derived fields; per-field distributions exist only from backend log-probabilities and are thresholded only under a bound calibration or a declared `uncalibrated_threshold`. In both patterns an exact operator, policy predicate, proposal parameter, acquisition request or other model step reads a model value only through a declared acceptance rule (an `accept_model_derived` step, or a spec 033 check covering `model-derived`); selection-policy controls never read one. Extraction can drive spec 033's `needs_input` outcome and propose which declared questions it asks. Adds to the shared #76 versions; every version 1 definition keeps its bytes, its plan and its `PlanId`. Approved (A-35); implementation is complete.
Read the full pinned specification ↗Relationships
depends on
- 001-boundaries-and-authority
- 002-decision-contract-and-pure-core
- 003-runtime-execution-and-evidence
- 004-evaluation-and-replay
- 005-reference-backends
- 008-reference-package-lodging
- 032-evidence-quality
- 033-provenance-rules-and-actionable-outcomes
- 034-parameterized-definitions
- 035-screening-seam
- 036-mid-plan-acquisition
- 037-generation-steps
depended on by
Claimed units
- extends
{ "nature": "amending", "spec": "002-decision-contract-and-pure-core", "unit": { "kind": "directory", "path": "crates/rustev-contract/" } } - extends
{ "nature": "amending", "spec": "002-decision-contract-and-pure-core", "unit": { "kind": "directory", "path": "crates/rustev-core/" } } - extends
{ "nature": "amending", "spec": "003-runtime-execution-and-evidence", "unit": { "kind": "directory", "path": "crates/rustev-runtime/" } } - extends
{ "nature": "additive", "spec": "008-reference-package-lodging", "unit": { "kind": "directory", "path": "packages/rustev-pkg-lodging/" } } - extends
{ "nature": "additive", "spec": "001-boundaries-and-authority", "unit": { "kind": "file", "path": "Makefile" } } - extends
{ "nature": "additive", "spec": "001-boundaries-and-authority", "unit": { "kind": "directory", "path": "scripts/acceptance/" } } - extends
{ "nature": "additive", "spec": "006-cli-surface", "unit": { "kind": "directory", "path": "crates/rustev-cli/" } } - extends
{ "nature": "additive", "spec": "004-evaluation-and-replay", "unit": { "kind": "directory", "path": "crates/rustev-eval/" } } - extends
{ "nature": "additive", "spec": "027-node-and-wasm-bindings", "unit": { "kind": "directory", "path": "crates/rustev-surface/" } } - extends
{ "nature": "additive", "spec": "027-node-and-wasm-bindings", "unit": { "kind": "directory", "path": "integrations/rustev-node/" } } - extends
{ "nature": "additive", "spec": "027-node-and-wasm-bindings", "unit": { "kind": "directory", "path": "integrations/rustev-wasm/" } } - extends
{ "nature": "additive", "spec": "010-integrations", "unit": { "kind": "directory", "path": "integrations/rustev-aicortex/" } } - extends
{ "nature": "additive", "spec": "010-integrations", "unit": { "kind": "directory", "path": "integrations/rustev-serve/" } } - extends
{ "nature": "additive", "spec": "028-opentelemetry-evidence-sink", "unit": { "kind": "directory", "path": "integrations/rustev-otel/" } } - extends
{ "nature": "additive", "spec": "007-support-routing-package", "unit": { "kind": "directory", "path": "packages/rustev-pkg-support-routing/" } } - extends
{ "nature": "additive", "spec": "031-public-api-and-release-family", "unit": { "kind": "directory", "path": "tools/rustev-release/" } } - extends
{ "nature": "additive", "spec": "010-integrations", "unit": { "kind": "directory", "path": "integrations/rustev-jev/" } } - extends
{ "nature": "additive", "spec": "010-integrations", "unit": { "kind": "directory", "path": "integrations/rustev-remote-http/" } }
Source headings
- 038: Structured extraction step and the model-derived input pattern (amends 002, 003 and 036)
- 1. Purpose
- 2. Territory
- 2.1 Binding principles of #76
- 3. Behavior
- 3.1 Terms
- 3.2 Pattern A: host-side extraction
- 3.3 The extract step
- 3.4 Field validation and presence
- 3.5 Origin, derivation and lineage
- 3.6 Per-field distributions and calibration
- 3.7 The fallback extractor
- 3.8 Acceptance steps
- 3.9 The model-value gate
- 3.10 Backend capability and output
- 3.11 Runtime (amends spec 003)
- 3.12 Evidence and judgment
- 3.13 Needs input from extraction
- 3.14 Compatibility and identity
- 3.15 Lodging reference example
- 3.16 Alignment with sibling #76 specs
- 4. Out of scope
- 5. Observable negative cases
- Acceptance
- Verification
- Implementation record
- Decisions at approval
Frozen anchors
No frozen anchors declared.