# Ask AI Sidecar

Machine-readable mapping from municipality names or JIS codes to prefecture bundles, municipality stats CSV, and graph payloads. The intended flow is selector first, then prefecture bundle plus public catalog keys.

## Scope

- municipalities: 1988
- prefecture bundles: 47

## Recommended Flow

1. Resolve the municipality by `municipality_name_ja` or `jis_code` using the selector index.
2. Read `preferred_bundle` to find the prefecture-scoped party-vote ZIP and its checksum sidecars.
3. Use `catalog_targets` to access municipality stats CSV and municipality graph payload JSON.
4. Prefer public URLs and public keys listed in this sidecar over guessed paths.

## Public URLs

- [AI catalog map JSON](/page/page-ai-catalog-map.json)
  - Machine-readable municipality-to-bundle/stats/graph mapping table.
- [Municipality selector index](/products/jp-election/derived/shape/indexes/municipality-selector/latest/municipality-selector.json)
  - Selector index with municipality names, prefecture codes, JIS codes, and latest election-set keys.
- [Municipality stats README](/products/jp-election/derived/extraction/municipality-series/stats/README.md)
  - Public contract and grain for municipality statistics series.
- [Municipality graph README](/products/jp-election/derived/shape/graph/municipality-series/README.md)
  - Route-level contract for municipality graph payloads.

## Selector Source

- selector public key: `products/jp-election/derived/shape/indexes/municipality-selector/latest/municipality-selector.json`
- selector href: /products/jp-election/derived/shape/indexes/municipality-selector/latest/municipality-selector.json

## Prompt Examples

- Find the bundle and public keys needed for Sapporo Chuo Ward party-vote series.
- Map JIS 011010 to the graph payload and municipality stats CSV.
- Use the Tokyo prefecture bundle to narrow the retrieval targets for a requested municipality.

## Notes

- This markdown is an entry summary. Use the JSON sidecar for the full municipality-to-catalog mapping.
- Prefecture party-vote bundles are checksum-published ZIP archives.
- Public sidecars are sanitized and should not include internal-only paths or operator identifiers.

