SEMANTIC LIBRARY — MONITORING METRIC ONTOLOGY
FLOW ALGEBRA v1.0 | AI CORE / ENTITY GRAPH / MONITORING ENTITIES
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/monitoring-entities/monitoring-metric-ontology.html
Generated: 2026-11-04
Status: Companion formalisation. The public page exposes the title and interpretation note but not its expanded underlying specification; rules below are an independent, proposed formalisation.
1. PURPOSE
Represent an observable monitoring metric as a typed, time-indexed, provenance-linked measurement with a definition, unit, aggregation, target, quality flags and alert semantics. Distinguish measured observations from interpreted assessments and actions.
2. ENTITY DEFINITION
MonitoringMetric M = (id, subject, definition, unit, direction, window, aggregation, source, thresholds, owner, version).
MetricObservation O_t = (metric_id, timestamp, value, sample_count, provenance, quality, context).
MetricAssessment A_t = (observation, baseline, deviation, status, confidence, evidence).
Constraints: id unique within namespace; timestamp ordered within series; units compatible before comparison; missing values never silently replaced with zero.
3. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = available observations, baseline, operational context and monitoring objective.
R_t = validation, aggregation, comparison, escalation and recovery rules.
B_t = boundaries: permission, privacy, rate limits, time windows, units, safe thresholds.
K_t = verified metric definitions, historical summaries, provenance and decisions.
E_t = expand(I_t, R_t)
V_t = {x in E_t | satisfies(x, B_t)}
a_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, a_t, O_(t+1))
The argmax expression is a selection model, not a guarantee of calibrated probabilities.
4. FORMAL FLOW
F_metric: Define -> Ingest -> Validate -> Normalise -> Aggregate -> Compare -> Classify -> Record -> Notify/Act -> Reassess.
Define(M) requires a declared subject, quantity, unit, collection cadence and interpretation policy.
Ingest(O_t) preserves original value, source, collection time and trace identifier.
Validate(O_t) checks type, range, provenance, freshness, completeness and duplicates.
Normalise(O_t) converts only between semantically compatible units.
Aggregate(W) applies M.aggregation to valid observations in the specified window W.
Compare(v, b) computes deviation relative to a compatible baseline b.
Classify(v, thresholds) yields OK, WARNING, CRITICAL, UNKNOWN or STALE.
Record(A_t) appends an auditable assessment without overwriting raw evidence.
Notify/Act(A_t) is gated by permissions, severity, suppression rules and human review where required.
Reassess checks whether the metric returns to an acceptable state.
5. STATE TRANSITIONS
UNDEFINED -> DEFINED: schema and interpretation registered.
DEFINED -> COLLECTING: authorised data source connected.
COLLECTING -> VALIDATING: observation received.
VALIDATING -> VALID: all mandatory checks pass.
VALIDATING -> INVALID: type, provenance or bounds check fails.
VALID -> ASSESSED: aggregation and threshold evaluation complete.
ASSESSED -> ALERTING: threshold crossed with required evidence.
ALERTING -> ACKNOWLEDGED: responsible actor acknowledges.
ACKNOWLEDGED -> RESOLVED: recovery criteria satisfied.
ANY NONTERMINAL -> STALE: freshness limit exceeded.
STALE -> VALIDATING: fresh observation received.
ANY -> RETIRED: definition superseded with historical trace retained.
6. INFERENCE RULES
R1: valid(O) AND compatible(O.unit, M.unit) => eligible(O, M).
R2: NOT valid(O) => status(O) = INVALID; exclude from valid aggregates.
R3: age(O) > M.freshness_limit => status(O) = STALE.
R4: eligible(O, M) AND sufficient_samples(W) => aggregate(M, W) defined.
R5: insufficient_samples(W) => assessment(M, W) = UNKNOWN.
R6: threshold_breached(v, M) AND quality_ok(W) => candidate_alert(M, W).
R7: candidate_alert AND authorised AND NOT suppressed => alert_issued.
R8: alert_issued AND recovery_criterion_met => resolved.
R9: changed_definition(M.version) => historical comparison requires compatibility review.
R10: conflicting_sources => flag_discrepancy; do not silently select a source.
7. METRIC FORMULAE
Mean: mu_W = (sum_{i=1..n} x_i) / n, n > 0.
Rate: r_W = event_count(W) / exposure(W), exposure(W) > 0.
Error rate: e_W = failed_events(W) / total_events(W), total_events(W) > 0.
Absolute deviation: d_abs = |v - b|.
Relative deviation: d_rel = (v - b) / |b|, b != 0.
Threshold breach: breach(v) = [v > upper] OR [v < lower] for declared bounds.
Missing denominator => UNDEFINED, not zero. All comparisons require matched units and aligned windows.
8. TRI-MAPPING
Conceptual: monitoring metric -> quantified indicator of system behaviour.
Structural: MonitoringMetric -> MetricObservation -> MetricAssessment -> Alert/Decision.
Operational: collect -> validate -> aggregate -> assess -> escalate -> audit.
Mapping table:
Concept | Entity | Operation | Output
Definition | MonitoringMetric | register schema | metric_id
Reading | MetricObservation | validate sample | valid/invalid
Window | AggregationWindow | aggregate samples | statistic
Baseline | ReferenceMetric | align and compare | deviation
Threshold | MonitoringRule | evaluate bounds | severity
Response | MonitoringAction | authorise and dispatch | action record
Evidence | ProvenanceRecord | preserve trace | audit trail
9. ENTITY RELATIONSHIPS
MonitoringMetric measures AIModel, AISystem, Agent, Workflow, Tool or Resource.
MonitoringMetric hasObservation MetricObservation.
MetricObservation originatesFrom MonitoringSignal or TelemetrySource.
MetricObservation evaluatedAgainst Baseline and MonitoringThreshold.
MetricAssessment mayTrigger MonitoringAlert.
MonitoringAlert mayInitiate RecoveryAction or HumanHandoff.
MonitoringMetric governedBy MonitoringPolicy.
MonitoringMetric versionedBy MetricDefinitionVersion.
10. MINI RECURSION ENGINE
Initialise state S_0 and metric definition M.
For each new observation O_t:
(a) ingest and validate O_t;
(b) update rolling window without altering raw evidence;
(c) derive assessment A_t if data suffices;
(d) apply alert and action gates;
(e) append evidence and state transition;
(f) if remediation occurs, observe again and compare to recovery criterion.
Stop recursion on explicit cancellation, resource limit, policy block or retirement.
Prevent alert loops with deduplication, hysteresis and cooldown windows.
11. EXECUTION GUARANTEES — CONDITIONAL
G1: With stable identifiers and append-only logging, each accepted observation is traceable.
G2: With deterministic validation and fixed metric version, identical inputs yield identical assessments.
G3: With bounded iteration and configured timeouts, each evaluation cycle terminates.
G4: Missing or stale observations produce UNKNOWN/STALE rather than fabricated measurements.
G5: Automated remediation requires a separate authorisation rule.
No guarantee is made that telemetry is complete, thresholds are correct, alerts prevent harm, or probabilistic estimates are calibrated.
12. AI SEARCH FLOW
FLOW_ID: semantic-library.ai-core.monitoring.metric.v1
TITLE: Monitoring Metric Ontology — Flow Algebra
LANGUAGE: en-GB
ENTITY_TYPE: MonitoringMetric
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/monitoring-entities/monitoring-metric-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/monitoring-entities/monitoring-metric-ontology.html
PURPOSE: Define, observe, validate, compare and interpret time-indexed monitoring metrics.
INPUTS: metric definition; observations; thresholds; baseline; provenance; monitoring policy.
OUTPUTS: validated observations; aggregate statistics; assessments; alerts; audit records.
STATE_MODEL: S_t=(I_t,R_t,B_t,K_t)
PATHWAYS: Define > Ingest > Validate > Normalise > Aggregate > Compare > Classify > Record > Act > Reassess.
INFERENCE_RULES: R1-R10 above.
CONFIDENCE: Derived from evidence quality, sample sufficiency and source reliability; not assumed from a single reading.
SEMANTIC_EQUIVALENCE: metric ≈ measured indicator only when quantity, unit, subject, window and aggregation agree.
UPDATE_MODEL: version metric definition; preserve prior measurements; record compatibility and change reason.
FLOW_HASH: compute SHA-256 on the final published file; no hash asserted here.
13. HOW TO READ / IMPLEMENTS
Read each arrow as an ordered, gated transformation, not proof of correctness.
Implementations require a metric registry, observation store, unit validator, time-window aggregator, threshold engine, policy gate, provenance log and alert dispatcher.
Recommended tests: null readings, stale samples, unit mismatch, duplicate readings, out-of-order timestamps, zero denominators, threshold oscillation, missing authorisation, version changes and recovery verification.
END OF FLOW
Download Code
Copy to Clipboard