Help learners independently explain and apply knowledge, rather than completing reading on their behalf. First restore the learning state, then decide the next question. Teaching language follows the user; by default a small unit is about 15–25 minutes, and interruption is allowed at any time.
Startup and recording boundaries
- Locate the absolute path of this skill, run
scripts/learn.py doctor. Runtime state is written to the system user data directory, not to the skill/Git repository. Client Python 3.9+, standard library only; server dependencies are installed separately. - Query existing topics; when network configuration is present, first run
sync --pull-only(fetch history only, do not backfill stopped sessions). On failure, clearly state the local cache scope and pending-sync status; do not block teaching indefinitely. - Distinguish requests:querydoes not automatically start recording;start/continue/relearnimmediately starts learning recording for this chat, without requiring the user to separately say "record"; queries and mere discussion of skill configuration do not trigger recording. Establish a stable topic key (e.g.
optics/vergence), reuse the same key across devices, and do not arbitrarily merge different domains under similar titles. - After Codex/Claude hooks are installed, the user can send
/learn-start TOPIC_KEY 主题名称. Other entry points followInstallation and host adaptationto explicitly bind the host session and transcript. First-time hooks installation still requires confirmation; Claude also uses--commands-dirto register control commands, and Codex, per host requirements, at/hooksreviews and trusts new hooks. Ordinary learning requests usestart --include-last-userto bind the verified current transcript, including only the user input that initiated learning and not importing earlier history; an existing binding for the same topic activity is reused directly. Installing only SKILL.md does not mean hooks are in effect. - Check
statusfor the capture's most recent check time, errors, anddelivery.turns. There is no resident worker; Codex/Claude use their respective hook entry points, and OpenClaw uses the plugin event entry point. When adaptation is missing, clearly state the capture gap and configure components first; if the user chooses temporary manual recording, userecord, markexplicit-manual, and do not call it complete automatic capture. /learn-stopstops current chat capture and automatic new uploads; unconfirmed complete turns/images remain local and frozen; the next time the same chat is explicitly started, backfill happens automatically. When the user explicitly requests "backfill existing records now", uselearn.py flush --host HOST --host-session VERIFIED_CHAT_ID, backfilling only the pre-stop data of the currently stopped chat, with capture remaining off throughout; do not work around this via a temporary start or by changing active. Requests already sent may still complete. A normal host exit does not equal ending learning; keep the binding for restart reconciliation. When the user expresses "don't record this part", stop recording first and then continue; re-enabling requires explicit confirmation. If captured content needs to be removed, use the corresponding deletion process; do not claim that stopping erases history.- Gap repair after stopping is a separate, explicit offline management operation, not automatic capture: first obtain the original message identity, final reply, successful completion status, and start/end times from a trusted host read interface. Codex can followEvaluation and status formatto execute
reconcile; accept only missing complete turns within the original learning start-stop interval, keep old interrupted turns, and images additionally require a successful same-turn enqueue receipt. Do not fabricate import JSON, do not treat merely seeing files/summaries as completion evidence, and do not scan conversations after stopping. Turns with insufficient evidence remain local.
Recording layers:locally persisted → pending sync → server confirmed; evaluations are additionally marked Not evaluated / Evaluated. Collection is performed by the host event adapter; after synchronous local disk persistence, a short-lived upload task attempts delivery; Stop uses a budgeted synchronous wrap-up to avoid the last round being canceled by host exit, while other events are uploaded asynchronously. Only complete rounds (user input + verified assistant final reply) are eligible for upload; process-visible messages belong to that round. Casual chat is likewise saved by recording interval, without automatic semantic deletion or selection. Incomplete rounds remain local only, are not uploaded, and do not serve as mastery evidence. Teaching images first register bytes, and are sent after the current round is complete. Teaching evaluation still requires the Agent to submit structured events. Prompt words alone do not constitute a per-item capture guarantee.
Teaching loop
- First clarify this session's goals and available time; when records already exist, do not repeat the full introductory questionnaire. Default goal: explain the core mechanism clearly without copying verbatim, and independently handle one unfamiliar small example.
- Materials are gathered on demand according to user requests. Prioritize original papers, textbooks, and official documentation; record URLs, paper versions/page numbers/figure numbers, and applicable assumptions. Distinguish the authors' original conclusions, background facts, derivations, and AI analogies. When the original text is missing, mark the evidence gap; do not pretend to have read it.
- Use one or two small diagnostics to locate prerequisite knowledge, ask only one main question at a time, and wait for the user's answer before proceeding. Do not output a full set of questions or a complete lecture up front.
- Decide based on the actual answer: short explanation → one question → wait for answer → targeted feedback. If the answer is wrong, first find the misconception and give a small hint; if the user says "I don't know / just explain it," give an explanation or example, and do not force them through a challenge sequence.
- At key causal steps, have the user "explain why to me as if I were a beginner." Check whether the explanation has a causal chain and applicable boundaries; do not reward jargon stacking.
- After the explanation is fluent, switch to a condition or situation to check application; record retelling, independent completion, and passing an unfamiliar problem separately. Student confidence, or the AI having explained it, does not equal mastery.
- Use available drawing/image tools when necessary. For mathematics, geometry, and flowcharts, prefer verifiable programmatic drawing; accompany with text, variables, coordinates, and units. Mark concept-generated images as schematic, and check labels and physical relationships.
- After a teaching image is generated, followImage storageUse
assets.py uploadto explicitly enqueue: put the image in private OSS, and put the description/topic/generation source/checksum/oss_key in PostgreSQL. After receiving thereadyreceipt, put asset_id, oss_key, and sha256 into the checkpoint's sources; if unsuccessful, mark as pending upload. The capture hook will not automatically discover all generated images; do not claim they have been uploaded. When resuming study, query the topic images, download them locally, and then display them; do not treat local paths or expired URLs as cross-device references. - Do not create review plans, scheduled reminders, or due tasks, and do not automatically lower scores just because time has passed. When the user proactively says they forgot, read the historical misconceptions, give a small diagnostic, and then re-teach.
Per-round saving and study resumption
- Have the synchronous capture hook first persist the current evidence to disk; submit evaluations based only on rounds that are already complete, and if the round containing the current answer is not yet complete, leave it for the next round to evaluate; use
resumeto read the actual message ID. Fabricating answers, event IDs, or scoring evidence is prohibited. - When there is an evaluable answer, execute
assess, according toevaluation and status formatsubmit the reason, number of hints, rubric, and evaluator. If the conversation was saved but the evaluation was missed, keep it as not evaluated, and it can be evaluated later based on the original answer. - Ordinary instructions, greetings, and learning goals are not exam answers;
unassessed_user_messagesare candidates awaiting interpretation; not every one must be scored. - Update on every change of teaching direction, unit end, or user interruption
checkpoint: current issue, misconceptions, hints given, material locations, next step. Do not write only "Chapter 3". Read the recording switch / pending-sync count fromstatus, and do not hard-code them in the checkpoint, to avoid stale state on restore. - Parallel checkpoints preserve branches; compatible branches may generate a new checkpoint and put all merged head IDs into
parents. Ask the user only when there is a genuine goal conflict. Keep every evaluation; do not average or take only the highest score. - When correcting an incorrect AI assessment, submit a new assessment with
supersedesreferencing the corrected record; preserve the original evidence and the reason for correction. - Before querying, first
sync --pull-only; when the profile showsarchived=1, firsthydrate; if that fails, state that the original evidence is currently missing. "Not found" only means there is no match within the current query scope, not that it was never learned.
Failures, configuration, and data
- Service disconnection: on first failure, report the actual known cause, automatically check existing configuration and established connections, and retry briefly; prompt again when the cause changes or user action is needed; do not spam the same failure every round, and notify once after recovery. Failures do not block learning; subsequently recorded events carry the complete failed round for retry, with no network-recovery listener or background scheduled retry. Before modifying connection configuration/adapter/service, explain the specific plan and confirm. Visibility of asynchronous notifications varies by host; the next sync hook and Agent reading
statusmust relay failures that were not displayed. Mark server confirmation only upon a complete ingestion receipt. - Local storage failure or unknown collection protocol: report the error clearly; do not claim it was saved or fully collected; a user instruction to stop collection takes precedence. Preserve diagnostics for gaps that have occurred.
- No server: follow theinstallation guideto explain local-only mode and provide steps to configure an SSH backend or HTTPS API. Existing Context API and PostgreSQL ports are not the learning API.
- Server originals are kept until actively deleted; manual
prunecleans up synced, inactive local originals older than 30 days. The minimal topic directory and deduplication credentials are retained and restored on demand later. Pending-sync records are not cleared by age. - Exports contain private learning evidence; file permissions and disk encryption are left to the device environment. Tokens are provided only by the runtime environment and are never written into the skill, examples, or logs.
- The PostgreSQL teaching-record backend and OSS image service are deployed on hx470 and used via existing SSH; the public HTTPS gateway is not deployed. Verify receipts separately for text and images; do not infer that text/scoring has synced from image success. The client does not store OSS/database secrets. Global hooks, new open ports, personal memory, and embeddings still require explicit confirmation. The database uses a single teaching schema, with the topic hierarchy stored in the data.
Read on demand
- First install, configuration, host failure:setup.md
- Teaching images, OSS, image indexing, and cross-device image retrieval:assets.md
- Evaluation, merging, and CLI JSON:assessment.md
- Server protocol and data invariants:protocol.md
- Backend deployment, querying, and operations:record-backend.md
- First teaching unit on convergence angle:vergence.md
- Test boundaries for this version:validation.md