The taste of metal in your mouth when nothing is there — a phantom sensation that feels undeniably real yet fundamentally wrong.
Phantom Metal Taste is a multi-model database architecture for measuring the divergence between what organizations say they value and what they actually incentivize.
Most enterprise analytics platforms measure success. This one measures the gap between intended success and actual outcomes — including the outcomes nobody planned for, the metrics nobody acts on, and the reports nobody reads.
It does this with the full rigor of enterprise architecture: formal ontologies, causal graph traversal, statistical gaming detection, and a type system that makes invalid states unrepresentable. Whether applying this rigor to the problem of organizational self-deception is itself a form of self-deception is left as an exercise for the reader.
The system employs a polyglot stack, each language chosen for what it does well:
| Layer | Technology | Purpose |
|---|---|---|
Orchestration |
ReScript / Deno |
Type-safe functional API with sound type system and secure runtime |
Performance |
Rust / WebAssembly |
Gap calculations, anomaly detection, causal path strength computation |
Analytics |
Julia |
Statistical gaming detection, causal inference, impact analysis |
Graph Database |
ArangoDB |
Causal relationship traversal, organizational structure modeling |
Semantic Web |
Virtuoso (OWL/RDF) |
Formal ontological reasoning over initiative-outcome relationships |
ReScript provides a sound type system: if the code compiles, the types are correct. There are no any escape hatches, no runtime type errors, no null pointer exceptions. In a system that measures the gap between claims and reality, it seemed appropriate that the code itself should make no false claims.
Deno provides an explicit permissions model. The runtime cannot access the filesystem, network, or environment without declared permission. In a system that questions surveillance, the runtime practices what the system preaches.
Rust/WASM handles the computationally intensive work: gap score calculations, causal path strength propagation, and anomaly detection. These run at near-native speed in a sandboxed WASM environment.
Julia performs the statistical heavy lifting: variance analysis for gaming detection, t-tests for significance, correlation analysis for metric validity, and causal inference with confound control.
See RESCRIPT_MIGRATION.md for the full migration rationale.
The system ships with a complete fictional case study: SynapCor Technologies, a 487-person enterprise SaaS company that implemented a data-driven wellness program called the Synergy Matrix.
The case study includes two central figures:
-
Chad Kensington, VP of Human Synergy — a true believer in the power of measurement to transform culture. He is not cynical. He is something more interesting than that.
-
Brenda Smith, Senior Engineer — whose actual productivity is in the top 5% of the org, whose Synergy Matrix score classifies her as "Siloed," and whose self-reported mood numbers have been strategically optimized.
Three initiatives are documented in detail, each with formal requirements, intended outcomes, actual outcomes, and the growing divergence between what the dashboard shows and what actually happened. The system captures all of it. Whether anyone reads the output is a separate question.
See the full case study for details.
This project includes enterprise-grade modeling artifacts that treat the subject matter with complete seriousness:
-
DFD Level 0 (Context Diagram) — System boundary and external entity interactions
-
DFD Level 1 (Detailed) — Internal processes, data stores, and the process that captures what nobody intended
-
E-R Diagram — Full data model with
mood_self_reportvsactual_mood_estimatefields,attendance_typeENUM including'theater', and metrics flaggedis_gamedandis_theater
-
Employee Mental State Machine — From "Cautiously Optimistic" through "Skeptical," "Resigned," and "Actively Subverting" to "Gaming the System"
-
Focus-Sprint Protocol Failure Sequence — What happens when you disable all communications and the production server catches fire
-
TOGAF ADM — Full Architecture Development Method applied to the Synergy Matrix as an enterprise initiative, including a stakeholder table where the person most affected has the least influence
-
OMG ODM/MOF — Ontology Definition Metamodel and Meta Object Facility documentation, including a 4-layer metamodel where the data is correct at every layer and nobody in authority looks at it
-
Deployment Diagram — Infrastructure topology
-
Class Diagram — Domain model
-
Sequence Diagram — Interaction patterns
-
Use Case Diagram — System capabilities
-
IntentionRealityGap.tla — TLA+ specification proving gap calculation is bounded, monotonic, and deterministic
-
CausalGraph.tla — TLA+ specification proving the causal graph is acyclic and temporally ordered
- Intention-Reality Gap Measurement
-
Quantifies the distance between stated goals and actual results. The score is bounded [0, 100], monotonically increasing with dysfunction, and formally verified in TLA+.
- Causal Graph Traversal
-
Traces chains of causation from initiatives through intended and unintended outcomes. Path strength uses geometric mean — a chain is only as strong as its weakest link.
- Metric Gaming Detection
-
Statistical analysis identifying suspiciously low variance, end-of-period spikes, target clustering, and large discontinuities. Returns a gaming probability between 0 and 1.
- Metric Theater Detection
-
Identifies metrics that are diligently collected, carefully stored, and never linked to any decision or action.
- Department Synergy Scoring
-
Composite wellness/engagement/productivity/alignment score with a penalty for suspiciously perfect numbers. Departments that score too consistently high are flagged, not celebrated.
-
Deno (v1.40+):
curl -fsSL https://deno.land/install.sh | sh -
ReScript compiler:
npm install -g rescript
-
Podman & podman-compose: For database containers
-
Rust (stable): For WASM modules
-
Julia (v1.9+): For statistical analysis
# Build the ReScript code
deno task build
# Start databases
podman-compose up -d
# Run the API server
deno task dev
# Load the SynapCor case study data
deno task load-data
# Run the interactive demo
./scripts/demo.shSee QUICKSTART.md for the 5-minute guide, or docs/SETUP.md for comprehensive setup with troubleshooting.
| Document | Description |
|---|---|
Get running in 5 minutes |
|
Comprehensive setup with troubleshooting |
|
Deep architectural documentation |
|
Enterprise architecture (TOGAF ADM) |
|
Ontology and metamodel documentation |
|
Why ReScript + Deno |
|
Complete technical overview |
|
The fictional company that makes everything concrete |
|
Rhodium Standard Repository compliance matrix |
Contributions are welcome. Before submitting a PR, please ensure:
-
ReScript code compiles without warnings
-
All tests pass:
deno task test -
Rust code passes
cargo clippy — -D warnings -
Documentation is updated
-
The philosophical tone is maintained — the system takes itself seriously so the reader does not have to
See CONTRIBUTING.md for detailed guidelines.
Prolonged exposure to this system’s output may cause:
-
An irresistible urge to audit your own organization’s metrics
-
Suspicion that your wellness program is measuring the wrong things
-
The realization that the map was never the territory
-
A faint metallic taste
These effects are considered features, not bugs.
This project is licensed under the Palimpsest License (PMPL-1.0-or-later). See the LICENSE file for details.
What happens when you build an enterprise-grade, formally verified, multi-model database system to measure the precise distance between what organizations claim to value and what they actually reward?
The architecture is rigorous. The types are sound. The proofs are mechanically checked. The gap scores are bounded and monotonic. The causal graphs are acyclic.
The data is all there. It has always been there.
The question was never whether we could measure it.
The map is not the territory, but sometimes the map reveals what the territory conceals.