Math Atlas Problem Optimization
End-to-end workflow for creating or optimizing an interactive math problem page with
verified formulas, accurate history, contributor avatars + profile links, and a
high-quality Canvas visualization.
When to use
- User asks to optimize/fix/create a problem page at
/problems/<slug>
- User reports incorrect formulas, bad visualization, or missing references
- User wants to add a new mathematical problem to the atlas
Architecture (read this first)
Each problem is one self-contained file under src/content/problems/<slug>.ts that
calls defineProblem({...}). There is no central problems.ts data array and no separate
coreFormulas record — formulas, videos, authors, timeline all live inline in that object.
A new/edited problem touches up to four places:
src/content/problems/<slug>.ts — the defineProblem(...) object (data, formulas, videos, authors, timeline)
src/content/problems/index.ts — import the export and add it to the configuredProblems array
src/components/viz/classic-viz.tsx — the draw<Name> function + <Name>Viz wrapper
- Two viz registries —
src/components/viz/viz-loader.tsx and src/components/ui/problem-card.tsx
Types live in src/lib/problem-types.ts. Helpers (defineProblem, scholarSearch) in src/lib/problem-template.ts.
Workflow
Phase 1 — Audit
- Navigate to the page in the browser (
npx next dev) and take a full-page screenshot
- Read the problem file
src/content/problems/<slug>.ts
- Read the
draw<Name> function in src/components/viz/classic-viz.tsx
- Note issues: vague descriptions, missing/weak authors, no avatars, weak references, flat visualization, media-hype framing
Phase 2 — Research
Spawn a research agent to gather verified data. See references/research-checklist.md:
- Precise formal statement with LaTeX, plus 1-2 equivalent formulations
- Verified historical timeline with exact paper citations
- Key contributors (provers, verifiers, generalisers) with institutions
- For each person: homepage / Google Scholar / X(Twitter) / LinkedIn (verify identity!)
- Avatar source per contributor (personal photo for people, logo for orgs)
- DOI / arXiv links for all papers
- 2-3 relevant YouTube videos (verify each
videoId exists)
Be skeptical of recent (current-year) AI/math news — distinguish the exact result from
media conflation, and lean on primary sources (arXiv, the proof PDF, the problem's own catalogue).
Phase 3 — Write/update the problem file
Edit src/content/problems/<slug>.ts. See references/data-schema.md for the
field-by-field guide. Key fields: status, field, year, shortDescription, longDescription,
vizComponent, collections, coordinates, connections, authors, papers, timeline,
formulas, videos.
For a new problem, also register it in src/content/problems/index.ts (import + array entry).
Phase 4 — Formulas
Set the inline formulas: ProblemFormula[] array (2-4 entries), each { label, latex, description }:
- Main statement — the theorem / problem definition
- Key mechanism — the underlying quantity or bound that drives the result
- Classification / structure — a structural quantity, or the contrasting bound (e.g. the conjecture vs. the disproof)
Use String.raw for LaTeX; keep descriptions ≤120 chars.
Phase 5 — Authors: avatars + profile links
See references/data-schema.md "Authors" section.
- Avatars (
avatarUrl): for a person, use a personal photo; for a company/institution
entity author, use the org logo. Download assets into public/people/<name>.<ext> (photos) or
public/orgs/<name>.<ext> (logos) and reference "/people/..." / "/orgs/...". Local assets
avoid the next.config.ts remotePatterns allowlist (only upload.wikimedia.org +
scholar.googleusercontent.com) and never expire (LinkedIn/Twitter CDN URLs are signed and expire).
- Links: prefer Google Scholar; the Homepage slot falls back personal-site → Scholar →
Twitter/LinkedIn. Rendered as brand logos by
src/components/ui/author-card.tsx via
src/components/ui/brand-icons.tsx (Google Scholar, X, LinkedIn, Wikipedia). Fields:
homepageUrl, scholarUrl, twitterUrl, linkedinUrl, wikipediaUrl.
- Order: put the result's main contributors first, historical figures last.
Phase 6 — Visualization
Add a draw<Name> function + <Name>Viz wrapper at the end of classic-viz.tsx, then register the
PascalCase name in both viz-loader.tsx and problem-card.tsx. See
references/viz-patterns.md:
- Show the actual mathematical objects (point sets, vector fields, mappings), not abstract decoration
- Add pointer interactivity (mouse controls a meaningful parameter; gentle
time animation when idle)
- Mark key features (fixed points, singularities, the active element) with blue glow + label
- Style: dark bg (
#050505), white strokes, blue (#60a5fa) highlights; degrade gracefully on card previews
Phase 7 — Verify
- Reload the page in the browser, take a screenshot
- Check formulas render (no KaTeX errors) and the visualization animates + responds to the pointer
- Confirm every avatar serves (200) and each profile link / video resolves
- Run
npx next build — must pass TypeScript and static generation with no errors
- Verify all DOI/arXiv/homepage URLs are valid (curl 200) and
videoIds exist (YouTube oEmbed)
File map
| What |
Where |
| Problem data (per problem) |
src/content/problems/<slug>.ts — defineProblem({...}) |
| Problem registry |
src/content/problems/index.ts — configuredProblems array |
| Types |
src/lib/problem-types.ts (Problem, Author, ProblemFormula, Video, …) |
| Helpers |
src/lib/problem-template.ts (defineProblem, scholarSearch) |
| Visualization |
src/components/viz/classic-viz.tsx — draw* fn + *Viz wrapper |
| Viz registries (BOTH) |
src/components/viz/viz-loader.tsx and src/components/ui/problem-card.tsx |
| Author card + avatars |
src/components/ui/author-card.tsx |
| Brand link icons |
src/components/ui/brand-icons.tsx |
| Avatar assets |
public/people/<name>.<ext> (photos), public/orgs/<name>.<ext> (logos) |
| Image domain allowlist |
next.config.ts → images.remotePatterns |
| Page template |
src/app/problems/[slug]/page.tsx |
References
- references/research-checklist.md — what to verify during research
- references/data-schema.md — field-by-field guide for the problem file
- references/viz-patterns.md — Canvas visualization conventions and patterns
1---2name: math-atlas-problem3description: Optimize or create a math problem page in Math Atlas. Covers research, formula verification, visualization, problem data accuracy, author avatars/links, and browser testing. Use when asked to optimize, fix, or create a /problems/<slug> page.4---56# Math Atlas Problem Optimization78End-to-end workflow for creating or optimizing an interactive math problem page with9verified formulas, accurate history, contributor avatars + profile links, and a10high-quality Canvas visualization.1112## When to use1314- User asks to optimize/fix/create a problem page at `/problems/<slug>`15- User reports incorrect formulas, bad visualization, or missing references16- User wants to add a new mathematical problem to the atlas1718## Architecture (read this first)1920Each problem is **one self-contained file** under `src/content/problems/<slug>.ts` that21calls `defineProblem({...})`. There is no central `problems.ts` data array and no separate22`coreFormulas` record — formulas, videos, authors, timeline all live inline in that object.2324A new/edited problem touches up to four places:25261. `src/content/problems/<slug>.ts` — the `defineProblem(...)` object (data, formulas, videos, authors, timeline)272. `src/content/problems/index.ts` — import the export and add it to the `configuredProblems` array283. `src/components/viz/classic-viz.tsx` — the `draw<Name>` function + `<Name>Viz` wrapper294. **Two** viz registries — `src/components/viz/viz-loader.tsx` **and** `src/components/ui/problem-card.tsx`3031Types live in `src/lib/problem-types.ts`. Helpers (`defineProblem`, `scholarSearch`) in `src/lib/problem-template.ts`.3233## Workflow3435### Phase 1 — Audit36371. Navigate to the page in the browser (`npx next dev`) and take a full-page screenshot382. Read the problem file `src/content/problems/<slug>.ts`393. Read the `draw<Name>` function in `src/components/viz/classic-viz.tsx`404. Note issues: vague descriptions, missing/weak authors, no avatars, weak references, flat visualization, media-hype framing4142### Phase 2 — Research4344Spawn a research agent to gather verified data. See [references/research-checklist.md](references/research-checklist.md):4546- Precise formal statement with LaTeX, plus 1-2 equivalent formulations47- Verified historical timeline with exact paper citations48- Key contributors (provers, verifiers, generalisers) with institutions49- For each person: homepage / Google Scholar / X(Twitter) / LinkedIn (verify identity!)50- Avatar source per contributor (personal photo for people, logo for orgs)51- DOI / arXiv links for all papers52- 2-3 relevant YouTube videos (verify each `videoId` exists)5354Be skeptical of recent (current-year) AI/math news — distinguish the *exact* result from55media conflation, and lean on primary sources (arXiv, the proof PDF, the problem's own catalogue).5657### Phase 3 — Write/update the problem file5859Edit `src/content/problems/<slug>.ts`. See [references/data-schema.md](references/data-schema.md) for the60field-by-field guide. Key fields: `status`, `field`, `year`, `shortDescription`, `longDescription`,61`vizComponent`, `collections`, `coordinates`, `connections`, `authors`, `papers`, `timeline`,62`formulas`, `videos`.6364For a **new** problem, also register it in `src/content/problems/index.ts` (import + array entry).6566### Phase 4 — Formulas6768Set the inline `formulas: ProblemFormula[]` array (2-4 entries), each `{ label, latex, description }`:69701. **Main statement** — the theorem / problem definition712. **Key mechanism** — the underlying quantity or bound that drives the result723. **Classification / structure** — a structural quantity, or the contrasting bound (e.g. the conjecture vs. the disproof)7374Use `String.raw` for LaTeX; keep descriptions ≤120 chars.7576### Phase 5 — Authors: avatars + profile links7778See [references/data-schema.md](references/data-schema.md) "Authors" section.7980- **Avatars** (`avatarUrl`): for a **person**, use a personal photo; for a **company/institution81 entity** author, use the org logo. Download assets into `public/people/<name>.<ext>` (photos) or82 `public/orgs/<name>.<ext>` (logos) and reference `"/people/..."` / `"/orgs/..."`. Local assets83 avoid the `next.config.ts` `remotePatterns` allowlist (only `upload.wikimedia.org` +84 `scholar.googleusercontent.com`) and never expire (LinkedIn/Twitter CDN URLs are signed and expire).85- **Links**: prefer Google Scholar; the **Homepage** slot falls back personal-site → Scholar →86 Twitter/LinkedIn. Rendered as brand logos by `src/components/ui/author-card.tsx` via87 `src/components/ui/brand-icons.tsx` (Google Scholar, X, LinkedIn, Wikipedia). Fields:88 `homepageUrl`, `scholarUrl`, `twitterUrl`, `linkedinUrl`, `wikipediaUrl`.89- **Order**: put the result's **main contributors first**, historical figures last.9091### Phase 6 — Visualization9293Add a `draw<Name>` function + `<Name>Viz` wrapper at the end of `classic-viz.tsx`, then register the94PascalCase name in **both** `viz-loader.tsx` and `problem-card.tsx`. See95[references/viz-patterns.md](references/viz-patterns.md):9697- Show the actual mathematical objects (point sets, vector fields, mappings), not abstract decoration98- Add pointer interactivity (mouse controls a meaningful parameter; gentle `time` animation when idle)99- Mark key features (fixed points, singularities, the active element) with blue glow + label100- Style: dark bg (`#050505`), white strokes, blue (`#60a5fa`) highlights; degrade gracefully on card previews101102### Phase 7 — Verify1031041. Reload the page in the browser, take a screenshot1052. Check formulas render (no KaTeX errors) and the visualization animates + responds to the pointer1063. Confirm every avatar serves (200) and each profile link / video resolves1074. Run `npx next build` — must pass TypeScript and static generation with no errors1085. Verify all DOI/arXiv/homepage URLs are valid (curl 200) and `videoId`s exist (YouTube oEmbed)109110## File map111112| What | Where |113|------|-------|114| Problem data (per problem) | `src/content/problems/<slug>.ts` — `defineProblem({...})` |115| Problem registry | `src/content/problems/index.ts` — `configuredProblems` array |116| Types | `src/lib/problem-types.ts` (`Problem`, `Author`, `ProblemFormula`, `Video`, …) |117| Helpers | `src/lib/problem-template.ts` (`defineProblem`, `scholarSearch`) |118| Visualization | `src/components/viz/classic-viz.tsx` — `draw*` fn + `*Viz` wrapper |119| Viz registries (BOTH) | `src/components/viz/viz-loader.tsx` **and** `src/components/ui/problem-card.tsx` |120| Author card + avatars | `src/components/ui/author-card.tsx` |121| Brand link icons | `src/components/ui/brand-icons.tsx` |122| Avatar assets | `public/people/<name>.<ext>` (photos), `public/orgs/<name>.<ext>` (logos) |123| Image domain allowlist | `next.config.ts` → `images.remotePatterns` |124| Page template | `src/app/problems/[slug]/page.tsx` |125126## References127128- [references/research-checklist.md](references/research-checklist.md) — what to verify during research129- [references/data-schema.md](references/data-schema.md) — field-by-field guide for the problem file130- [references/viz-patterns.md](references/viz-patterns.md) — Canvas visualization conventions and patterns