MetricBridge
An iOS health data application built on the Apple Foundation Models framework. It employs an architecture that separates a deterministic computation layer from LLM-based language expression, using the Tool protocol to achieve reproducible health metric calculations.
Timeline (last 90 days)
AskEngine.swift in the MetricBridge project is a pure computation layer that parses user questions into one of 16 tool calls, resolves metric names, performs aggregation operations, and returns a struct called ComputedFacts.
The ComputedFacts struct contains two honesty fields, coverageDays and unevenWindows, used to reflect sequence coverage and to flag cases where the number of comparison days differs on the two sides.
The bench_deterministic_layer.py script in the MetricBridge repository builds a 30-day HRV sequence with a random seed, produces byte-for-byte identical output across two consecutive runs, with both SHA-256 hashes equal to f2e87621b46b2fe04cd81a86cb2183ed2e271237ca8d23b9123171445359d9d7.
The provenance card shows a core value of 49.6 ms (7-day average), a 16.3% increase compared to the prior 14-day average of 42.6 ms, a dayCount of 7, a coverageDays of 30, with 5 numbers produced by the computation layer and 0 numbers produced by the model.
When a metric deviates from its recent range, the honest statement should be that it deviates from a personal baseline rather than that it is anomalous; being traceable does not equal being diagnosable.
All Facts (5)
AskEngine.swift in the MetricBridge project is a pure computation layer that parses user questions into one of 16 tool calls, resolves metric names, performs aggregation operations, and returns a struct called ComputedFacts.
50%UnverifiedThe ComputedFacts struct contains two honesty fields, coverageDays and unevenWindows, used to reflect sequence coverage and to flag cases where the number of comparison days differs on the two sides.
50%UnverifiedThe bench_deterministic_layer.py script in the MetricBridge repository builds a 30-day HRV sequence with a random seed, produces byte-for-byte identical output across two consecutive runs, with both SHA-256 hashes equal to f2e87621b46b2fe04cd81a86cb2183ed2e271237ca8d23b9123171445359d9d7.
50%UnverifiedThe provenance card shows a core value of 49.6 ms (7-day average), a 16.3% increase compared to the prior 14-day average of 42.6 ms, a dayCount of 7, a coverageDays of 30, with 5 numbers produced by the computation layer and 0 numbers produced by the model.
50%UnverifiedWhen a metric deviates from its recent range, the honest statement should be that it deviates from a personal baseline rather than that it is anomalous; being traceable does not equal being diagnosable.
50%