[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79QWAPGV4MWQXZD2DSXB3DY":3,"skill-same:01M79QWAPGV4MWQXZD2DSXB3DY":88},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":27,"install":28,"resources":41},"01M79QWAPGV4MWQXZD2DSXB3DY","vocab-anki",null,"KaedenMonroe\u002Fpkm-agent-os","KaedenMonroe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F190544785?v=4","01M79QTR659YW26QMXT75206XX","Kaeden Monroe","01M79QTR6W1TK5X9A91W9XTS9F",0,"MIT","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# vocab-anki\n\nPer-run pipeline: Todoist `#vocab` words → single-sense Anki `Vocabulary`\nnotes, each generating two cards — Production (definition → word) and\nRecognition (word → definition + example) — no masking involved. Standalone\nskill — shares no code, note type, or deck with `anki-flashcards` (NF-04).\nSpec: `AgentOS\u002Freference\u002Fplans\u002F2026-07-17-vocab-anki-pipeline.md`.\n\n**Trigger:** manual invocation (you say \"run vocab-anki\" \u002F \"push vocab\nwords\", or trigger the equivalent headless CLI call from a local cron per\nFR-10 — either way, this SKILL.md is what runs; there is no version of this\npipeline that runs without an AI turn, since sense generation is AI\nknowledge, not an API call — FR-11).\n\n**Decisions made with the user (2026-07-17, revised 2026-07-18, revised again\n2026-07-18, corrected 2026-07-18):**\n- Card template: **two directions**. Production (Word Class + Definition →\n  Word — the example sentence is dropped from the front entirely; it does\n  still appear on the back, unmasked, for review context) and Recognition\n  (Word → Word Class + Definition + Example Sentence, shown in full\u002F\n  unmasked — no leak risk since the word is already given on the front).\n  `maskWord`\u002F`escapeRegExp` and all masking logic were removed from\n  `vocab_push.js` — fields are pushed as plain text now, no transformation.\n  The note type moved from 2 fields (`Word`, `Senses` — a bundled HTML blob\n  of up to 4 senses) to 4 flat fields (`Word`, `Word Class`, `Definition`,\n  `Example Sentence`), one primary sense per word (no more multi-sense\n  bundling\u002Fmerge) — that part of the 2026-07-18 revision is unchanged.\n- **Correction (2026-07-18, later same day):** the note type is now a true\n  **Standard note type (`isCloze: false`)**, not Cloze. An earlier pass of\n  this revision assumed a Cloze-type note type could host plain templates\n  alongside cloze ones — that assumption was wrong and was disproved live:\n  Anki's own model validation rejects any template in a Cloze-type note type\n  that doesn't reference `{{cloze:...}}` on both front and back (\"Card\n  template N ... Expected to find '{{cloze:Text}}' or similar\"). Since\n  neither Production nor Recognition needs cloze semantics anymore, Standard\n  is the correct type. AnkiConnect has no way to change an existing model's\n  Cloze\u002FStandard flag or delete a model, so the fix required deleting the\n  old `Vocabulary` Cloze note type by hand in the Anki desktop app (Tools →\n  Manage Note Types → Vocabulary → Delete, which also removes its notes) and\n  letting `vocab_push.js` recreate it fresh as Standard on the next run — the\n  9 words that existed at the time were re-pushed using their already-stored\n  field data (no regeneration needed; this was a template\u002Fmodel bug, not a\n  content bug).\n- Backfill for future template edits: automatic as long as the model stays\n  Standard — `ensureDeckAndModel()` re-pushes `CARD_TEMPLATES` via\n  `updateModelTemplates` on every run when the model exists, and Standard\n  note types accept arbitrary template edits without Anki's cloze-filter\n  validation getting in the way.\n- One historical wrinkle (already resolved, kept for context): notes pushed\n  live under the earlier masked-Cloze revision had had literal\n  `{{c1::word}}` markup baked into their `Example Sentence` field data (not\n  just template-applied) — fixed via a one-time `cleanup_cloze_markup.js`\n  pass (run once against the live collection, then deleted, per convention)\n  before the Standard-type correction above made that whole approach moot\n  anyway. See `AgentOS\u002Freference\u002Fplans\u002F2026-07-17-vocab-anki-pipeline.md`'s\n  Revision sections for the full history.\n- FR-08 flag mechanism: **Todoist comment** on the task itself (task stays\n  open\u002Fincomplete).\n\n---\n\n## Step 1: Query Todoist for incomplete `#vocab` tasks (FR-01)\n\nUse your task-management connector (`AgentOS\u002Freference\u002Fharness_compat.md`).\nOn the Todoist MCP connector (Claude Code \u002F Cowork):\n\n```\nfind-tasks({ labels: [\"vocab\"], limit: 100 })\n```\n\nNo `projectId` — this must cover every project (FR-01). `find-tasks` returns\nactive (incomplete) tasks only, which is also the idempotency mechanism\n(NF-02): a task that was completed by a prior run's Step 5 won't reappear\nhere. Page with `cursor` if more than 100 tasks come back (unlikely in\npractice, but don't silently truncate).\n\nIf zero tasks come back, stop here — nothing to do.\n\n## Step 2: Validate word shape (FR-02 \u002F FR-08)\n\n`scripts\u002Flib\u002Fword_validate.js` exports `partitionTasks(tasks)` — pass it the\nStep 1 results shaped as `[{ id, content }]`; it returns\n`{ clean: [{id, word}], malformed: [{id, content, reason}] }`. It's a small\npure function (no I\u002FO), so drive it via a one-off `node -e` invocation\nagainst a temp JSON file, or a short throwaway script — either way, run it,\ndon't hand-check word shapes yourself.\n\nThis is a **shape** check only (single token, letters + internal\nhyphen\u002Fapostrophe) — it does not judge whether the word is spelled\ncorrectly or real. That judgment happens in Step 4, on your own knowledge.\n\nFor each `malformed` entry, per the chosen flag mechanism:\n\n```\nadd-comments({ comments: [{ taskId: id, content: \"vocab-anki: couldn't process — task content isn't a single clean word ('\u003Ccontent>'). Fix the task text and it'll be picked up next run.\" }] })\n```\n\nLeave the task open. Do not proceed to Step 3 for these words.\n\n## Step 3: Look up existing Anki notes (FR-09 context)\n\nBefore generating anything, check what's already in Anki for the `clean`\nword list — this is what lets Step 4 see prior context for a word instead of\nregenerating blind:\n\n```bash\nnode scripts\u002Fvocab_lookup.js \u002Fpath\u002Fto\u002Fwords.json\n```\n\nwhere `words.json` is a JSON array of the clean words (write it to a temp\npath first — e.g. `AgentOS\u002Fskills\u002Fvocab-anki\u002F_tmp_words.json`, gitignored\npattern, delete after use). Writes `vocab_lookup_report.json`:\n\n```json\n{\n  \"status\": \"ok\",\n  \"results\": [\n    { \"word\": \"goad\", \"exists\": true, \"noteId\": 111, \"wordClass\": \"noun\", \"definition\": \"a spiked stick used to drive cattle\", \"exampleSentence\": \"The herder carried a goad.\", \"duplicateNoteIds\": [] },\n    { \"word\": \"perspicacious\", \"exists\": false, \"noteId\": null, \"wordClass\": null, \"definition\": null, \"exampleSentence\": null, \"duplicateNoteIds\": [] }\n  ],\n  \"generated_at\": \"...\"\n}\n```\n\nIf `status: \"skipped\"` (AnkiConnect unreachable), **stop the whole run** —\nreport this to the user rather than proceeding without Anki (NF-01). No\nTodoist tasks are touched.\n\nIf any `duplicateNoteIds` is non-empty, flag it to the user in the run\nsummary — FR-09's one-note-per-word invariant has already been violated by\nsomething outside this pipeline; don't try to auto-resolve it.\n\n## Step 4: Generate the primary sense (FR-03 \u002F FR-04 \u002F FR-11, revised)\n\nFor each clean word, from your own knowledge (no external dictionary\u002FAPI —\nFR-11):\n\n1. Identify the single most common\u002Frelevant dictionary sense: part of speech\n   + definition + exactly one example sentence (FR-03 — the sense may not\n   lack an example). It's good practice for the example sentence to\n   literally use the headword (any inflection\u002Fcase is fine) since it's\n   shown verbatim on the Recognition card and on Production's back — but\n   this is no longer a hard technical requirement; Step 5 does no masking,\n   so there's nothing to leak.\n2. Check for an **informal\u002Fslang\u002Fcultural** usage (e.g. \"goad\" → egg on). If\n   it's more relevant\u002Fcommon than the literal dictionary sense for the\n   user's purposes, use it as the primary sense instead of the dictionary\n   one — only one sense is ever stored per note now (FR-04, revised; no more\n   multi-sense cap since there's no bundling).\n3. If `vocab_lookup_report.json` showed `exists: true` for this word, you may\n   leave the note as-is and skip it (nothing new to add) unless you have a\n   clearly better sense to offer. There's no multi-sense merge anymore — a\n   Step 5 update fully replaces the existing sense (FR-09, revised).\n4. If a word can't be resolved to any real sense at all (nonsense token,\n   unrecognizable, not actually a word despite passing the Step 2 shape\n   check), treat it like Step 2's malformed path: Todoist comment\n   (`vocab-anki: couldn't resolve \"\u003Cword>\" to a definition — check spelling`),\n   leave the task open, do not proceed to Step 5\u002F6 for this word (FR-08).\n5. Assemble the resolved entry as plain fields — no HTML wrapper:\n\n```json\n{ \"word\": \"goad\", \"wordClass\": \"noun\", \"definition\": \"a spiked stick used to drive cattle\", \"exampleSentence\": \"The herder carried a goad.\" }\n```\n\n## Step 5: Push to Anki (FR-05 \u002F FR-06 \u002F FR-09, revised)\n\nAssemble the resolved entries into a JSON array\n`[{ word, wordClass, definition, exampleSentence }]` — only words that made\nit through Steps 2 and 4 — write to a temp path, then:\n\n```bash\nnode scripts\u002Fvocab_push.js \u002Fpath\u002Fto\u002Fentries.json\n```\n\nThis auto-creates the `Vocabulary` deck and note type on first run if either\nis missing (FR-06) — fields `Word`\u002F`Word Class`\u002F`Definition`\u002F`Example\nSentence` unchanged, two card templates (`Production`, `Recognition` — see\ndecisions above). If the model already exists, it pushes template\u002Fstyling\nupdates instead, so template edits — including the addition of the\nRecognition template — take effect on re-runs for every existing note, not\njust newly-created ones.\n\nFields are pushed to Anki as plain text — no masking or other transform\nhappens at push time anymore.\n\nIt re-checks existence per word at push time (defends against staleness\nsince Step 3) and either `updateNoteFields` (existing note — full replace of\n`Word Class`\u002F`Definition`\u002F`Example Sentence`, not a merge) or `addNote` (new\nword), with `allowDuplicate: false` as a backstop duplicate guard on the\n`Word` field. Writes `vocab_push_report.json`:\n\n```json\n{\n  \"status\": \"ok\",\n  \"results\": [\n    { \"word\": \"goad\", \"status\": \"pushed\", \"noteId\": 999 },\n    { \"word\": \"perspicacious\", \"status\": \"updated\", \"noteId\": 111 }\n  ],\n  \"pushed\": 1, \"updated\": 1, \"failed\": 0,\n  \"warnings\": [],\n  \"generated_at\": \"...\"\n}\n```\n\nIf `status: \"skipped\"` here too, stop — same as Step 3.\n\nFor any `status: \"failed\"` result, surface the `warnings` entry to the user;\ndo **not** complete that word's Todoist task in Step 6.\n\n## Step 6: Complete Todoist tasks (FR-07)\n\nFor every word whose Step 5 result was `\"pushed\"` or `\"updated\"`, complete\nits source task:\n\n```\ncomplete-tasks({ ids: [\u003CtaskId>, ...] })\n```\n\nOnly after the Anki write succeeded — never complete a task pre-emptively\n(this is the idempotency backbone, NF-02, alongside Step 1's incomplete-only\nquery).\n\n## Step 7: Clean up + summarize\n\n- Delete any temp JSON files written in Steps 3\u002F5 (`_tmp_words.json`,\n  entries file) — scratch state, not meant to persist.\n- Report to the user: words pushed, words updated (refreshed), words flagged\n  (Step 2 malformed \u002F Step 4 unresolvable, with the Todoist comment already\n  left on each), and any `duplicateNoteIds` surfaced in Step 3.\n\n---\n\n## Files\n\n```\nscripts\u002Flib\u002Fanki.js            AnkiConnect client (standalone copy — NF-04)\nscripts\u002Flib\u002Fword_validate.js   FR-02 shape check (isCleanWord, partitionTasks)\nscripts\u002Fvocab_lookup.js        Step 3 — read-only existing-note lookup\nscripts\u002Fvocab_push.js          Step 5 — deck\u002Fmodel creation + addNote\u002FupdateNoteFields (Production + Recognition templates)\nscripts\u002Ftests\u002F                 node --test coverage for all of the above\n```\n\nRun tests from this directory: `node --test 'scripts\u002Ftests\u002F*.test.js'` (this\nsandbox's Node needs the glob form, not the bare directory form — see\n`package.json`).\n",{},"master","2b1259f0b2995e1eed2d3c4d3dd9adf0335a85b6","AgentOS\u002Fskills\u002Fvocab-anki","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os","https:\u002F\u002Fgithub.com\u002FKaedenMonroe","2026-07-27 03:37:51",{"source":7,"skillName":5,"commands":29,"prompt":39,"zipAvailable":40},[30,33,36],{"tool":31,"command":32},"npx","npx skills add KaedenMonroe\u002Fpkm-agent-os --skill vocab-anki",{"tool":34,"command":35},"bunx","bunx skills add KaedenMonroe\u002Fpkm-agent-os --skill vocab-anki",{"tool":37,"command":38},"pnpm","pnpm dlx skills add KaedenMonroe\u002Fpkm-agent-os --skill vocab-anki","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002FSKILL.md",true,[42,48,54,60,64,68,72,76,80,84],{"path":43,"resourceType":44,"resourceTypeDesc":45,"sizeBytes":46,"sourceHtmlUrl":47},".gitignore","OTHER","其他",48,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002F.gitignore",{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"package.json","REFERENCE","参考文档",308,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fpackage.json",{"path":55,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":58,"sourceHtmlUrl":59},"scripts\u002Flib\u002Fanki.js","SCRIPT","脚本",809,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Flib\u002Fanki.js",{"path":61,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":62,"sourceHtmlUrl":63},"scripts\u002Flib\u002Fword_validate.js",1292,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Flib\u002Fword_validate.js",{"path":65,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":66,"sourceHtmlUrl":67},"scripts\u002Ftests\u002Fanki.test.js",1531,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Ftests\u002Fanki.test.js",{"path":69,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":70,"sourceHtmlUrl":71},"scripts\u002Ftests\u002Fvocab_lookup.test.js",3543,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Ftests\u002Fvocab_lookup.test.js",{"path":73,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Ftests\u002Fvocab_push.test.js",6950,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Ftests\u002Fvocab_push.test.js",{"path":77,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Ftests\u002Fword_validate.test.js",2048,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Ftests\u002Fword_validate.test.js",{"path":81,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fvocab_lookup.js",3310,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Fvocab_lookup.js",{"path":85,"resourceType":56,"resourceTypeDesc":57,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fvocab_push.js",6859,"https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvocab-anki\u002Fscripts\u002Fvocab_push.js",[89,95,101,107,113,120],{"skillNo":90,"name":91,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":18},"01M79QW5V898C5THZ2KPFXKSN1","vault-maintenance","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fvault-maintenance\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M79QW2K0FFQTX8RW7GT15KZY","transcript-distillation","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Ftranscript-distillation\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":18},"01M79QVZXJ69XH1ZNQJ59VHD30","daily-log","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fdaily-log\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M79QVWWEHN5BZ963895VRR8M","capture-promotion","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Fskills\u002Fcapture-promotion\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":18},"01M79QVSJXDQYXSGBQE6MSH469","review","Clear due memory reviews with free recall — the two-minute habit that makes learning permanent. Use when reviews are due, or the user wants to review, practice, or \"do my engram reviews\".","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Flongform-practice\u002Fengram\u002Fskills\u002Freview\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":18},"01M79QVM3KNV7CNFFYC0X4TAZ2","learn","Learn any topic properly — first-principles curriculum, generation-first tutoring, verified free recall, FSRS scheduling. Use when the user wants to learn, understand, study, or continue studying something.","https:\u002F\u002Fgithub.com\u002FKaedenMonroe\u002Fpkm-agent-os\u002Fblob\u002Fmaster\u002FAgentOS\u002Flongform-practice\u002Fengram\u002Fskills\u002Flearn\u002FSKILL.md",[],[]]