pub struct Features {
pub version: u32,
pub task_kind: TaskKind,
pub language: Option<String>,
pub agent: Option<String>,
pub subagent: Option<String>,
pub prompt_token_bucket: u32,
pub tool_count: u32,
pub has_images: bool,
pub repo_fingerprint: Option<String>,
pub session_failure_count: u32,
pub hour_bucket: u8,
}Expand description
The per-request feature vector (§9.2).
Rolling per-bucket statistics (e.g. prior_rung_clearance) are intentionally not
here — they live in the trace store, not the deterministic per-request contract.
Fields§
§version: u32Feature-extraction contract version (features@vN).
task_kind: TaskKindCoarse task classification.
language: Option<String>Programming language, when known (lowercased identifier, e.g. "rust").
agent: Option<String>Calling agent identity, when known (e.g. "compass").
subagent: Option<String>Calling subagent identity, when known (e.g. "test-runner").
prompt_token_bucket: u32Coarse bucket of the prompt’s token count (see token_bucket) — never the raw count.
tool_count: u32Number of tools/functions offered in the request.
has_images: boolWhether the request carried image content.
repo_fingerprint: Option<String>Salted, truncated hash of the repository identity (see repo_fingerprint) — never a path.
session_failure_count: u32How many attempts have already failed in this session (drives session promotion, §8.4).
hour_bucket: u8Hour-of-day bucket in UTC, 0..=23 (see hour_bucket).