Data Model¶
The implemented model layer revolves around these core objects:
ObservationSpanWorkUnitClassificationTracePolicyDecisionEvidenceRefPolicyPackReportArtifact
ObservationSpan¶
ObservationSpan is the normalized ingestion record. Every supported input path maps into this object before anything else happens.
Key fields:
source_kindtrace_id,span_id,parent_span_idspan_kind,name,start_time,end_timetoken_input,token_output,direct_costtoken_taxesfor optional token-tax metadataattributesfor mapped source fieldsfacetsfor namespaced metadata such ashf,smoltrace,git,marketing, orsupportraw_payload_reffor source lineage such ashf://dataset/split/row#message-2work_unit_keyfor sources that already expose a useful rollup boundary
WorkUnit¶
WorkUnit is the main primitive in this repository. It groups one or more observations into a unit a person can inspect, review, and reason about.
Key fields:
title,summary,objectiveactor,actor_kind,project,team,cost_centerreview_state,trust_statedirect_cost,allocated_cost,total_costsource_span_ids,compression_ratioevidence_bundle,lineage_refslabels,facets,source_systems
This is where raw execution detail becomes accountable work.
ClassificationTrace¶
ClassificationTrace is a downstream interpretation of one WorkUnit. It exists only after wl classify runs.
Key fields:
policy_basis,work_category,policy_outcomecost_category,direct_cost,indirect_cost,blended_costconfidence_score,evidence_score,evidence_strengthreviewer_required,reviewer_status,override_statusdecisionsfor explainable policy outcomes
Supporting Objects¶
PolicyDecision: one rule match or default policy decisionEvidenceRef: evidence stored inside aWorkUnitPolicyPack: YAML-loaded ruleset forwl classifyPolicyRun: summary row for one classification runReportArtifact: persisted reference to a generated report file
Relationship¶
flowchart LR
A["ObservationSpan"] --> B["WorkUnit"]
B --> C["Optional ClassificationTrace"]
C --> D["Review queue / reports / exports / economics"]