# AI public root router

This clipboard is the public root router for jp-election-public-ja. Do not preload all public data; classify the question first and then read only the required public URLs.

## Fetch policy
- Classify the question first into current / years / graph / file lookup / docs.
- Read heavy CSV / JSON / municipality indexes only when they are actually needed.
- Start from indexes, maps, and manifests before resolving a concrete public URL.
- Do not use internal paths, generated local paths, or private-viewer paths.
- Prefer explicit public_key and public URL values rather than guessed naming-rule paths.

## Entry pages
- [Public root](https://jp-election-public-ja-2026-hr-smd.pages.dev/index.html)
  - This root surface itself. Entry router for current / graph / data.
- [Current page](https://jp-election-public-ja-2026-hr-smd.pages.dev/index.html)
  - Current published page for the active release surface.
- [Year pages](https://jp-election-public-ja.pages.dev/years)
  - Directory of published year pages and election families.
- [Municipality / Graph Explorer](https://jp-election-public-ja-2026-hr-smd.pages.dev/graph.html)
  - Municipality / prefecture / national trend explorer.
- [Link index](https://jp-election-public-ja-2026-hr-smd.pages.dev/links.html)
  - Public list of documents and election-scoped links.
- [Proportional analysis](https://jp-election-public-ja-2026-hr-smd.pages.dev/party-proportional.html)
  - Analysis page for proportional party series.
- [Constituency analysis](https://jp-election-public-ja-2026-hr-smd.pages.dev/party-constituency.html)
  - Analysis page for constituency series.

## Public indexes and maps
- [root-ai-router.en.md](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/root-ai-router.en.md)
  - Minimal router markdown intended for clipboard use.
- [root-ai-router.en.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/root-ai-router.en.json)
  - Structured JSON for question routing and public indexes.
- [page-profile.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-profile.json)
  - Root page summary, counts, and navigation metadata.
- [page-links.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-links.json)
  - Structured list of doc groups and election link rows.
- [file-links.tsv](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/file-links.tsv)
  - First lookup index for public canonical / derived files.
- [page/downloads/catalog.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/downloads/catalog.json)
  - Group catalog for bulk download targets.
- [page/downloads/all-files.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/downloads/all-files.json)
  - Full list of public download targets with public_key, href, size, and sha256.
- [site-config.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/site-config.json)
  - Index of public docs, analysis pages, and routes.
- [page/page-ai-catalog-map.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-ai-catalog-map.json)
  - Heavy municipality graph-family index map. Read only when needed.
- [analysis/graph-family/latest/graph-page.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/analysis/graph-family/latest/graph-page.json)
  - Graph family page contract and scope status.
- [analysis/party-proportional/latest/graph-page.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/analysis/party-proportional/latest/graph-page.json)
  - Page contract for the proportional analysis surface.
- [docs/graph-family-spec.en.html](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/graph-family-spec.en.html)
  - Standalone public spec describing what the graph can do.
- [docs/reports/index.html](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/reports/index.html)
  - Shelf for uploaded analysis reports intended for AI or human readers.
- [docs/reports/index.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/reports/index.json)
  - JSON index of uploaded analysis reports.

## Route by question
### 1. site_navigation
- Questions about how to navigate the site or how current / graph / data differ.
- Read first:
  - [root-ai-router.en.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/root-ai-router.en.json)
  - [page-profile.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-profile.json)
- Then optional:
  - [Public root](https://jp-election-public-ja-2026-hr-smd.pages.dev/index.html)
  - [Current page](https://jp-election-public-ja-2026-hr-smd.pages.dev/index.html)
  - [Year pages](https://jp-election-public-ja.pages.dev/years)
  - [Municipality / Graph Explorer](https://jp-election-public-ja-2026-hr-smd.pages.dev/graph.html)
  - [Link index](https://jp-election-public-ja-2026-hr-smd.pages.dev/links.html)
- Resolve the route first, then read only the needed entry page.

### 2. year_or_release_lookup
- Questions about year pages, published pages, or the current release page.
- Read first:
  - [Year pages](https://jp-election-public-ja.pages.dev/years)
  - [Current page](https://jp-election-public-ja-2026-hr-smd.pages.dev/index.html)
  - [page-links.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-links.json)
- Then optional:
  - [file-links.tsv](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/file-links.tsv)
  - [page/downloads/catalog.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/downloads/catalog.json)
- Prefer the HTML routes plus structured link rows.

### 3. graph_or_municipality_analysis
- Questions about municipality / prefecture / national graph analysis and related payloads.
- Read first:
  - [Municipality / Graph Explorer](https://jp-election-public-ja-2026-hr-smd.pages.dev/graph.html)
  - [analysis/graph-family/latest/graph-page.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/analysis/graph-family/latest/graph-page.json)
- Then optional:
  - [page/page-ai-catalog-map.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-ai-catalog-map.json)
  - [docs/graph-family-spec.en.html](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/graph-family-spec.en.html)
  - [file-links.tsv](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/file-links.tsv)
- Read the heavy municipality map only when the question truly needs it.

### 4. canonical_or_derived_file_lookup
- Questions that need the public URL of a canonical / derived CSV, JSON, or document.
- Read first:
  - [file-links.tsv](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/file-links.tsv)
  - [page/downloads/all-files.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/downloads/all-files.json)
- Then optional:
  - [page-links.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-links.json)
  - [page/downloads/catalog.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/downloads/catalog.json)
  - [site-config.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/site-config.json)
- Do not guess paths. Use the public_key / href resolved by the indexes.

### 5. spec_or_methodology
- Questions about public docs, specs, graph methodology, or public-surface contracts.
- Read first:
  - [site-config.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/site-config.json)
- Then optional:
  - [docs/graph-family-spec.en.html](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/graph-family-spec.en.html)
  - [Link index](https://jp-election-public-ja-2026-hr-smd.pages.dev/links.html)
  - [page-links.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/page/page-links.json)
- Read the docs index first, then open only the needed spec.

### 6. analysis_reports
- Questions that need published analysis reports, commentary, or external AI-authored reports.
- Read first:
  - [docs/reports/index.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/reports/index.json)
- Then optional:
  - [docs/reports/index.html](https://jp-election-public-ja-2026-hr-smd.pages.dev/docs/reports/index.html)
  - [site-config.json](https://jp-election-public-ja-2026-hr-smd.pages.dev/site-config.json)
- List available reports from the reports index first, then read only the needed report HTML or raw source.

## Rules
- State which public URLs were actually read before answering.
- When data volume is large, fetch only the specific public artifacts needed.
- If the question does not require full data, stop at the catalog / map level.
- For graph-family joins, prefer party_id / seriesId / jis_code / election_set_key over display labels.
