Exam Study Guide
SkillDocs & knowledgeOrganize a chapter whose lessons are finished but whose stage gate is not yet complete into a strongly-typed textbook checklist, and compile it in visual mode into a self-contained HTML/PDF where formulas are readable, images are visible, and every knowledge point is explained item by item together
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Exam Study Guide skill
What this skill tells your AI
The instructions your AI receives, as published by zekainie/universal-examprep-skill in full/skills/exam-study-guide/SKILL.md and read by ahel’s review.
Purpose
After teaching the current chapter, build its validated typed Study Guide manifest; in visual mode, compile that manifest into a readable, self-contained HTML Study Guide and printable PDF before phase completion. A Study Guide is a teaching artifact, not a dump of the wiki and bank: it groups knowledge points with every mapped lecture, homework, Quiz, mock-exam, past-exam, or textbook example and explains each one through formula selection, variable mapping, substitution, solution, a beginner-first explanation of why the answer follows, and source trace. Keep Markdown/JSON as auditable sources and never overwrite them with a derived artifact.
Activation
Require explicit study_state.json.processing_mode=full. Lightweight mode never
invokes this module, even for a one-shot handout request; explain that Study Guide
generation requires switching to full processing and reconfirming the start gate.
Use this module after the exam workspace/current chapter are confirmed and its substantive teaching is persisted, but before complete-phase in a structured workspace. Restore the current phase and effective artifact_mode from study_state.json before selecting <N>. chat still builds and imports the mandatory typed profile=full manifest, then stops without HTML/PDF; a recognized standing visual preference continues through rendering, receipt binding, and all-page QA. A direct one-shot handout request follows its explicit output scope without rewriting the stored preference. Never inspect or infer the student's subscription. Preserve the parent exam-coach language and provenance contracts in all chat summaries.
Inputs
- Exactly one current-chapter
references/wiki/chNN*.mdfile, used as source evidence rather than pasted wholesale. - Optional
study_state.json; its canonical language-neutrallanguagecode (zh/en/bilingual; legacy/display aliases中文/English/双语migrate on read) controls all agent-generated headings, notices, explanations, labels, and summaries. Missing state follows the session default (English unless the student opened in Chinese); the script's Chinese empty-value fallback exists only for legacy workspaces and is not a new-session language decision. - The current-chapter slice of
references/teaching_examples.json, every current-chapter entry inreferences/quiz_bank.json, and every typed current-chapter question unit, de-duplicated by item ID. A legacygradable=falserecord remains a teaching example in the guide but is never served or graded as a quiz. - A substantive
notebook/chNN.mdplus the validated typed teaching manifestnotebook/chNN.guide.json. - Workspace-local images under
references/assets/referenced by the typed manifest. - For ingestion-v2 workspaces, current validated
.ingest/canonical_groups.jsonland.ingest/source_conflicts.jsonlfacts. These are revision-bound derived facts, not replacements for source occurrences or item/unit IDs. Do not preload unrelated chapters or hand-fold near matches. - For ingestion-v2,
.ingest/claim_records.jsonland the matching.ingest/claim_verification_receipts/chNN.jsonare mandatory typed-guide inputs. The validator recomputes them against the current manifest and live source/content/group/conflict facts. The receipt'sfact_snapshot_sha256also binds current build/parser/page-quality/review facts into its ID, so a parser identity revision requires re-verification even when content units are unchanged. Legacy/v1 compatibility is read-only for an existing canonical manifest and must not be described as having this v2 evidence. The receipt scope islocation_only, never semantic proof.
Use only $...$ and $$...$$ as formula delimiters in source Markdown. Forms such as (A\cup B), [P=\frac{...}], \(...\), and \[...\] are not valid framework input. Confirm and migrate the source explicitly; never guess-rewrite a formula.
Workflow
-
Restore
study_state.json, resolve output intent, and runvalidate_workspace.py <ws> --json. Read the explicit.ingest/build_manifest.json.pipeline_version; never infer or delete it. Onlyingestion-v2follows the author/compiler/claim path in steps 2-6. An explicitingestion-v1workspace may only read its existing canonical manifest through the legacy compatibility path below; it cannot import, relocalize, or render a new Study Guide and must never claim the v2 claim/receipt gate. A failed v2 command does not authorize downgrading to v1.chatstops after the canonicalprofile=fullmanifest import;visualcontinues through rendering and all-page QA. Persist a standing choice only throughupdate_progress.py set --artifact-mode chat|visual. Separately resolveanswer_explanation_mode=ordinary|isolated. Missing, legacy, or invalid state has stored-schema fallbackordinary, which still requires a detailed beginner-first explanation for every item without an isolation claim. Before authoring a full-v2 Guide, perform a native-child capability handshake: require one fresh independent child context per item plus enforceable restriction of that child's task input and tools to the exact request. When verified, default toisolatedunless the user opted out, persist it, and disclose once that it consumes extra host quota/time; no separate API key or external-upload consent is needed. Any missing, inherited, or unverified boundary keepsordinaryand must be named. A separately billed external Provider is available only when the user explicitly requests it; before persisting that fallback, retain the two-stage no-upload exact plan and exact-plan pricing/privacy/upload consent. Never infer either capability or upload permission from a model family, subscription, API key,full, orvisual. -
For ingestion-v2, prepare the revision-bound current-chapter packet and annotation template; do not hand-copy source facts or reverse-engineer the compiler source:
python scripts/study_guide_author.py --workspace <ws> prepare --chapter <N> --jsonThis fixed command atomically writes
notebook/chNN.authoring-packet.jsonand the deliberately incompletenotebook/chNN.authoring-annotations.template.json; its JSON result reports both paths plus the template hash. Exit10/status=blockedforbids authoring until every reported review, conflict, source, asset, and denominator blocker is resolved. The packet binds source/fact/asset revisions and contains the exact semantic units, formulas, items, prompt/answer assets, and source locations the agent may use. -
Read the generated template instead of guessing the annotation schema. Copy only its
annotationsobject tonotebook/chNN.authoring-annotations.json, then replace every empty value and__...__sentinel. The template already contains the exact ID and field shape for every formula group and walkthrough item, plus an explicit knowledge-point schema placeholder and the full inventories to partition. The wrapper saystemplate_status=incompleteandvalid_annotations=false; the template itself and its untouched inner object are intentionally invalid and cannot satisfy persistence, compilation, or completion. Author only explanations in the target file, bound to the packet'spacket_sha256. Do not change packet IDs, source text, exact LaTeX, assets, locations, or source roles. Use the canonicalzh|en|bilinguallanguage shape and explicit provenance for every authored field. A translation must beai_translationand remain visibly AI-labelled; unsupported reasoning uses visibly labelledai_supplement, never fake material provenance. Inordinary, the template also requires each item's detailed zero-prerequisiteanswer_explanationand exact per-languageai_supplementprovenance; it must explain symbols, formula/rule choice, substitutions or reasoning, every subpart, and final meaning without merely repeating the answer. Inisolated, do not author that field in annotations; step 4 supplies it through the receipt-bound extension. Each item must map to at least one knowledge point. A knowledge point may haveexample_ids=[]when the materials truly provide no matching item; the compiler emits the active-language “materials do not provide a corresponding example” notice. Knowledge points still exactly partition semantic units/formula groups, and all items remain globally covered. If a crop-receipt-only upgrade changes the packet after a large canonical annotations file was already authored, runstudy_guide_author.py rebase-annotations --chapter <N>instead of hand-editing or regenerating it. That command may change onlypacket_sha256, add a missing mode binding on the compatible path, and remove paired legacyself_checkfields; it atomically publishes only after the entire current annotation validator passes against the new packet. Any item/formula/knowledge-point drift is refused. -
Only when
answer_explanation_mode=isolated, generate exactly one isolated answer explanation per item before persistence. Inordinary, skip this entire step:study_guide_explain.py statusreportsdisabled/not_applicable, and every mutating explainer command must fail. The protocol script never calls a provider itself: it emits one hash-bound request at a time. The preferred host-native route must create a fresh independent, tool-disabled child context containing only that request's fixed instruction, exact question, exact answer when present, target language, and listed item-scoped assets; it uses the current host allowance and no separate API key. Do not batch multiple items into one context, add the parent conversation, course history/wiki/retrieval, expose a whole page containing unrelated questions or answers, or let the child browse the workspace/network. If the host cannot enforce these boundaries, useordinary. A bundled external-Provider adapter is only an explicit-user-request fallback: it may prepare a non-uploading exact plan after the first consent, and itsrunrequires the second exact-plan consent. Adapter completion finalizes only the isolated explanation receipt, not notebooks, compiled Guide, claims, import, rendering, QA, or phase completion.python scripts/study_guide_explain.py --workspace <ws> prepare --chapter <N> --json python scripts/study_guide_explain.py --workspace <ws> status --chapter <N> --json python scripts/study_guide_explain.py --workspace <ws> show --chapter <N> --request-id <request_id> --json # Call one fresh/stateless tool-disabled model with exactly that request. The model result contains only answer_explanation plus non-rendered coverage. python scripts/study_guide_explain.py --workspace <ws> make-host-receipt --chapter <N> --request-id <request_id> --invocation-id <unique_id> --isolation-mode <fresh_context|stateless_api> --provider <provider> --model <model> --json python scripts/study_guide_explain.py --workspace <ws> import-result --chapter <N> --request-id <request_id> --input <one-model-result.json> --host-receipt <one-host-receipt.json> --json python scripts/study_guide_explain.py --workspace <ws> finalize --chapter <N> --jsonRepeat
show→ one native-child or explicitly consented external invocation →make-host-receipt→import-resultfor every pending item. The untrusted model result contains onlyanswer_explanationplus the required non-renderedcoverageobject; the separate host receipt records the exact request/instruction/model-input/attachment hashes plus provider/model/invocation/isolation/tool declaration. It is a host declaration, not a sandbox or model-supplied attestation. Every invocation ID must be unique; changed packet, annotations, language, source revision, asset, crop, prompt, or response invalidates the receipt. A page-shaped image is allowed only as a revision-bound target-scoped crop:target_item_only, or prompt-onlytarget_with_required_contextwith exact sortedrequired_context_ids; every answer image remains target-only. Preserve the compact semantic schema/context/isolation controls into the model attachment binding. Ordinary item-specific diagrams may remain as their native asset. The fixed prompt requires a detailed zero-prerequisite explanation, all symbols and substitutions/reasoning, every subpart, honest ambiguity handling, and no answer-self-check panel.coveragemust use the exact target-language keys, enumerate addressed parts and at least two reasoning steps, and attest formula/rule plus final-meaning coverage; it is hash-bound through the response ledger and final receipt but never copied into the typed Guide or rendered. When upgrading an existing response ledger, schema-1 events remain immutable historical chain entries; they cannot satisfy any schema-2 request, which still requires a fresh response withcoverage.For
answer_origin=inline_material, authoring must close the answer to its explicitinline_material_source_unit_id: one same-source-revision/page native material text unit with identical text/title and an explicitzh|ensource language. Missing, ambiguous,zxx, or mismatched evidence blocks authoring. The prompt must use its current item-scoped semantic-v2 crop; afull_promptcrop suppresses duplicate printed prompt text. In a monolingual isolated request, when the exact material answer already equalsANSWER.text,material_evidence.text_refpoints to that field instead of copying the full material passage a second time. Bilingual or genuinely distinct translation/teaching-copy evidence keeps a separate packet-bound material payload. Its model-transport copy may remove only leading/trailing whitespace such as a parser's page-final newline; internal source text is not rewritten, and the unchanged author packet/source revision remains hash-bound. -
Persist all validated walkthroughs, then compile the typed full manifest. In
ordinary, the detailed explanations come from validated annotations and an isolated receipt/contract is forbidden. Inisolated, persistence and compilation additionally require the finalized canonical explanation receipt from step 4:python scripts/study_guide_author.py --workspace <ws> persist-notebooks --chapter <N> --json python scripts/study_guide_author.py --workspace <ws> compile --chapter <N> --jsonThese commands use only the fixed packet, annotations, bindings, claim draft/proposals, and—only for
isolated—canonical answer-explanation request/ledger/receipt files. Notebook publication is one rollback-protected batch. Packet, annotations, bindings, manifest, renderer and QA receipts bind the exact selected mode; switching modes makes the unfinished chain stale. The compiler rechecks all bound facts/assets and either the ordinary authored explanations or the complete isolated per-item receipt, applies thefull_promptimage rule, excludes everystudent_attempt, keeps target-only answer crops after the solution, places the detailed explanation after that answer/asset, omits the deprecated self-check panel, localizes all human headings/labels/AI markers, and renders source anchors honestly as PDF page, PPTX slide, XLSX worksheet, or DOCX logical segment; only PDF links receive#page=. -
Import compiler claims, attach their canonical IDs, and sign the exact attached manifest. The normal proposal route is
create: it compiles the ergonomic proposals and atomically imports/merges the resulting strict ClaimRecords. Useimportinstead only when a complete reviewed ClaimRecord JSONL already exists; never run both routes for one update.python scripts/verify_claims.py create --workspace <ws> --input-proposals notebook/chNN.claim-proposals.json --json # Complete-sidecar alternative only: python scripts/verify_claims.py import --workspace <ws> --input-claims <complete-claims.jsonl> --json python scripts/study_guide_author.py --workspace <ws> attach-claims --chapter <N> --json python scripts/verify_claims.py verify --workspace <ws> --manifest notebook/chNN.guide.claims.json --chapter <N> --jsonattach-claimswrites onlynotebook/chNN.guide.claims.jsonand fails on missing, ambiguous, stale, wrong-unit, or wrong-role claims. The receipt islocation_only: it proves exact authored-field text membership and source unit/location/revision binding, not entailment or correctness. Finish every intended global claim-sidecar mutation before signing all chapter receipts that must remain current. -
Validate and atomically import that exact attached manifest:
python scripts/study_guide_content.py --workspace <ws> validate --chapter <N> --input <ws>/notebook/chNN.guide.claims.json --json python scripts/study_guide_content.py --workspace <ws> import --chapter <N> --input <ws>/notebook/chNN.guide.claims.json --jsonImport publishes canonical
notebook/chNN.guide.jsonplus its bounded notebook block and invalidates stale derived artifacts.profile=fullmust cover the exact de-duplicated current-chapter union of teaching examples, all bank items (including teaching-onlygradable=false), and typed question-unit external IDs; a≤1天budget never shrinks that denominator. Inchat, return toexam-tutorafter this import and do not render. After a language change, rerun authoring from target-language annotations;ordinaryrewrites and revalidates those explanations, whileisolatedalso reruns the complete per-item request/receipt chain. Ingestion-v2relocalizefails early because explanations, crops, notebook blocks, claims, modes, and receipts are language-bound. Do not relabel or reuse a stale-language manifest.Only when Python truly cannot start may an ingestion-v2 host use the older hand-written complete-draft fallback. Label it unverified, preserve all provenance/source limitations in chat, and never claim structured phase completion, claim verification, HTML/PDF readiness, or successful local persistence from that fallback. A failed command, invalid annotation, or missing dependency is not “no Python.”
Historical mode-less ingestion-v2 read-only seam
An already-existing canonical protocol-v2 notebook/chNN.guide.json that lacks answer_explanation_mode but has a complete, currently verifiable isolated contract may be inspected only with study_guide_content.py --workspace <ws> validate --chapter <N> --json, omitting --input. This narrow seam cannot import, render, run QA, satisfy completion, or accept another input; library validators and every new publication require an explicit canonical mode. Any revision requires rebuilding the full authoring chain under ordinary or isolated.
Legacy ingestion-v1 read-only compatibility
An explicit pipeline_version=ingestion-v1 workspace may inspect only an already existing canonical notebook/chNN.guide.json:
python scripts/study_guide_content.py --workspace <ws> validate --chapter <N> --json
The machine report identifies ingestion_pipeline_version=ingestion-v1, legacy_compatibility=read_only, and claim_verification.status=not_applicable with required=false. Do not pass another --input, import, relocalize, or render this manifest into a new visual Guide. Existing historical JSON/HTML/PDF files remain readable as historical artifacts, but they satisfy no new completion or QA claim. To revise content, language, crops, explanations, HTML, or PDF, migrate/re-ingest the workspace as ingestion-v2 and run the complete authoring chain. If a workspace says v2, missing claims or a failed author command is a blocker rather than permission to use this branch.
8. For visual, read docs/pdf-capability-adapters.md, probe docs/pdf-capability-adapters.json, and select exactly one backend:
native: an already installed host PDF capability can print/convert the exact validatedstudy_guide/chNN.htmltostudy_guide/chNN.pdfand can render the result for QA;browser: use the repository fallback with a detected local Edge/Chrome;html: HTML-only request, so no PDF backend is required.
-
Run the content/backend-aware preflight after the typed manifest exists but before invoking the renderer:
python scripts/check_deps.py --workspace <ws> --chapter <N> --artifact-mode visual --pdf-backend <native|browser|html>chapter_math_status=needs_recoveryis a content blocker, not “no math.” Formula conversion becomes required when typed formulas/substitutions exist. Edge/Chrome is required only for the browser route. Explain only the exact missing dependency and obtain consent before installation. -
Render the selected chapter. The default artifact type is the real typed Study Guide; backend/profile are explicit assertions:
python scripts/study_guide_render.py --workspace <ws> --chapter <N> --profile <full|abridged> --pdf-backend <html|browser|native>
- For the browser PDF route, create the PDF only after HTML validation:
python scripts/study_guide_render.py --workspace <ws> --chapter <N> --profile <full|abridged> --pdf-backend browser --pdf
For native, the first render leaves a deliberately non-deliverable awaiting_native_pdf receipt. Before conversion, the host adapter must record that receipt's exact html_sha256 and conversion_start_gate_sha256, its declared registry adapter_id and exact loaded version, and a UTC start timestamp. It must consume those exact HTML bytes and write only the canonical study_guide/chNN.pdf; after it records the UTC completion timestamp, atomically bind the result:
python scripts/study_guide_render.py --workspace <ws> --chapter <N> --pdf-backend native --bind-native --native-pdf-path <ws>/study_guide/chNN.pdf --native-adapter-id <declared-id> --native-adapter-version <exact-version> --conversion-input-html-sha256 <receipt-html-sha256> --conversion-start-gate-sha256 <receipt-gate-sha256> --conversion-started-at <UTC-Z> --conversion-completed-at <UTC-Z> --json
The binding command invokes no adapter, network, installer, or renderer. It revalidates the current typed manifest, HTML, full-processing/runtime gate, allow-listed adapter identity, canonical PDF path/signature/hash, and timestamps under the workspace publication lock, then atomically changes the receipt to qa_pending. Any mismatch leaves the old receipt unbound, so merely dropping a PDF beside the HTML never makes it acceptable. --pdf is browser-only. The adapter/version fields are host declarations bound into the conversion hash, not an attestation that the host process was sandboxed. If the host cannot report the exact loaded adapter version, native binding is unavailable; explicitly fall back to browser or HTML rather than guessing latest.
12. Render and lint every PDF page, then inspect every PNG visually:
```text
python scripts/study_guide_qa.py --workspace <ws> --chapter <N> --json render
python scripts/study_guide_qa.py --workspace <ws> --chapter <N> accept --inspected-pages all --reviewer <name> --reviewer-kind agent --page-verdict 1=pass
```
Repeat `--page-verdict N=pass:<notes>` once for every rendered page; the one-page command above is only the minimal shape. Check formulas, glyphs, prompt/answer order, image clarity, clipping, tables, margins, page numbers, page breaks, orphan headings, and abnormal blank space. Any defect requires a source/renderer fix, regeneration, and a fresh inspection from page 1. `artifact_ready` remains false until the receipt has matching hashes, `visual_qa.status=ready`, every page is recorded, and unresolved defects are empty. Only after `artifact_ready=ready` return to `exam-tutor` to call `complete-phase`.
Output Contract
Shortened here. Read the whole file on GitHub.
Signals
- GitHub stars
- 282
- Forks
- 16
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
exam-study-guide- Source
- github.com/zekainie/universal-examprep-skill