Files
ai-taxonomy-literature-anal…/lib/content-tree.ts
T
claude-bot 5e3441d76a
Deploy / deploy (push) Successful in 7m27s
Contents: waterfall layout of analysis pages; add Lean theorem-proving page
- /contents: masonry cards, one per analysis page, with stats and a glimpse of what is inside
- new node lean-theorem-proving (kind "papers"): papers matched by text, their analysis articles,
  benchmarks used, full paper list; node kinds: tools | papers
- tools table rows get anchors

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FbMbJPadPzVwvt9rU9GBNo
2026-10-23 21:18:29 +08:00

51 lines
1.7 KiB
TypeScript

// 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;
}