universal-examprep-skill / full
AGENTS.md300 starsChanged 2 months agoMITView on GitHub
This is the minimum executable contract for generic agents that do not load the skill collection. The behavioral source of truth is skills/exam-cram/SKILL.md plus the selected skills/*/SKILL.md; locales/zh/SKILL.md and locales/en/SKILL.md are compatibility/wording indices, not duplicate manuals. This skill builds a student's slides, notes, teacher highlights, homework, and past papers into a chaptered wiki plus a standard question bank, then teaches, quizzes, reviews mistakes, and produces an optional pre-exam handout without hiding unsupported or AI-supplied content. These rules apply only while…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- llms.txtllms.txt
- universal-exam-cram-coach-fullSkill
- universal-exam-cram-coachSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Read all remaining warnings, skipped/unbound entries, typed issues, parser/fact warnings, conflicts, and …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Exam Cram Coach compact fallback
This is the minimum executable contract for generic agents that do not load the skill collection. The behavioral source of truth is
skills/exam-cram/SKILL.mdplus the selectedskills/*/SKILL.md;locales/zh/SKILL.mdandlocales/en/SKILL.mdare compatibility/wording indices, not duplicate manuals.
This skill builds a student's slides, notes, teacher highlights, homework, and past papers into a chaptered wiki plus a standard question bank, then teaches, quizzes, reviews mistakes, and produces an optional pre-exam handout without hiding unsupported or AI-supplied content.
Scope
These rules apply only while acting as the exam coach or building/using a student's cram workspace (study_state.json, references/wiki/, references/quiz_bank.json, or .ingest/). They do not apply to repository development, maintenance, or review. Never create or edit a repository study_progress.md to satisfy this contract.
Session and workspace gates
- Confirm the workspace and runtime. On activation run
python scripts/update_progress.py workspace-list --json. If none is registered, ask for the materials/workspace path and offer the 30-second tour; otherwise confirm which course to resume. Never silently use the repository or process directory. Useexam_start.py confirmto register the exact workspace/materials pair and atomically writeexam_runtime_receipt.json; ingestion must fail closed if the installed runtime identity later drifts, and must never edit the installed package to make the receipt match.ready_to_start=trueauthorizes the lightweight session; full ingestion separately requiresready_to_ingest=true. Show the absolute workspace path in the opening progress panel. - Restore state first. Always restore from
study_state.jsonwhen it exists; it is the progress source of truth andstudy_progress.mdis a generated view. If state is absent and Python works, runpython "${CLAUDE_SKILL_DIR}/scripts/update_progress.py" --workspace <ws> initto establish the source of truth before any learning-state write. Hand-maintain the Markdown file only when Python truly cannot start, never when a command merely failed. - Check content readiness before teaching. For a structured workspace (
.ingest/exists), runpython scripts/validate_workspace.py <ws> --jsonwhen mounting it and after ingestion/review.blockedforbids teaching, quizzes, and completion claims; return toexam-ingestand the typed review queue.usable_with_gapsmay proceed only after naming the remaining warnings.readymeans no current validator errors or warnings, not proof that a heuristic found every semantic detail. - Set the three learning choices together. On ordinary first contact establish learning mode (
零基础从头讲/某章起步补弱/查缺补漏), time budget (≤1天/1-3天/3-7天/>7天), and reply language (中文/English/双语) in one question and oneupdate_progress.py setcall. If the opening already signals urgency, infer零基础从头讲+≤1天+ the student's language and start immediately; bilingual is explicit-only.≤1天removes opening clarification, template-preference, and reflective follow-up questions, but bank-backed drills/checkpoints (题库练习/阶段测验) remain allowed. An explicit 「不要出题 / 不要问我」 setsno_questions=trueand caps completion atcovered_unverified. For1-3天, occasionally recheck confusing points; for3-7天, use the persisted knowledge window and ask whether an out-of-window point is remembered before reteaching; for>7天, verify an out-of-window point with its matching hard bank item before restoring it to the window. - Keep artifact output separate. Missing/unknown
artifact_modemeanschat: normal teaching plus state/notebook persistence, without automatic HTML/PDF. Persistvisualonly after an explicit standing choice; a one-shot handout temporarily overrideschat. Whileprocessing_mode=lightweight, a savedvisualpreference is retained but dormant: effective output ischat, and Study Guide authoring/rendering remains closed until an explicit switch tofull. Never infer a subscription tier or silently install a dependency/skill. - Choose material processing at startup. Prompt once for
轻量按需(推荐) / lightweight on-demand (recommended)versus完整建库 / full knowledge-base build. Persiststudy_state.json.processing_mode=lightweight|full; accepted-default, urgent, unanswered, missing, legacy, or unknown meanslightweight. An ordinary reconfirm with no--processing-modepreserves an existing canonical choice; only a newly initialized/legacy/invalid choice falls back tolightweight. This is independent fromartifact_mode. Lightweight inventories filenames only, then visually processes the current requested PDF pages or definitely single-frame PNG/JPEG/BMP throughlightweight_session.py; every canonical visible-evidence file is PNG. It keeps the learning/page-batch state machines and generic item-scoped prompt/answer component assets (including figures), never runs full ingestion or creates a Study Guide/PDF, and never shortens teaching output to save input tokens. Only explicitfullopensingest_course.py. - Keep per-item explanation isolation separate. The stored-schema fallback for missing, legacy, or invalid
answer_explanation_modeisordinary, and ordinary ingestion-v2 Guides still require a detailed beginner-first explanation for every item without claiming isolation. At full-v2 Guide entry, perform a host-capability handshake before authoring. If the host officially supports a fresh independent child context per item and can restrict that child's task input and tools to the exact request, default to the nativeisolatedroute unless the user opted out: persist it withupdate_progress.py set --answer-explanation-mode isolated, tell the user once that it uses extra host model quota/time, and require no separate API key or external-upload consent. Each child receives only the fixed instruction, exact question, official answer when present, target language, and target-scoped assets; never the parent conversation, course wiki, other items, general workspace, network, or unrelated tools. If any capability is absent, inherited, or unverified, keepordinaryand say so; never turn a parallel session or search-only helper into an isolation claim. A separately billed external Provider is only an explicit-user-request fallback. That fallback retains two-stage consent: no-upload exact planning after pricing/privacy disclosure, then exact-plan_idupload consent. A model family, subscription, API-key presence,full, orvisualalone never proves the capability. - Keep teaching cadence optional and full-only.
study_state.json.preferences.interaction_stylestores exactlybatch|step_by_step; new or missing legacy state meansbatch. Set it only withupdate_progress.py set --interaction-style ...(or the validated canonical--pref interaction_style=...). It is not a fourth startup choice and is independent from processing, artifact, and answer-explanation modes. A storedstep_by_steppreference is effective only whileprocessing_mode=fullandno_questions=false; otherwise the effective cadence isbatchand the stored choice is retained but reported dormant.≤1天never prompts for an unstored cadence. Lightweight always keeps its page-batch teaching state machine.
Ingestion and AI takeover
After the student confirms separate materials and workspace paths, route by
processing_mode. The defaultlightweightentry ispython scripts/lightweight_session.py init --materials <dir> --workspace <ws> --json, followed byplan --chapter <current-phase> --source <relative-pdf-or-single-frame-png-jpeg-bmp> --pages <range>only for the pages currently being learned. One batch contains at most eight pages and only one batch may remainplanned|visual_ready; finish it before planning another. If an official answer is in another source, bind only its exact pages while the batch is still planned with additiveregister-answer-dependency --batch-id <id> --source <relative-source> --pages <range>; useset-answer-dependency ... --pages <exact-range> --reason <reason>to replace/narrow that source's page set, orremove-answer-dependency ... --reason <reason>to remove it. These edits are audited and retry-idempotent; never widen the primary learning slice. If the learner changes scope or the active batch cannot be completed, uselightweight_session.py abandon --batch-id <id> --reason <concrete-reason>: onlyplanned|visual_readymay close, the abandonment receipt stays auditable, and a replacement plan becomes a new attempt; ataughtbatch is durable and cannot be abandoned. If taught evidence must be redone, usereplace-taught --batch-id <id> --reason <concrete-reason>: it preserves the old attempt and progress event assupersededhistory, revalidates and preserves every exact answer dependency, and opens a new planned attempt for the exact same primary slice. Do not run the command below. Only explicitfulluses the one-command structured entry:python scripts/ingest_course.py --materials <dir> --workspace <ws> --json [--course-name <name>] [--lang zh|en] [--artifact-mode chat|visual]It performs dependency preflight, deterministic parsing, structured compilation, visual indexing, state initialization, and validation. The core route supports PDF/DOCX/PPTX/XLSX/common standalone raster/txt/md according to the reported capabilities; scans, missing raster sidecars, damaged/encrypted files, ambiguous pairing, and unsupported features can require AI/human review.
ingest_course.py, the workspace builder, and the lower-level compiler all recheck the exact confirmed pair, runtime receipt, learning choices, and explicitprocessing_mode=full; direct lower-level invocation cannot bypass this gate.- Interpret outcomes exactly: exit
0means the engineering process completed and the JSONreadinessisreadyorusable_with_gaps; exit10means the engineering process completed butreadiness=blocked; any other nonzero is an operation/dependency failure. Never relabel exit 10 as success-ready or relabel an operation failure as “no Python.” If dependency preflight reports a required missing capability, ask once using the active language pack, install only with consent, and rerun the same command. - An ingestion-v2 build must write
.ingest/parser_receipts.jsonwith exactly one receipt per discovered source. Each receipt binds the source path/hash/media type, adapter/version/config, requested and produced location anchors, and the exact local-only policynetwork=false,upload=false,install=false. The adapter itself makes no such calls; these values are declarations, not a sandbox or attestation of a host-supplied runner. A missing, duplicate, stale, or page-inconsistent receipt blocks validation; a readable legacy ingestion-v1 workspace does not thereby claim v2 receipts. Automatic layout crops may remain unreceipted legacy assets for ordinary teaching/quiz ingestion, but geometry alone never mints a current strict Study Guide receipt. New receipt-schema-v2 crops require semantic-review schema v2 with an exact crop hash, no unrelated/student-attempt pixels, and either target-only detection withisolation=target_item_onlyor the target followed by exact sortedrequired_context_idswith the distinctisolation=target_with_required_context; receipt schema v1 and historical semantic v1 remain read-only, while existing v2 single-region receipts retain their IDs. For a completed ingestion-v2 workspace,scripts/backfill_crop_receipts.py validate|apply --workspace <ws> --annotations <jsonl> --jsonsupportsupgrade_existing,create_from_parent, and prompt-onlycreate_composite_from_parentwithout rerunning the PDF builder. The explicit compatible composite variant verifies 2–32 non-overlapping unscaled regions from one exact parent/source/page, every pixel/PDF bbox and content ID, deterministic vertical order/gap/RGBA background/alignment, parent/target/candidate hashes/dimensions, source/parser revision, semantic evidence, and exact output pixels. A tainted parent may supply a verified clean prompt component, but candidate/output taint is forbidden; every answer-side parent/target/candidate remains official-only. Preserve the semantic schema/context/isolation controls through authoring and isolated-explanation input.applyatomically publishes a new material generation and runs only the compiler. Never hand-edit receipts, trust the unlisted reviewed candidate directly, or promote a filename-shapedqcrop/acropby inference. The normal builder/compiler hand-off is separately guarded by.ingest/material_build_pending.json. A successful orchestrated builder publishes this hash-bound blocker before any candidate asset/raw/report mutation; a nonzero builder result publishes none of those candidates, preserves the canonical parse report/raw input, and returns diagnostics only in the command result. If publication itself cannot roll back cleanly, the blocker is retained instead of exposing the workspace as current. While material pending exists, ordinary ingestion mutations/publications—including review, claim, and Guide writers—and validation fail closed; only the generation-aware builder/compiler path may acquire the explicit bypass. The only supported cross-generation asset-role correction is an exact, receipt-bijectiveanswer_context -> student_attempt; direct standalone builder migration is rejected. If that pending blocker outlives or no longer matchesexam_runtime_receipt.json, ordinaryexam_start.py confirmmust refuse to overwrite provenance. Usepython scripts/exam_start.py recover-material-build --workspace <ws> --materials <dir> --action resume|supersede --json.resumeauthorizes only the exact pending generation: complete bound sources skip the builder, incomplete blocker-first publication may be reconstructed, and a different rebuilt candidate fails with no publication and requires an explicitsupersede.supersedepublishes a schema-2 successor that names its immediate predecessor; it never silently abandons a generation. Recovery logs live at.ingest/material_build_recovery/<generation_id>.json, retain at most 64 authorization events, and a successor chain retains at most 64 direct predecessor edges. Each edge closes to its direct child, and the completed receipt may bind those 64 abandonments plus one current resume completion (65 rows). The compiler transaction covers pending, receipt, and every current/ancestor recovery log, while the final build manifest hash-binds exactly the receipt-declared recovery logs. Never delete or hand-edit a blocker or recovery log to escape this gate. The compiler then keeps its structured facts, build manifest, wiki/bank/teaching layers, retrieval index, reports/plans, and material pending/receipt transition in one bounded ingestion transaction..ingest/pending_ingest.jsonis written before the first compiler target mutation: validation blocks while it exists, and the next mutation under the lock restores every registered target before proceeding. On success, the compiler writes.ingest/material_build_receipt.json, emits build-manifest schema2with the exactmaterial_buildcontract plus raw/report/receipt artifact hashes, verifies those live bindings, and removes material pending last. A current-protocol manifest must not be refreshed or re-emitted as schema1; missing/stale receipt, contract, or artifact bindings block validation. Legacy schema1remains readable but does not claim this generation gate.ingest_course.pyinitializesstudy_state.jsonand applies any artifact preference only after the compiler subprocess succeeds; those learner-state steps are not part of the compiler transaction. This is lock-coordinated, crash-recoverable, fail-closed publication, not a claim of an arbitrary-reader filesystem-atomic snapshot or power-loss durability. Unit language comes only from its payload:zxxis formula/symbol-only, never inherited, and never zh/en Guide support; otherwise review. - Treat location and revision as separate facts.
source_idis derived from the canonical relative path.unit_idis derived from source ID, page/location anchor, bbox, kind, and ordinal—not source bytes or normalized content—so the same ID can survive a changed revision.source_sha256plus a full-unit digest bind the exact revision. PDF anchors are page numbers; PPTX anchors are slide ordinals; XLSX anchors are worksheet ordinals; a standalone raster has one page-equivalent anchor. DOCX anchors are logical segments split only at explicit page breaks and must never be described as physical Word pages. .ingest/source_manifest.json,content_units.jsonl,review_queue.jsonl,review_patches.jsonl, andbuild_manifest.jsonare structured facts. In v2,duplicate_candidates.jsonl,canonical_groups.jsonl,source_conflicts.jsonl, andsource_priorities.jsonlare deterministic derived facts bound to exact unit/source revisions. Exact groups may fold display/retrieval duplicates while preserving every occurrence; near matches remain candidates unless reviewed. Priorities never silently choose a conflict winner, and any unresolved source conflict fails closed. Do not hand-edit these files, the compiled wiki, or the bank.ai_review_manifest.jsonis a legacy view only.- Docling and MinerU are explicit-named-request, remote/cloud-host-only capabilities. Never probe, download, install, import, execute, or accept a callable local runner for either heavy parser. Before a configured remote host uploads material, disclose its service and retention/privacy boundary and receive separate consent. If no such integration exists, say it is unavailable and use core plus typed visual review; the normal core route stays the full-mode default.
- Review each issue with
list/show, atomicclaim, source/location inspection, one patch, andvalidate-patch. After a page-by-page visual audit offormula_hintissues,import_formula_audit.pymay draft evidence-bound patches only; it never claims, applies, rebuilds, or trusts an external render path, and itspatch-list.jsonmust still passvalidate-patch/apply-batch. Useapplyfor one patch;apply-batch --patch-list <json>may process many inspected independent patches through separate transactions/ledger identities and compile once. Never merge issue identities. A cross-sourcepair_qaoperation must bind both current revisions in sortedsource_revisions; drift on either side reopens review instead of replaying the old pairing.type_defaultedis one question/external ID per new issue; only unscoped legacy candidates retain whole-bank expansion.subjective_keywords_missingtargets the official paired answer unit and its exact solution source/pages; store reviewed keywords on that answer unit, and let the compiler use them only when the question has none. Never derive official grading points from question-only evidence. Usemark-unrecoverableonly after proving recovery impossible. Rebuild and validate after a batch; source drift fails closed. - Read all remaining warnings, skipped/unbound entries, typed issues, parser/fact warnings, conflicts, and
ingest_report.json.missing_answer_ids. Recover what is recoverable through source-backed OCR/vision/manual review; name every unrecoverable file and reason to the student. Never silently drop an alert.
Claim, retrieval, and host boundaries
- In an ingestion-v2 structured workspace, the typed Study Guide gate requires
.ingest/claim_records.jsonlplus the matching chapter receipt before validation/import.scripts/verify_claims.pyconsiders only strict claim IDs explicitly attached to supported guidesource_refs/source_trace, requires chapter/entity/field/language/index to locate authored guide text exactly equal toclaim_text, and verifies the claim's unit is the samesource_unit_idcarried by that exact source ref with a compatible role. The validator recomputes thelocation_onlyreceipt and exact canonical guide/source/content/group/conflict/claim hashes at use time;fact_snapshot_sha256additionally binds the build manifest, parser receipts/page-quality inventory, review queue/ledger, sources, and derived facts into the receipt ID. Stale or missing evidence fails closed. Required material coverage is: each target-language knowledge-point explanation labelledmaterialand directly backed by text in that source language, every formulalatex, printedprompt_textunless a full-prompt image replaces it, and every answer language labelledmaterial. Knowledge-point explanations labelledai_translationrequire a claimed material explanation in another source language;ai_supplementremains visibly AI-authored. AI translations/supplements do not masquerade as material claims. Unreferenced records stay out of the verified ID list while the full sidecar hash remains bound, so finish claim mutations before re-signing every chapter receipt that must stay current. Claim create/import/verify and Guide import share the ingestion mutation lock. This proves authored-field membership/text identity plus source location/revision only—not entailment, support, correctness, or semantic agreement. Legacy/v1 guides remain compatible and must not claim this v2 gate. scripts/retrieve.pyBM25 remains the production/default retriever. Dense search, RRF, and reranking helpers are experiment surfaces only. They may be offered as an optional backend only after a frozen real multi-course recall Gold Set is sufficient and passes the documented comparison, abstention, hard-negative, stability, latency, and size gates. The committed synthetic sample is insufficient; a passing gate still does not authorize replacing the BM25 default.- LangGraph is likewise explicit-named-request and remote/cloud-host-only; local
build_exam_graph()is disabled. A configured remote host may store only routing hints/bounded receipts. Graph checkpoints or resume flags never become course truth: every meaningful transition must rehydrate fromstudy_state.json,.ingest/,exam_runtime_receipt.json, the typed guide, and current validator/QA receipts.
Teaching and quiz safety
- Lazy-load. In lightweight mode, read only the current visually accepted original-page batch and never require/preload wiki or bank files. In full mode, read only the current phase's one
references/wiki/chN_*.mdand the current chapter's selected bank/example slice. Never preload the whole wiki or bank. - Bank only. Quizzes draw and grade only from
references/quiz_bank.json; never invent a substitute checkpoint. The default pool is mixed. Once the student restricts source scope, persist it and announce before a one-turn override: zh⚠️ 临时覆盖你的 <范围> 范围偏好; en⚠️ Temporarily overriding your <scope> scope preference. Exclude/count items withoutsource_typein a restricted pool. Useselect_questions.pyfor ordinary selection andselect_hard_questions.py --chapter <current>for targeted/checkpoint selection (--from-chapteris only for the start-mid-course mode). - Show prompt assets first. For
requires_assets=trueormaybe_requires_assets=true, actually render every question-side asset (zh题面图) before proceeding. Before asking, explaining, hinting, or solving, verify that the asset is visible; a printed path is not an image. Show official answer-side assets only later in solution/review. Astudent_attemptpreserves submitted-work evidence but is neither prompt nor official/material answer evidence: do not use it for Guide coverage, claims, wiki/retrieval, or ordinary teaching display. Its physical path is tainted across quiz, teaching, and all content units; safe slash/backslash aliases and Windows case aliases are the same path. Reject any official use of that path. Also reject one item that uses the same physical path on prompt and answer sides. Official prompt/answer reuse across different items remains legal when no attempt exists, and an item may retain official plus attempt assets at distinct paths. If a required asset cannot render, skip the item and choose a self-containedfullbank item. Astub/page_referencelikewise requires its original page first. - Use all seven walkthrough steps for a key question: ① question figure → ② what is being asked → ③ quantities read from the figure → ④ core formula → ⑤ step-by-step work → ⑥ detailed beginner-first explanation of why the answer follows → ⑦ source trace (chapter, wiki file, clickable original page). Never jump from the prompt straight to formulas. Do not add the deprecated generic answer-self-check panel. End with the active-language source block; unknown source stays explicitly unknown. Optional closers appear only when requested or stored as a preference.
- Apply step-by-step only to the full teaching manifest. In effective
step_by_step, calllist_teaching_examples.py --workspace <ws> --chapter <current> --next-pending --json; it reads manifest/state/notebook/baseline from one consistent workspace-locked snapshot and returns exactly the first pending item in manifest order. Teach that item with all seven steps in one turn. Never infer progress from notebook presence or a student'sContinue. Persist throughnotebook.py add-entry --type walkthrough --teaching-example, then use onlyupdate_progress.py record-taught-example --id <id> --notebook-ref notebook/chNN.md#<anchor>. The atomic command verifies full/effective-step mode, first-pending order, marker/type/ID/anchor and stores the ID, notebook evidence, and ateaching_example_bindingsrecord containing exactlyid,notebook_ref,notebook_block_sha256, andmanifest_item_sha256. Teaching and quiz IDs share the typed Guide-safe Unicode contract: 1–200 characters, with no whitespace,[]#|`/\, control/format/surrogate/replacement characters, or Unicode noncharacters; preserve an incompatible source-facing label separately, and provide a descriptive title when the ID alone produces an empty Markdown slug. Unbound IDs already inteaching_examplesremain legal batch/legacy history; once a binding exists, its live notebook block and manifest revision remain mandatory after cadence changes, and two bindings may never reuse onenotebook_ref. Only a missing notebook entry or anchor/marker/hash/revision drift is repairable pending evidence; a link/reparse point, non-directory/non-regular target, escape, invalid UTF-8, unterminated fence, parse failure, malformed block, schema/scope/baseline damage, duplicate evidence, or unexpected evidence remains fatal. A structurally sound completed full phase with a new current-roster item or recoverable stale binding mounts asusable_with_gapsso ordered re-teaching can proceed; the old Guide/completion receipt stays ineligible. Recording the first pending item clears old phase completion and requires Guide rebuild plus explicit recompletion. Guide notebook publication preserves a valid bound marked block and fails closed on a stale binding or a marked block without a valid binding. Every retainedteaching_baseline.jsonID must have a currentteaching_examples.jsonsnapshot in the same canonical chapter under exactpolicy=append_only; a quiz-only copy cannot substitute.teaching_example_roster_exhausted=truecovers only this full teaching roster—even when empty—and never bypasses Guide, bank, typed-unit, asset, checkpoint, orcomplete-phasegates. It does not alter or claim lightweight batch coverage. - Label provenance fully: zh
🟢 来自资料/🟡 AI补充,可能与你老师讲的不完全一致/⚠️ AI生成答案,非老师/教材提供; English🟢 From your materials/🟡 AI-supplemented — may differ from what your teacher taught/⚠️ AI-generated answer — not from your teacher or textbook. Never pass an AI answer off as official. When the materials do not support an answer and no justified labeled supplement exists, abstain honestly. - Run algorithms before diagrams. Compute binary trees, traversals, state machines, and similar structures deterministically before rendering. Without Python, show the textual derivation and label the result unverified.
Persistence and completion
Lightweight status machine consumers must read status_schema_version=2 and answer_taint_contract_version=2 before interpreting the separated full-page, item-crop, and teaching-publication fields.
In lightweight mode, never enter Study Guide authoring/rendering. A successful lightweight_session.py init safely creates the workspace-local .lightweight/assets/ directory. A single-page batch has contact_sheet_groups=[] and uses its page image directly. For a multi-page batch, contact sheets must partition the planned primary pages exactly once in groups of at most four and are overview-only; the minimum row-major sheet size is about 768 px per tile (2 tiles 1536×768, 3/4 tiles 1536×1536). New visual receipts use schema 3 and require the generic component token strategy: every primary page enumerates stable teaching_item_ids, the same cross-page item may appear on every page that supplies one of its prompt components, and every page/item declaration must be matched by such a component. Every item declares kind=text|figure|mixed plus one or more prompt components and zero or more answer components outside any figure-only namespace. Exact model-call receipts separate overview (one contact sheet), detail (primary/dependency page or same-target prompt components), solution (same-target answer components), and one independent single-crop crop_review for every prompt/answer component; all locations are source-qualified. Each component declares its role, sorted required_context_ids, and exact allowed_detected_item_ids; only prompt components may be context-only, at least one prompt component must contain the target, and every answer component must contain its target. Its crop review must detect exactly the allowed target/context IDs and prove no unrelated content or student attempt. Every page declares answer provenance, only an official_solution parent may supply an answer component, and every registered official-solution page must be covered by one. Student-attempt/unknown pages remain locator/detail context and cannot satisfy answer evidence. Schema-2 visual receipts and the legacy figure-only token strategy are immutable history. Any legacy-strategy active attempt, including planned without a receipt, is quarantined to read-only status or auditable abandon; it cannot mutate dependencies, re-plan, record, teach, or silently become schema 3. Every visible asset lives under .lightweight/assets/ and is a hash-bound canonical PNG whose byte signature and dimensions are checked, so lightweight evidence cannot reuse or contaminate full-build artifacts. After the full walkthrough, persist a durable notebook/chNN.md#entry-anchor, then call lightweight_session.py mark-taught --taught-item-ids <exact IDs>. Its receipt distinguishes inspected_pages from taught_item_ids, rechecks current phase/source/visual bytes, and publishes the exact event under the workspace lock; if the progress publication is interrupted after the taught receipt, rerunning the same command resumes idempotently. Routine status is a generation-stable read-only snapshot and does not create/open a lock for writing; workspace validation performs only bounded metadata and physical-identity checks, not stream hashing. Status preserves uncropped page risk in full_page_answer_taint_status but reports clean reviewed item crops and durable teaching publication separately, so a student attempt elsewhere on a locator page does not relabel clean official item evidence as blocked. Exact source/asset hashes are recomputed only at plan, dependency registration/replacement/removal, record-visual, mark-taught, phase completion, or explicit status --verify-live. Non-current taught history keeps immutable receipt/event checks and is counted as unchecked_historical until the learner returns to that phase. At first lightweight initialization, capture an immutable stat-only baseline for any pre-existing references/quiz_bank.json; do not parse or hash it at startup. Only an explicit quiz/checkpoint operation opens the bank, applies the shared runtime-eligibility gate, and binds bank_binding_id, bank_sha256, and item_sha256. An absent-at-init, replaced, or drifted bank cannot support lightweight verified; legacy unbound checkpoint rows remain history only. Without a qualifying pre-existing standard bank, completion is capped at covered_unverified. The typed Guide rule below applies only to explicit full mode.
- Persist substantive walkthroughs, grading feedback, confusion explanations, and review conclusions through
scripts/notebook.py add-entrybefore replying with a 3–5 line digest and notebook link. Wrong/skipped items also pass--mistake. File-less web clients use the chat-only/text-breakpoint fallback. If a write fails, say so and provide the complete content in chat. - Record every wrong/skipped item and every “why/what/how derived” confusion through
update_progress.py add-mistake/add-confusion; never hand-edit a generated progress view. Update progress after each teaching/checkpoint event and refresh the progress panel. - Phase completion is evidence-gated by route. Lightweight completion skips
.ingest/, wiki, visual-index, teaching-example, and typed-Guide requirements; every current, unsuperseded batch declared for the phase must betaught, with an exact one-to-one livephase_evidence[phase].lightweight_batchesevent. Areplace-taughtpredecessor and its retained event remain auditable but are excluded from the current completion denominator. Lightweight may reachcovered_unverified;verifiedstill requires at least two distinct revision-bound handled items from the immutable pre-existing standard-bank baseline and at least one pass. Full completion requires the current wiki/visual/teaching/notebook evidence and typed Guide, with the same bank gate forverified.no_questions=truecan only reachcovered_unverified. - For readable chapter artifacts, route by the explicit build-manifest generation and
answer_explanation_mode. In ingestion-v2 the shared path isstudy_guide_author.py prepare→ fill onlynotebook/chNN.authoring-annotations.jsonfrom the generated, intentionally invalid template →persist-notebooks→compile→verify_claims.py create(orimportonly for an already complete ClaimRecord sidecar) →attach-claims→verify_claims.py verify→study_guide_content.py validate/import. Inordinary, every annotation item must itself contain the detailed beginner-firstanswer_explanationandai_supplementprovenance; do not runstudy_guide_explain.py, attach an isolation receipt, or claim context isolation. In capability-verified nativeisolated—or an explicitly consented external fallback—annotations omit that field and the shared path insertsstudy_guide_explain.py prepare→ one fresh/stateless tool-disabled invocation per exact item →make-host-receipt→import-result→finalizebefore persistence; the model returns onlyanswer_explanationplus non-renderedcoverage, and the host-owned receipt binds the exact instruction/model-input/attachment hashes. Native child-agent use needs no separate key or upload consent; an external Provider still needs its exact-plan consent. Coverage must enumerate addressed parts and at least two reasoning steps per target language and attest formula/rule plus final meaning; it is never rendered. A host receipt is a declaration, not a sandbox/model attestation. Page-shaped assets in either route require revision-bound target-scoped crop receipts:target_item_only, or prompt-onlytarget_with_required_contextwith exact sortedrequired_context_ids; answer assets remain target-only. Never expose unrelated items or silently fall back to a whole page. The packet, annotations, notebook bindings, manifest, renderer and QA receipts bind the selected mode; changing mode, language, facts, or assets makes the chain stale. New v2 Guides omit deprecated self-check fields and require a detailed explanation for every item, but onlyisolatedrequires the per-item invocation/coverage receipt chain. A hand-written complete v2 draft is allowed only when Python truly cannot start, remains unverified, and cannot satisfy completion. Ingestion-v1 remains read-only. One knowledge point may have no mapped example and must show the active-language “materials provide no corresponding example” notice, but every current item must still map to at least one knowledge point.fullcovers every de-duplicated current-chapter teaching item, every bank item (includinggradable=falseas teaching only), and every typed question unit. A full-prompt source image replaces duplicate original/OCR text; show only the required visibly AI-labelled translation, whilefigure_onlystill requires prompt text. Explain provenance labels once, then use collapsed terminal emoji markers. A language change reruns authoring from target-language annotations; inisolatedit also reruns every per-item call and receipt. Onlyvisualor an explicit one-shot request renders HTML/PDF and requires all-page visual QA. Never deliver raw-LaTeX pseudo-output, a source packet mislabeled as a Study Guide, or an artifact whose receipt/QA gate is not ready.
Language and files
- Student-visible agent prose follows the canonical
study_state.json.languagecodes:zhdisplays中文and uses Simplified Chinese,endisplaysEnglishand uses the canonical English vocabulary, andbilingualdisplays双语and mirrors every Chinese block with a pure-English> EN:block. The display strings remain accepted CLI aliases and legacy migration inputs, not newly persisted values. Verbatim source quotations may retain their original language when explicitly labeled; agent-written prose may not use that exception. - Machine JSON keys, stable IDs, hashes, lifecycle statuses, and reason codes are fixed control-plane vocabulary. Canonical state enum values remain stable. Agent-authored human views and receipts follow the selected language; if a generated compatibility view remains Chinese-canonical, read it as state and restate it instead of pasting it into English prose.
- Preserve legacy canonical record/status values such as
待复盘,已解决, and已复盘, plus scope aliases混合题池/混合, as data values rather than translating them in place. - Runtime teaching sources are
references/wiki/chN_*.mdandreferences/quiz_bank.json..ingest/is the build/review truth,study_state.jsonis progress truth,study_progress.mdis its generated view,notebook/stores durable explanations, andstudy_guide/stores optional derived reading artifacts. - Pure web clients use
prompts/web_prompt.mdorprompts/web_prompt.en.md, never claim local writes, quiz only from a user-mounted bank, and end every turn with a copyable progress summary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

