book-explainer-generate-site
Internal site-production phase that builds a local PDF or EPUB book reading site from an exact run request, Content brief, Run Manifest, canonical structure, and report set.
- License 许可
- MIT
- 最近更新
- 2026-10-27
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- book-explainer-generate-site
- description
- Internal site-production phase that builds a local PDF or EPUB book reading site from an exact run request, Content brief, Run Manifest, canonical structure, and report set.
- user-invocable
- false
02 资源文件 1
- 脚本scripts/validate_locators.py3.0 KB
03 SKILL.md 正文
Generate a book reading site
Apply [[explainer-content-workflow-base]], read its Artifact contract, and
require the book profile. Own only site authoring and local build; do not
perform workflow discovery, user consultation, Content modeling, or Planning.
Require exact paths and digests for the run request, selected Content brief,
Run Manifest, canonical source structure, and every planned source report. The
Manifest entry must select this site output with create or replace. Return a
structured missing/incompatible-input result otherwise. Never infer the latest
planning Artifact.
The planning Artifacts provide the shared interpretive model and resolved run plan, but are not exclusive inputs. Reread reports or the narrow source locus whenever fidelity requires it. Detect the source adapter from durable work-directory artifacts:
- EPUB when
epub/locators.jsonexists; - PDF otherwise, when reports use canonical
.psource anchors.
If the artifacts conflict or do not identify either format, stop and ask for the source format. Never infer EPUB from prose alone.
Delegate the complete build to [[explainer-reading-site-generate-base]]. This skill owns the shared book profile and supplies only the adapter-specific inputs below. Publishing remains a separate [[explainer-reading-site-deploy]] action.
Shared book profile
Pass <WORK_DIR>/structured/toc.md as the canonical source structure. Order
reports as follows:
overviewfirst, kicker全体レポート;chapter-Nin natural numeric order, kicker第N章;- unmatched reports last in natural order, with a readable title-cased kicker.
Use landing vocabulary 読書ガイド, チャプター, and 章. Use the supplied
title when present; otherwise resolve it from the adapter metadata or overview.
Keep the source-authored order and divisions as the site's navigation backbone. Use the selected content brief to explain the book-wide mental model, chapter roles, and cross-chapter relationships in the landing page and appropriate report pages. Use the manifest mappings to confirm the selected scope. Never reorder, merge, suppress, or rename source divisions merely because the brief groups its explanatory items differently.
Adapter inputs
For PDF, pass locator kind pdf-page and make ocr/figures/ available when it
exists. No locator map or deterministic locator command applies.
For EPUB, pass:
- locator kind
epub; <WORK_DIR>/epub/locators.jsonas the validation map;<WORK_DIR>/epub/media/as optional original media, copied recursively tosite/media/;- the title in
epub/metadata.jsonwhen the user did not supply one.
After semantic src/*.md authoring and the shared consistency sweep are clean,
but before HTML generation, run:
python3 <SKILL_DIR>/scripts/validate_locators.py \
<WORK_DIR>/epub/locators.json <WORK_DIR>/src/*.md
Unknown or missing EPUB locators and EPUB prose using PDF .p anchors block the
build. Finish by reporting <WORK_DIR>/site/ and offering deployment separately.
Run all normal AI checks and return the exact output inventory and digest to the
coordinator. Human interaction belongs to the coordinator. When
human_gates.site: true, mark the checked site as the checkpoint subject; a
later phase may accept it only with the matching checkpoint-decision Artifact.
Never treat that decision as permission to deploy.
04 同仓库更多 Skills
invalid-skill-frontmatter
暂无简介
pdf-explainer-summarize
Digest a book, manual, or other long non-paper PDF into a source-anchored Markdown overview. Use when the requested deliverable is only a report, digest, or summary. Use paper-explainer-summarize for academic papers, direct reading for short PDFs, and book-explainer for coordinated reports, audio, site, rebuild, or resume.
pdf-explainer-pdf-stitch
Internal Phase 2 worker invoked once by pdf-explainer-summarize after chunk extraction. Reconciles sections across chunk boundaries, deduplicates the material, and writes the canonical structural spine and outline.
pdf-explainer-pdf-extract
Internal Phase 1 worker invoked by pdf-explainer-summarize once per page chunk. Reads the chunk visually or from a faithful text layer and writes structured source material with a verbatim heading stream, not a finished report.
pdf-explainer-pdf-detail
Internal per-chapter worker invoked by book-explainer for PDF input. Re-read one resolved chapter span visually or from a faithful text layer and write a standalone detail report with [pNN] source anchors.
pdf-explainer-generate-site
Compatibility entry point for requesting a local PDF reading site from an existing work directory. Route through book-explainer so Artifact reconciliation and Planning still occur.