// Client-safe: the tree definition (no database imports). /** Your tree of content. Add nodes here; each node pulls its numbers from the areas / taxonomy nodes it lists. */ export interface ContentNode { id: string; title: string; blurb: string; kind: 'root' | 'tools' | 'papers'; areas: string[]; // work-type areas (areas.id) taxonomy: string[]; // taxonomy node ids /** kind 'papers': the papers an analysis page is about = text (title + abstract + keywords) matching `pattern` * (case-sensitive regex) and, if given, also `require` (case-insensitive). */ match?: { pattern: string; require?: string }; children: ContentNode[]; } export const CONTENT_TREE: ContentNode = { id: 'root', title: 'Contents', blurb: 'Analysis pages: each one reads a group of papers in depth.', kind: 'root', areas: [], taxonomy: [], children: [ { id: 'tools-of-agents', title: 'Tools of agents', blurb: 'How agents call tools: function calling, MCP, API use and tool-integrated reasoning.', kind: 'tools', areas: ['tool-use'], taxonomy: ['agents/tools'], children: [], }, { id: 'lean-theorem-proving', title: 'Lean and formal theorem proving', blurb: 'Papers that prove, formalize or verify in Lean 4: provers, autoformalization, benchmarks and agents.', kind: 'papers', areas: [], taxonomy: [], match: { pattern: '\\yLean( ?4)?\\y|Mathlib', require: 'theorem|formal|proof|prover|verif' }, children: [], }, ], }; export function findNode(id: string, n: ContentNode = CONTENT_TREE): ContentNode | null { if (n.id === id) return n; for (const c of n.children) { const f = findNode(id, c); if (f) return f; } return null; }