diff --git a/apps/docs/components/figures/index.ts b/apps/docs/components/figures/index.ts new file mode 100644 index 00000000000..ab0799ffb58 --- /dev/null +++ b/apps/docs/components/figures/index.ts @@ -0,0 +1,9 @@ +/* + * Figures drawn for the blog, registered as MDX components in + * `mdx-components.tsx`. Each takes a one-line `caption`; the drawing kit and + * the reasons it is inline SVG are in `primitives.tsx`. + */ +export { ThreeInterfacesFigure } from './three-interfaces'; +export { OneDefinitionFigure } from './one-definition'; +export { OntologyRunsFigure } from './ontology-runs'; +export { ThreeRoutesFigure } from './three-routes'; diff --git a/apps/docs/components/figures/one-definition.tsx b/apps/docs/components/figures/one-definition.tsx new file mode 100644 index 00000000000..96e9565370b --- /dev/null +++ b/apps/docs/components/figures/one-definition.tsx @@ -0,0 +1,124 @@ +import { Arrow, Box, Drawing, EdgeLabel, Figure } from './primitives'; + +/* + * Figure for "What an enterprise actually wants to say": the four places a + * business definition lives today, joined into the one place it can be + * written down. Every label is the essay's or the talk deck's own wording. + */ + +const TITLE = 'Four places to one definition'; +const DESC = + 'Four boxes on the left show where an enterprise definition lives today: in veterans’ heads (“Ask Maria ' + + 'first”), in policy documents (written, not followed), in spreadsheets (one version per department), and in a few ' + + 'hundred thousand lines of code (one change, four places). A bus joins them into one dark box on the right, written ' + + 'down once: one definition, with five parts: what we have, how it relates, what can be done, who may do it, and what ' + + 'happens when.'; + +const SOURCES = [ + { title: 'In veterans’ heads', body: '“Ask Maria first”' }, + { title: 'In policy documents', body: 'Written, not followed' }, + { title: 'In spreadsheets', body: 'One version per department' }, + { title: 'In a few hundred thousand lines of code', body: 'One change, four places' }, +] as const; + +const DEFINITION = { + title: 'One definition', + parts: ['what we have', 'how it relates', 'what can be done', 'who may do it', 'what happens when'], +}; + +const JOIN = 'Written down, once'; + +function Wide() { + const srcW = 360; + const srcH = 58; + const srcGap = 12; + const height = 4 * srcH + 3 * srcGap; // 268 + const busX = 420; + const defX = 600; + const mid = height / 2; + return ( + + {SOURCES.map((s, i) => { + const y = i * (srcH + srcGap); + return ( + + + + + ); + })} + + + + {JOIN} + + + + ); +} + +function Narrow() { + const srcW = 316; + const heights = [52, 52, 52, 70]; + const srcGap = 10; + const tops = heights.map((_, i) => heights.slice(0, i).reduce((a, h) => a + h + srcGap, 0)); + const centres = tops.map((t, i) => t + heights[i] / 2); + const srcEnd = tops[3] + heights[3]; + const busX = 340; + const defY = srcEnd + 46; + const defH = 176; + return ( + + {SOURCES.map((s, i) => ( + + + + + ))} + + + + {JOIN} + + + + ); +} + +export function OneDefinitionFigure({ caption }: { caption: string }) { + return
} narrow={} />; +} diff --git a/apps/docs/components/figures/ontology-runs.tsx b/apps/docs/components/figures/ontology-runs.tsx new file mode 100644 index 00000000000..0cd0ce142ef --- /dev/null +++ b/apps/docs/components/figures/ontology-runs.tsx @@ -0,0 +1,168 @@ +import { Arrow, Box, Drawing, EdgeLabel, Figure, TYPE } from './primitives'; + +/* + * Figure for "Why code recedes": the architecture in which the ontology is + * run directly. Every label is the essay's or the talk deck's own wording. + */ + +const TITLE = 'The ontology runs'; +const DESC = + 'A large model writes the ontology from a sentence of business language, and what is written wrong does not ship. ' + + 'People define it, approve it, and verify it in the UI. The ontology is what the enterprise is: what we have, how it ' + + 'relates, what can be done, who may do it, and what happens when. The runtime runs the definition directly, and every ' + + 'call is permission-checked and audited. An agent, any agent from any vendor, calls the runtime. The database, the ' + + 'API, the UI and the tools agents call are all derived from it.'; + +const MODEL = { title: 'Large model', body: ['Writes it from a sentence', 'of business language.', 'Wrong, it does not ship.'] }; +const PEOPLE = { title: 'People', body: ['Define it, approve it,', 'verify it in the UI.'] }; +const ONTOLOGY = { + title: 'Ontology', + body: ['what the enterprise is:', 'what we have · how it relates', 'what can be done · who may do it', 'what happens when'], +}; +const RUNTIME = { title: 'Runtime', body: ['Runs the definition directly; every call', 'is permission-checked and audited'] }; +const AGENT = { title: 'Agent', body: 'Any agent, any vendor' }; +const DERIVED = ['Database', 'API', 'UI', 'Tools agents call'] as const; + +function Wide() { + const sideW = 190; + const centreX = 276; + const centreW = 288; + const rightX = 650; + const centreMid = centreX + centreW / 2; // 420 + const row1H = 120; + const row2Y = 164; + const row2H = 76; + const busY = row2Y + row2H + 28; + const childY = busY + 20; + const childH = 48; + const childW = 180; + const childGap = 20; + const childX0 = (840 - (4 * childW + 3 * childGap)) / 2; + const childMid = (i: number) => childX0 + i * (childW + childGap) + childW / 2; + const arrowY = row1H / 2; + const row2Mid = row2Y + row2H / 2; + return ( + + + + + + + writes it + + + + defines it + + + + runs directly + + + + + + calls it + + + + derived from it + + + {DERIVED.map((label, i) => ( + + + + + ))} + + ); +} + +function Narrow() { + const sideW = 172; + const rightX = 360 - sideW; + const row1H = 116; + const ontY = row1H + 44; + const ontH = 112; + const rtY = ontY + ontH + 40; + const rtH = 76; + const rtEnd = rtY + rtH; + const agentX = 196; + const agentY = rtEnd + 36; + const agentH = 70; + const busY = agentY + agentH + 16; + const childY = busY + 18; + const childW = 84; + const childGap = 8; + const childH = 52; + const childMid = (i: number) => i * (childW + childGap) + childW / 2; + const trunkX = childMid(1); + const agentMid = agentX + (360 - agentX) / 2; + return ( + + + + + + writes it + + + + defines it + + + + + runs directly + + + + + + calls it + + + + derived from it + + + {DERIVED.map((label, i) => ( + + + + + ))} + + ); +} + +export function OntologyRunsFigure({ caption }: { caption: string }) { + return
} narrow={} />; +} diff --git a/apps/docs/components/figures/primitives.tsx b/apps/docs/components/figures/primitives.tsx new file mode 100644 index 00000000000..623168ab536 --- /dev/null +++ b/apps/docs/components/figures/primitives.tsx @@ -0,0 +1,452 @@ +import type { ReactNode } from 'react'; + +/* + * The drawing kit for the blog's hand-drawn figures. + * + * Inline SVG from a server component, never an image file: the site switches + * theme with a `dark` class on the html element (next-themes, through + * fumadocs' RootProvider), and an SVG loaded as an image is a separate + * document that cannot see that class. It could follow only the OS + * preference, which is not the page's theme. Inline SVG is part of the page, + * so every colour here is a Tailwind class pair, a light value and its + * `dark:` value, and a figure flips with the toggle: no client script, no + * flash, no second request. + * + * Text inherits the page's font stack. No font-family is set anywhere in a + * figure, and no font file is requested. + * + * Each figure draws its content twice: a wide drawing shown from the `lg` + * breakpoint, where the prose column is about 860 px, and a stacked drawing + * below it, capped at 440 px, so text stays at reading size on a phone rather + * than being scaled down to a few pixels. The drawing not shown is + * `display: none`, which also takes it out of the accessibility tree, so a + * screen reader meets each figure once, through its title and description. + */ + +/** A box's colour role. Each names its text colours for both themes. */ +export type Tone = 'plain' | 'ink' | 'raised' | 'accent' | 'warm' | 'dashed' | 'paper'; + +const BOX: Record = { + plain: { + rect: 'fill-white stroke-neutral-300 dark:fill-neutral-800 dark:stroke-neutral-600', + title: 'fill-neutral-900 dark:fill-neutral-50', + body: 'fill-neutral-600 dark:fill-neutral-300', + eyebrow: 'fill-indigo-700 dark:fill-indigo-300', + }, + // The emphasised box: near-black on the light page, deep indigo with a + // bright edge on the dark one, where a near-black box would vanish. + ink: { + rect: 'fill-neutral-900 stroke-neutral-900 dark:fill-indigo-950 dark:stroke-indigo-400', + title: 'fill-neutral-50', + body: 'fill-indigo-200', + eyebrow: 'fill-indigo-300', + }, + // A box drawn ON an ink shape: one step lighter, with an accent edge. + raised: { + rect: 'fill-neutral-800 stroke-indigo-500 dark:fill-indigo-900 dark:stroke-indigo-400', + title: 'fill-indigo-100', + body: 'fill-indigo-100', + eyebrow: 'fill-indigo-300', + }, + accent: { + rect: 'fill-indigo-600 stroke-indigo-600 dark:stroke-indigo-400', + title: 'fill-white', + body: 'fill-indigo-100', + eyebrow: 'fill-indigo-100', + }, + warm: { + rect: 'fill-orange-50 stroke-orange-300 dark:fill-orange-950 dark:stroke-orange-700', + title: 'fill-amber-800 dark:fill-orange-300', + body: 'fill-neutral-700 dark:fill-orange-100', + eyebrow: 'fill-amber-800 dark:fill-orange-300', + }, + dashed: { + rect: 'fill-none stroke-neutral-500 dark:stroke-neutral-400', + title: 'fill-neutral-600 dark:fill-neutral-300', + body: 'fill-neutral-600 dark:fill-neutral-300', + eyebrow: 'fill-neutral-600 dark:fill-neutral-300', + }, + // A light shape that stays light in both themes: drawn on an ink panel. + paper: { + rect: 'fill-neutral-50 stroke-neutral-50 dark:fill-neutral-100 dark:stroke-neutral-100', + title: 'fill-neutral-900', + body: 'fill-neutral-600', + eyebrow: 'fill-indigo-700', + }, +}; + +/** A connector's colour role, with the colour of a label written beside it. */ +export type Ink = 'gray' | 'accent' | 'warm' | 'onInk'; + +const LINE: Record = { + gray: { + stroke: 'stroke-neutral-500 dark:stroke-neutral-400', + fill: 'fill-neutral-500 dark:fill-neutral-400', + label: 'fill-neutral-600 dark:fill-neutral-300', + }, + accent: { + stroke: 'stroke-indigo-600 dark:stroke-indigo-400', + fill: 'fill-indigo-600 dark:fill-indigo-400', + label: 'fill-indigo-700 dark:fill-indigo-300', + }, + warm: { + stroke: 'stroke-amber-700 dark:stroke-orange-400', + fill: 'fill-amber-700 dark:fill-orange-400', + label: 'fill-amber-800 dark:fill-orange-300', + }, + onInk: { + stroke: 'stroke-indigo-300', + fill: 'fill-indigo-300', + label: 'fill-indigo-300', + }, +}; + +/** Text written straight on the figure's plate, outside any box. */ +export const PLATE_TEXT = { + strong: 'fill-neutral-900 dark:fill-neutral-50', + muted: 'fill-neutral-600 dark:fill-neutral-300', + eyebrow: 'fill-indigo-700 dark:fill-indigo-300', +} as const; + +/** The type scale, in user units; a wide drawing renders at about 0.97 px per unit. */ +export const TYPE = { + eyebrow: 12, + title: 15, + body: 13, + small: 12.5, + label: 12.5, +} as const; + +const BOLD_EM = 0.62; +const REGULAR_EM = 0.55; + +/** + * Greedy word wrap by an estimated character width. The estimate is set from + * DejaVu Sans, the widest of the common fallback faces, so a line that fits + * here fits under the narrower system faces too. An array is taken as + * already broken by hand. + */ +export function wrap(text: string | string[], width: number, size: number, bold = false): string[] { + if (Array.isArray(text)) return text; + const max = Math.max(1, Math.floor(width / (size * (bold ? BOLD_EM : REGULAR_EM)))); + const lines: string[] = []; + let line = ''; + for (const word of text.split(' ')) { + if (line && line.length + 1 + word.length > max) { + lines.push(line); + line = word; + } else { + line = line ? `${line} ${word}` : word; + } + } + if (line) lines.push(line); + return lines; +} + +type TextProps = { + x: number; + y: number; + size?: number; + weight?: 400 | 600 | 700; + anchor?: 'start' | 'middle' | 'end'; + spacing?: number; + className: string; + children: ReactNode; +}; + +/** One line of text, vertically centred on `y`. */ +export function Text({ x, y, size = TYPE.body, weight = 400, anchor = 'start', spacing, className, children }: TextProps) { + return ( + + {children} + + ); +} + +/** A small uppercase heading, the deck's eyebrow line. */ +export function Eyebrow({ x, y, anchor = 'start', className = PLATE_TEXT.eyebrow, children }: { + x: number; + y: number; + anchor?: 'start' | 'middle' | 'end'; + className?: string; + children: string; +}) { + return ( + + {children.toUpperCase()} + + ); +} + +type BoxProps = { + x: number; + y: number; + w: number; + h: number; + tone?: Tone; + eyebrow?: string; + title?: string | string[]; + body?: string | string[]; + titleSize?: number; + bodySize?: number; + align?: 'start' | 'middle'; + pad?: number; + radius?: number; +}; + +/** + * A rounded box with an optional eyebrow, a bold title and body lines, the + * whole stack centred vertically. The rect is the group's first child, so a + * check can read each group as "these texts belong inside this shape". + */ +export function Box({ + x, + y, + w, + h, + tone = 'plain', + eyebrow, + title, + body, + titleSize = TYPE.title, + bodySize = TYPE.body, + align = 'start', + pad = 14, + radius = 10, +}: BoxProps) { + const t = BOX[tone]; + const inner = w - 2 * pad; + const titleLines = title === undefined ? [] : wrap(title, inner, titleSize, true); + const bodyLines = body === undefined ? [] : wrap(body, inner, bodySize); + const eyebrowLh = TYPE.eyebrow * 1.5; + const titleLh = titleSize * 1.3; + const bodyLh = bodySize * 1.4; + const gap = 5; + const height = + (eyebrow ? eyebrowLh + gap : 0) + + titleLines.length * titleLh + + (titleLines.length && bodyLines.length ? gap : 0) + + bodyLines.length * bodyLh; + const tx = align === 'middle' ? x + w / 2 : x + pad; + const anchor = align === 'middle' ? 'middle' : 'start'; + let cursor = y + (h - height) / 2; + const parts: ReactNode[] = []; + if (eyebrow) { + parts.push( + + {eyebrow} + , + ); + cursor += eyebrowLh + gap; + } + titleLines.forEach((line, i) => { + parts.push( + + {line} + , + ); + cursor += titleLh; + }); + if (titleLines.length && bodyLines.length) cursor += gap; + bodyLines.forEach((line, i) => { + // An empty line is a spacer: it takes its height and draws nothing. + if (line) { + parts.push( + + {line} + , + ); + } + cursor += bodyLh; + }); + return ( + + + {parts} + + ); +} + +/** A circle with centred text lines: the deck's picture of a model. */ +export function Circle({ cx, cy, r, tone = 'ink', title, body, titleSize = 16, bodySize = TYPE.small }: { + cx: number; + cy: number; + r: number; + tone?: Tone; + title: string; + body?: string[]; + titleSize?: number; + bodySize?: number; +}) { + const t = BOX[tone]; + const titleLh = titleSize * 1.3; + const bodyLh = bodySize * 1.35; + const lines = body ?? []; + const height = titleLh + (lines.length ? 4 + lines.length * bodyLh : 0); + let cursor = cy - height / 2; + return ( + + + + {title} + + {lines.map((line, i) => { + if (i === 0) cursor += titleLh + 4; + const y = cursor + bodyLh / 2; + cursor += bodyLh; + return ( + + {line} + + ); + })} + + ); +} + +type Point = readonly [number, number]; + +const HEAD_LENGTH = 8; +const HEAD_HALF_WIDTH = 4.5; + +function head([x1, y1]: Point, [x2, y2]: Point, className: string) { + const len = Math.hypot(x2 - x1, y2 - y1) || 1; + const ux = (x2 - x1) / len; + const uy = (y2 - y1) / len; + const bx = x2 - ux * HEAD_LENGTH; + const by = y2 - uy * HEAD_LENGTH; + const points = [ + [x2, y2], + [bx - uy * HEAD_HALF_WIDTH, by + ux * HEAD_HALF_WIDTH], + [bx + uy * HEAD_HALF_WIDTH, by - ux * HEAD_HALF_WIDTH], + ] + .map(([px, py]) => `${round(px)},${round(py)}`) + .join(' '); + return ; +} + +function round(n: number) { + return Math.round(n * 100) / 100; +} + +/** Pull an endpoint back along its segment, so a line stops where its head begins. */ +function retract(from: Point, to: Point, by: number): Point { + const len = Math.hypot(to[0] - from[0], to[1] - from[1]) || 1; + return [to[0] - ((to[0] - from[0]) / len) * by, to[1] - ((to[1] - from[1]) / len) * by]; +} + +/** + * A connector through `points`, with an arrowhead at the end, at both ends, + * or none (a bus). Heads are drawn polygons, not SVG markers, so they take + * the same colour classes as the line in every browser. + */ +export function Arrow({ points, ink = 'gray', heads = 'end', dashed = false, width = 2 }: { + points: readonly Point[]; + ink?: Ink; + heads?: 'end' | 'both' | 'none'; + dashed?: boolean; + width?: number; +}) { + const c = LINE[ink]; + const pts = points.map((p) => [p[0], p[1]] as Point); + const n = pts.length; + const drawn = [...pts]; + if (heads !== 'none') drawn[n - 1] = retract(pts[n - 2], pts[n - 1], HEAD_LENGTH - 1); + if (heads === 'both') drawn[0] = retract(pts[1], pts[0], HEAD_LENGTH - 1); + const d = drawn.map(([px, py], i) => `${i ? 'L' : 'M'}${round(px)} ${round(py)}`).join(' '); + return ( + + + {heads !== 'none' && head(pts[n - 2], pts[n - 1], c.fill)} + {heads === 'both' && head(pts[1], pts[0], c.fill)} + + ); +} + +/** A label written beside a connector, in the connector's colour. */ +export function EdgeLabel({ x, y, ink = 'gray', anchor = 'middle', weight = 600, children }: { + x: number; + y: number; + ink?: Ink; + anchor?: 'start' | 'middle' | 'end'; + weight?: 400 | 600; + children: string; +}) { + return ( + + {children} + + ); +} + +/** A dot on a connector, in the connector's colour. */ +export function Dot({ cx, cy, r = 4, ink = 'accent' }: { cx: number; cy: number; r?: number; ink?: Ink }) { + return ; +} + +const MARGIN = 2; + +/** One drawing: a responsive SVG named by its title and described by its description. */ +export function Drawing({ id, width, height, title, desc, children }: { + id: string; + width: number; + height: number; + title: string; + desc: string; + children: ReactNode; +}) { + return ( + + {title} + {desc} + {children} + + ); +} + +/** + * The figure frame: a plate holding the wide and the stacked drawing, and a + * one-line italic caption under it. + */ +export function Figure({ caption, wide, narrow }: { caption: string; wide: ReactNode; narrow: ReactNode }) { + return ( +
+
+
{wide}
+
{narrow}
+
+
{caption}
+
+ ); +} diff --git a/apps/docs/components/figures/three-interfaces.tsx b/apps/docs/components/figures/three-interfaces.tsx new file mode 100644 index 00000000000..1a5ebcce173 --- /dev/null +++ b/apps/docs/components/figures/three-interfaces.tsx @@ -0,0 +1,139 @@ +import { Arrow, Box, Dot, Drawing, Eyebrow, Figure, TYPE } from './primitives'; + +/* + * Figure for "Why now": three interfaces, one user. Every label is the + * essay's or the talk deck's own wording. + */ + +const TITLE = 'Three interfaces, one user'; +const DESC = + 'Enterprise software changed its interface three times: terminals and forms, where people adapted to the software; ' + + 'web and mobile, where the software adapted to people; a conversation box, where the software disappears into language. ' + + 'Beneath all three runs one band, the one thing that never changed: the user was a person. The API was written for a ' + + 'programmer, the documentation for a reader, the audit log for an auditor. A fourth, highlighted column is the new ' + + 'user: an agent, the first new user in forty years. It is not a person.'; + +const ERAS = [ + { title: 'Terminals and forms', wide: ['People adapted', 'to the software'], narrow: 'People adapted to the software' }, + { title: 'Web and mobile', wide: ['The software', 'adapted to people'], narrow: 'The software adapted to people' }, + { + title: 'A conversation box', + wide: ['The software disappears', 'into language'], + narrow: 'The software disappears into language', + }, +] as const; + +const BAND = { + eyebrow: 'The one thing that never changed', + title: 'The user was a person.', + wide: ['The API was written for a programmer, the documentation for a reader,', 'the audit log for an auditor.'], + narrow: ['The API was written for a programmer,', 'the documentation for a reader,', 'the audit log for an auditor.'], +}; + +const AGENT = { eyebrow: 'A new user', title: 'An agent' }; + +function Wide() { + const eraW = 200; + const eraGap = 14; + const erasEnd = 3 * eraW + 2 * eraGap; // 628 + const agentX = erasEnd + 24; + const top = 40; + const eraH = 90; + const bandY = top + eraH + 14; + const bandH = 108; + const bottom = bandY + bandH; + return ( + + + Three interfaces + + + {ERAS.map((era, i) => { + const x = i * (eraW + eraGap); + return ( + + + + + ); + })} + + + + + ); +} + +function Narrow() { + const cardX = 24; + const cardH = 56; + const cardGap = 8; + const top = 24; + const erasEnd = top + 3 * cardH + 2 * cardGap; // 208 + const bandY = erasEnd + 14; + const bandH = 128; + const agentY = bandY + bandH + 22; + const agentH = 104; + return ( + + + Three interfaces + + + {ERAS.map((era, i) => { + const y = top + i * (cardH + cardGap); + return ( + + + + + ); + })} + + + + + ); +} + +export function ThreeInterfacesFigure({ caption }: { caption: string }) { + return
} narrow={} />; +} diff --git a/apps/docs/components/figures/three-routes.tsx b/apps/docs/components/figures/three-routes.tsx new file mode 100644 index 00000000000..70f762f2e59 --- /dev/null +++ b/apps/docs/components/figures/three-routes.tsx @@ -0,0 +1,152 @@ +import { Arrow, Box, Circle, Drawing, EdgeLabel, Eyebrow, Figure, PLATE_TEXT, Text, TYPE, wrap } from './primitives'; + +/* + * Figure for "What it is not": three routes for enterprise knowledge. The + * circle is the model; the question is where the knowledge sits. Every label + * is the essay's or the talk deck's own wording. + */ + +const TITLE = 'Three routes for enterprise knowledge'; +const DESC = + 'Route one, train it in: the knowledge goes into the model’s weights. Change one rule, retrain; nothing to ' + + 'inspect, nothing to audit; change the model, lose it all. Route two, outside, as a manual: a knowledge graph or a ' + + 'semantic layer the model reads. The model reads a description; to act it needs a link to the business systems, ' + + 'and permissions are yet another system. The third route, outside, and it runs: the ontology and the runtime are ' + + 'one machine. The model reads and writes it, the system runs it, and agents act through it.'; + +const ROUTES = [ + { + eyebrow: 'Route one', + title: 'Train it in', + text: 'Change one rule, retrain. Nothing to inspect, nothing to audit. Change the model, lose it all.', + }, + { + eyebrow: 'Route two', + title: 'Outside, as a manual', + text: 'The model can read it, but reads a description. Acting needs another system; permissions are yet another.', + }, + { + eyebrow: 'Third route', + title: 'Outside, and it runs', + text: 'Written precisely enough, the ontology is not a manual. The model reads and writes it, the system runs it, agents act through it.', + }, +] as const; + +/** The panel's inner drawing is 264 x 200 in both layouts; `x`, `y` place it. */ +const PANEL_W = 264; +const PANEL_H = 200; + +function TrainedIn({ x, y }: { x: number; y: number }) { + return ( + + ); +} + +function Manual({ x, y }: { x: number; y: number }) { + const cx = x + 48; + const cy = y + 84; + const r = 40; + const boxX = x + 128; + const boxW = PANEL_W - 128 - 8; + return ( + + + + + + read + + + + + to act, add a link + + + ); +} + +function Runs({ x, y }: { x: number; y: number }) { + const cx = x + 50; + const cy = y + 92; + const r = 40; + const boxX = x + 132; + const boxW = PANEL_W - 132 - 12; + return ( + + + + + + reads · writes + + + + + ); +} + +const DIAGRAMS = [TrainedIn, Manual, Runs]; + +function Route({ i, x, y, w, captionWidth }: { i: number; x: number; y: number; w: number; captionWidth: number }) { + const route = ROUTES[i]; + const Diagram = DIAGRAMS[i]; + const panelY = y + 44; + const lines = wrap(route.text, captionWidth, TYPE.small); + return ( + + + {route.eyebrow} + + + {route.title} + + + + + + {lines.map((line, k) => ( + + {line} + + ))} + + ); +} + +function Wide() { + const gap = 24; + return ( + + {ROUTES.map((route, i) => ( + + ))} + + ); +} + +function Narrow() { + const step = 44 + PANEL_H + 16 + 3 * 18 + 20; + return ( + + {ROUTES.map((route, i) => ( + + ))} + + ); +} + +export function ThreeRoutesFigure({ caption }: { caption: string }) { + return
} narrow={} />; +} diff --git a/apps/docs/mdx-components.tsx b/apps/docs/mdx-components.tsx index 2691bc287a6..09e8ac815b4 100644 --- a/apps/docs/mdx-components.tsx +++ b/apps/docs/mdx-components.tsx @@ -1,11 +1,21 @@ import defaultMdxComponents from 'fumadocs-ui/mdx'; import type { MDXComponents } from 'mdx/types'; import { Mermaid } from '@/components/mermaid'; +import { + OneDefinitionFigure, + OntologyRunsFigure, + ThreeInterfacesFigure, + ThreeRoutesFigure, +} from '@/components/figures'; export function getMDXComponents(components?: MDXComponents): MDXComponents { return { ...defaultMdxComponents, Mermaid, + ThreeInterfacesFigure, + OneDefinitionFigure, + OntologyRunsFigure, + ThreeRoutesFigure, ...components, }; } diff --git a/content/blog/the-ontology-is-the-software.mdx b/content/blog/the-ontology-is-the-software.mdx index 5b164fdbd19..a3aa97a39cc 100644 --- a/content/blog/the-ontology-is-the-software.mdx +++ b/content/blog/the-ontology-is-the-software.mdx @@ -54,6 +54,8 @@ API documentation, four places that drift independently. The codebase is not the business; it is the business's translation into the only form a computer could run. + + Here is the same sentence written once, as ObjectStack reads it: ```ts @@ -109,6 +111,8 @@ What remains in the application itself is small and declared: hooks and action bodies, CEL expressions in formulas and predicates, constrained JSX for custom pages that is parsed into a UI tree and never executed as code. + + **The whole system becomes small enough to be held.** The bundled example CRM in this repository — accounts, contacts, leads, opportunities, activities, views, a dashboard, a lead-conversion flow, permission sets, actions, translations — is @@ -147,6 +151,8 @@ Andrej Karpathy's framing of the third generation of software is that the context window is the program. For enterprise software, we think the program is the ontology, and the context window is where it is read. + + ## Four promises, four mechanisms The slogan is a stance. The descriptor under it is a set of promises, and each @@ -218,6 +224,8 @@ They are read-mostly, and the systems they describe live elsewhere. Our ontology *is* the system; federating an external datasource into it is possible, read-only by default, and early. + + **Not Salesforce's metadata, either, though that is the closest ancestor.** Weissman and Bobrowski's 2009 paper on the Force.com multitenant architecture described a compiled runtime kernel executing per-tenant metadata, and it worked