Ontology
The ontology on this page is the one I learned from Palantir’s DevCon 5 talk, “Deep Dive: Advanced Ontology” (source: Palantir Developers: Deep Dive: Advanced Ontology, DevCon 5), and from Palantir’s documentation. Both are written for data models, but their two worries, the right words and one shape per thing, are a front-end codebase’s too. The talk names four design principles and the documentation four, ranked so that “higher-priority principles take precedence” (source: Palantir: Ontology best practices), the tie-break the seven rules use too. The two lists share three, and each fourth has its own part below.
Domain-driven design
Section titled “Domain-driven design”- The principle
- “Model the real world, not the source data.” (source: Palantir: Ontology best practices)
- Why it matters
A front end meets the source data first, in an API response, and an agent building from one can carry its field names into every prop. The aim holds for a component tree: “a user, or an AI agent, should be able to navigate it without friction, because the structure matches how they already think about their domain” (source: Palantir: Ontology best practices).
- On this site
When this site became docs, its content collection, its docs module and its tests took the words the pages use, which the glossary holds; Matt Pocock’s
domain-modelingskill “challenges a term that conflicts with the glossary” (source: Matt Pocock: domain-modeling).What checks it: the sweep for retired words, which fails any built page that still carries one.
Do not repeat yourself
Section titled “Do not repeat yourself”- The principle
- “If you built the same thing three times, refactor.” (source: Palantir: Ontology best practices)
- Why it matters
Duplicates are “a context-management problem, for both humans and AI agents” (source: Palantir: Ontology best practices): among near-copies, “Users and AI agents cannot determine which of several near-identical types is canonical” (source: Palantir: Ontology best practices), and an agent that copies the wrong one spreads it.
- On this site
Every source these pages cite lives once, in one map that every citation reads, and each page’s sources list is built from its own citations.
What checks it: the build, which fails on a citation of a source the map does not hold, and a unit test that gives every source its own name and its own live page.
Open for extension, closed for modification
Section titled “Open for extension, closed for modification”- The principle
- “Protect core models. Enable builders to extend them.” (source: Palantir: Ontology best practices)
- Why it matters
A shared component is a front end’s core model, and every new screen is a reason to give it one more prop and one more branch, until it starts to “accumulate properties and logic for every new use case, trending toward a God Object” (source: Palantir: Ontology best practices). Unless the rule is written down, nothing keeps an agent from making that edit too.
- On this site
Here the core is the design system: the redesign replaced it once, by a recorded decision, and what came since, the Together pages and the 404’s light among them, draws on its tokens and its one shader.
What checks it: Impeccable’s detector, which flags a value outside the design record’s scales, and the judge, who sends back a change to the core that no ticket asked for.
Composition over deep hierarchies
Section titled “Composition over deep hierarchies”- The principle
- “Favor multiple inheritance via interfaces. Keep things pluggable.” (source: Palantir: Ontology best practices)
- Why it matters
The deep hierarchy of a front end is the component that takes a mode for every case, where “Adding a new capability to an entity requires restructuring the inheritance chain” (source: Palantir: Ontology best practices). Parts that compose stay small enough to read whole, by the judge or by an agent.
- On this site
The seven rules and the setup’s advanced aside compose one disclosure component instead of extending a base.
What checks it: no gate; the judge reads it in the diff.
Producer extends, consumer super
Section titled “Producer extends, consumer super”- The principle
- The talk’s fourth principle, where the documentation has composition: “Producer Extends, Consumer Super (PECS) (aka Covariance and Contravariance)” (source: Palantir Developers: Deep Dive: Advanced Ontology, DevCon 5).
- Why it matters
In my notes from the talk, code written against
? extends Eventaccepts any subtype, and a function that takes? super Eventconsumes the specific ones safely, so a pattern built on an interface stays open both ways. The talk’s part on interfaces (source: Palantir Developers: Deep Dive: Advanced Ontology, DevCon 5) puts it to work; for a front end, I read it as one pattern that every page implements, so an agent adding a page fills it in rather than inventing one.- On this site
Every lifecycle page ends on the same routine block, four named slots each page fills, and every principle on these three pages fills the same three parts.
What checks it: one browser test reads the routine block’s four lines on all seven lifecycle pages, and another the three parts of every principle here.
Questions nobody prepared for
Section titled “Questions nobody prepared for”- Why it matters
In the validation page’s drills, “teams receive business questions they have not seen before” (source: Palantir: Ontology design validation), since “a builder alone cannot validate the design” (source: Palantir: Ontology design validation), and the same questions then go to an agent. Docs built with an agent share that blind spot: the author and the agent hold the context a reader lacks.
- On this site
These docs get that test before launch: two or three developers who do not know me take one of their own issues through them, and the test records where each got stuck.
What checks it: the reader test itself, which nobody who built the docs can take.
The anti-patterns, translated
Section titled “The anti-patterns, translated”The documentation’s eight anti-patterns, each translated to a front-end codebase.
| Anti-pattern | A front-end translation |
|---|---|
| “System Silos” (source: Palantir: Ontology anti-patterns) | One model per API for the same thing on screen |
| “The Kitchen Sink” (source: Palantir: Ontology anti-patterns) | Props that pass every field of a response through |
| “Department Silos” (source: Palantir: Ontology anti-patterns) | A button or a card per feature folder |
| “The God Object” (source: Palantir: Ontology anti-patterns) | One card for every kind of item, a prop deciding what the others mean |
| “The Golden Hammer” (source: Palantir: Ontology anti-patterns) | Global state for everything, or an effect where a derived value would do |
| “Action Sprawl” (source: Palantir: Ontology anti-patterns) | A setter per field instead of the operations a screen performs |
| “The Time Machine” (source: Palantir: Ontology anti-patterns) | Two versions of a component side by side, where git keeps history |
| “The Misnomer” (source: Palantir: Ontology anti-patterns) | Names a reader cannot place: data, item, info |