Files
CatoandClaude Fable 5.1 687abef748 feat(research): commission the substrate-of-recursion programme, research engine, JSON map and correction intake (#31)
* feat(research): commission the substrate-of-recursion programme, research engine, JSON map and correction intake

A research programme file with layers, open questions and falsifiers,
cross-referenced to the coverage universe by test. An engine that searches
the fleet's SearXNG through ai-kit for a source behind each unverified
producer row and files candidates, never findings, into a committed
evidence file. /api/health and /api/map so agents consume the map as data.
Prefilled public-issue links so a wrong row is one click to report.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6ecRd91ZsPPcjuNkKTFV2

* fix(research): search on the material's trade name, match name and material in one window

Each listing now carries the term the trade uses, so the engine asks for
"Yunnan Tin" tin rather than "Yunnan Tin" high-purity. A page is a
candidate only where the company name and a material term share a window,
and that window is the excerpt filed. Also replaces a stray NUL in the row
key with a shared evidenceKey helper.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6ecRd91ZsPPcjuNkKTFV2

* chore(research): exempt the engine-written evidence file from prettier; summarise the all-materials layer

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6ecRd91ZsPPcjuNkKTFV2

* research: first engine run — 59 of 92 producer rows have a candidate source

Every unverified row examined through the fleet's SearXNG. 59 rows carry
at least one page naming the company alongside the material (131 pages
filed with excerpts), 33 found nothing usable, 0 could not look. Nothing
is promoted: every row still reads unverified or candidate until an analyst
attaches the source.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y6ecRd91ZsPPcjuNkKTFV2

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-14 04:23:00 -07:00

12 lines
345 B
TypeScript

import { buildMap } from '@/lib/map';
/**
* The whole map as one JSON document. Built from the same config the pages
* render, so it cannot disagree with the site — see lib/map.ts.
*/
export function GET() {
return Response.json(buildMap(), {
headers: { 'Cache-Control': 'public, max-age=300, stale-while-revalidate=3600' },
});
}