# Report Metadata Contract

Use these fields when publishing to the report site:

- `report_file` (required): local file path to `.pdf`, `.ppt`, or `.pptx`.
- `title` (required): report title shown on cards and modal.
- `category` (required): category text shown in filter tabs (for example: `OpenClaw`, `AIGC发展`, `社会治理`).
- `date` (optional): display date label (for example: `2026` or `2026-03`). If omitted, auto-infer from filename/title (`YYYY-MM`/`YYYY`) and fallback to current year.
- `version` (optional): defaults to `1.0`.
- `abstract` (optional): short summary text displayed on card/modal. If omitted, auto-generate from title/category.
- `id` (optional): hyphen-case stable id; autogenerated if omitted.
- `cover_url` (optional): if omitted, placeholder cover is generated.
- `category_dir` (optional): folder name under `public/`; defaults to sanitized category text.

Validation rules:

- New report entry is inserted at the top of `public/reports_config.json`.
- Duplicate `pdfUrl` targets are rejected.
- Script expects clean git working tree by default.
- Script checks git identity (`user.name`, `user.email`) before publishing.
- Script verifies push remote read/push access and base remote read access before mutating files.
- Script expects current branch to be `main` before it creates a feature branch.
