mednotes-opencode 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/.opencode/agents/med-chat-triager.md +204 -0
  2. package/.opencode/agents/med-flashcard-maker.md +63 -0
  3. package/.opencode/agents/med-knowledge-architect.md +230 -0
  4. package/.opencode/agents/med-link-graph-curator.md +177 -0
  5. package/.opencode/agents/med-publish-guard.md +62 -0
  6. package/.opencode/commands/flashcards.md +25 -0
  7. package/.opencode/commands/mednotes/create.md +25 -0
  8. package/.opencode/commands/mednotes/enrich.md +27 -0
  9. package/.opencode/commands/mednotes/fix-wiki.md +27 -0
  10. package/.opencode/commands/mednotes/history.md +22 -0
  11. package/.opencode/commands/mednotes/link-body.md +25 -0
  12. package/.opencode/commands/mednotes/link-related.md +27 -0
  13. package/.opencode/commands/mednotes/link.md +27 -0
  14. package/.opencode/commands/mednotes/pdf-library.md +27 -0
  15. package/.opencode/commands/mednotes/process-chats.md +23 -0
  16. package/.opencode/commands/mednotes/setup.md +21 -0
  17. package/.opencode/commands/mednotes/status.md +27 -0
  18. package/.opencode/commands/mednotes/telemetry.md +27 -0
  19. package/.opencode/commands/report.md +26 -0
  20. package/.opencode/mednotes/AGENTS.md +57 -0
  21. package/.opencode/mednotes/agents/med-chat-triager.md +197 -0
  22. package/.opencode/mednotes/agents/med-flashcard-maker.md +56 -0
  23. package/.opencode/mednotes/agents/med-knowledge-architect.md +224 -0
  24. package/.opencode/mednotes/agents/med-link-graph-curator.md +171 -0
  25. package/.opencode/mednotes/agents/med-publish-guard.md +55 -0
  26. package/.opencode/mednotes/contracts/.gitkeep +1 -0
  27. package/.opencode/mednotes/contracts/agents.json +116 -0
  28. package/.opencode/mednotes/contracts/opencode-plugin.json +70 -0
  29. package/.opencode/mednotes/docs/agent-prompt-hardening.md +567 -0
  30. package/.opencode/mednotes/docs/agent-role-contracts.md +94 -0
  31. package/.opencode/mednotes/docs/anki-mcp-twenty-rules.md +214 -0
  32. package/.opencode/mednotes/docs/anki-templates/README.md +39 -0
  33. package/.opencode/mednotes/docs/anki-templates/cloze.back.html +23 -0
  34. package/.opencode/mednotes/docs/anki-templates/cloze.front.html +14 -0
  35. package/.opencode/mednotes/docs/anki-templates/qa.back.html +24 -0
  36. package/.opencode/mednotes/docs/anki-templates/qa.front.html +14 -0
  37. package/.opencode/mednotes/docs/anki-templates/style.css +182 -0
  38. package/.opencode/mednotes/docs/atomicity-splitting-policy.md +113 -0
  39. package/.opencode/mednotes/docs/extension-docs.md +40 -0
  40. package/.opencode/mednotes/docs/flashcard-ingestion.md +278 -0
  41. package/.opencode/mednotes/docs/knowledge-architect.md +208 -0
  42. package/.opencode/mednotes/docs/merge-policy.md +110 -0
  43. package/.opencode/mednotes/docs/public-vocabulary.md +104 -0
  44. package/.opencode/mednotes/docs/semantic-linker.md +141 -0
  45. package/.opencode/mednotes/docs/taxonomy-policy.md +90 -0
  46. package/.opencode/mednotes/docs/triage-policy.md +187 -0
  47. package/.opencode/mednotes/docs/vault-version-control.md +758 -0
  48. package/.opencode/mednotes/docs/vocabulary-db-recovery.md +58 -0
  49. package/.opencode/mednotes/docs/workflow-output-contract.md +779 -0
  50. package/.opencode/mednotes/hooks/hooks.json +79 -0
  51. package/.opencode/mednotes/package-lock.json +6361 -0
  52. package/.opencode/mednotes/package.json +15 -0
  53. package/.opencode/mednotes/pyproject.toml +48 -0
  54. package/.opencode/mednotes/scripts/bootstrap_windows_python_uv.cmd +13 -0
  55. package/.opencode/mednotes/scripts/bootstrap_windows_python_uv.ps1 +172 -0
  56. package/.opencode/mednotes/scripts/enrich_notes.py +23 -0
  57. package/.opencode/mednotes/scripts/full_reset_windows_python_uv.cmd +13 -0
  58. package/.opencode/mednotes/scripts/hooks/antigravity_hook_status.mjs +212 -0
  59. package/.opencode/mednotes/scripts/hooks/mednotes_hook/adapters/antigravity.mjs +169 -0
  60. package/.opencode/mednotes/scripts/hooks/mednotes_hook/adapters/harness_payload.mjs +103 -0
  61. package/.opencode/mednotes/scripts/hooks/mednotes_hook/adapters/opencode_plugin.mjs +341 -0
  62. package/.opencode/mednotes/scripts/hooks/mednotes_hook/adapters/opencode_user_config_sync.mjs +177 -0
  63. package/.opencode/mednotes/scripts/hooks/mednotes_hook/anki_preflight.mjs +214 -0
  64. package/.opencode/mednotes/scripts/hooks/mednotes_hook/cli.mjs +143 -0
  65. package/.opencode/mednotes/scripts/hooks/mednotes_hook/diagnostics.mjs +11 -0
  66. package/.opencode/mednotes/scripts/hooks/mednotes_hook/domain/agent_directive_core.mjs +160 -0
  67. package/.opencode/mednotes/scripts/hooks/mednotes_hook/fsm_directive.mjs +1470 -0
  68. package/.opencode/mednotes/scripts/hooks/mednotes_hook/hook_errors.mjs +120 -0
  69. package/.opencode/mednotes/scripts/hooks/mednotes_hook/retention.mjs +114 -0
  70. package/.opencode/mednotes/scripts/hooks/mednotes_hook/runtime.mjs +174 -0
  71. package/.opencode/mednotes/scripts/hooks/mednotes_hook/telemetry_capture.mjs +511 -0
  72. package/.opencode/mednotes/scripts/hooks/mednotes_hook/vault_guard.mjs +624 -0
  73. package/.opencode/mednotes/scripts/hooks/mednotes_hook.mjs +5 -0
  74. package/.opencode/mednotes/scripts/mednotes/_runtime_paths.py +24 -0
  75. package/.opencode/mednotes/scripts/mednotes/anki_model_validator.py +18 -0
  76. package/.opencode/mednotes/scripts/mednotes/capture_extension_diff.py +1562 -0
  77. package/.opencode/mednotes/scripts/mednotes/feedback_report.py +16 -0
  78. package/.opencode/mednotes/scripts/mednotes/flashcard_index.py +18 -0
  79. package/.opencode/mednotes/scripts/mednotes/flashcard_pipeline.py +18 -0
  80. package/.opencode/mednotes/scripts/mednotes/flashcard_report.py +18 -0
  81. package/.opencode/mednotes/scripts/mednotes/flashcard_sources.py +18 -0
  82. package/.opencode/mednotes/scripts/mednotes/obsidian/README.md +6 -0
  83. package/.opencode/mednotes/scripts/mednotes/obsidian_note_utils.py +20 -0
  84. package/.opencode/mednotes/scripts/mednotes/pdf_library/cli.py +16 -0
  85. package/.opencode/mednotes/scripts/mednotes/project_fsm.py +229 -0
  86. package/.opencode/mednotes/scripts/mednotes/setup_telemetry_email.py +404 -0
  87. package/.opencode/mednotes/scripts/mednotes/sync_anki_twenty_rules.py +18 -0
  88. package/.opencode/mednotes/scripts/mednotes/sync_opencode_user_config.py +36 -0
  89. package/.opencode/mednotes/scripts/mednotes/wiki/cli.py +20 -0
  90. package/.opencode/mednotes/scripts/mednotes/wiki_graph.py +18 -0
  91. package/.opencode/mednotes/scripts/mednotes/wiki_tree.py +134 -0
  92. package/.opencode/mednotes/scripts/reset_windows_python_uv.ps1 +625 -0
  93. package/.opencode/mednotes/scripts/run_python.mjs +109 -0
  94. package/.opencode/mednotes/scripts/vault/vault_commit.ps1 +19 -0
  95. package/.opencode/mednotes/scripts/vault/vault_commit.sh +18 -0
  96. package/.opencode/mednotes/scripts/vault/vault_git.ps1 +19 -0
  97. package/.opencode/mednotes/scripts/vault/vault_git.py +3107 -0
  98. package/.opencode/mednotes/scripts/vault/vault_git.sh +18 -0
  99. package/.opencode/mednotes/scripts/vault/vault_precommit.ps1 +19 -0
  100. package/.opencode/mednotes/scripts/vault/vault_precommit.sh +18 -0
  101. package/.opencode/mednotes/skills/THIRD_PARTY_NOTICES.md +45 -0
  102. package/.opencode/mednotes/skills/create-medical-flashcards/SKILL.md +113 -0
  103. package/.opencode/mednotes/skills/create-medical-note/SKILL.md +90 -0
  104. package/.opencode/mednotes/skills/enrich-medical-note/SKILL.md +120 -0
  105. package/.opencode/mednotes/skills/fix-medical-wiki/SKILL.md +559 -0
  106. package/.opencode/mednotes/skills/link-medical-wiki/SKILL.md +224 -0
  107. package/.opencode/mednotes/skills/obsidian-cli/SKILL.md +118 -0
  108. package/.opencode/mednotes/skills/obsidian-markdown/SKILL.md +207 -0
  109. package/.opencode/mednotes/skills/obsidian-markdown/references/CALLOUTS.md +58 -0
  110. package/.opencode/mednotes/skills/obsidian-markdown/references/EMBEDS.md +63 -0
  111. package/.opencode/mednotes/skills/obsidian-markdown/references/PROPERTIES.md +61 -0
  112. package/.opencode/mednotes/skills/obsidian-ops/SKILL.md +136 -0
  113. package/.opencode/mednotes/skills/pdf-library/SKILL.md +45 -0
  114. package/.opencode/mednotes/skills/process-medical-chats/SKILL.md +246 -0
  115. package/.opencode/mednotes/skills/workflow-report/SKILL.md +100 -0
  116. package/.opencode/mednotes/src/mednotes/__init__.py +5 -0
  117. package/.opencode/mednotes/src/mednotes/domains/__init__.py +5 -0
  118. package/.opencode/mednotes/src/mednotes/domains/flashcards/README.md +26 -0
  119. package/.opencode/mednotes/src/mednotes/domains/flashcards/__init__.py +2 -0
  120. package/.opencode/mednotes/src/mednotes/domains/flashcards/build_demo_apkg.py +177 -0
  121. package/.opencode/mednotes/src/mednotes/domains/flashcards/contracts.py +385 -0
  122. package/.opencode/mednotes/src/mednotes/domains/flashcards/flashcards_machine.py +522 -0
  123. package/.opencode/mednotes/src/mednotes/domains/flashcards/fsm.py +817 -0
  124. package/.opencode/mednotes/src/mednotes/domains/flashcards/index.py +630 -0
  125. package/.opencode/mednotes/src/mednotes/domains/flashcards/install_models.py +445 -0
  126. package/.opencode/mednotes/src/mednotes/domains/flashcards/model.py +359 -0
  127. package/.opencode/mednotes/src/mednotes/domains/flashcards/obsidian_links.py +135 -0
  128. package/.opencode/mednotes/src/mednotes/domains/flashcards/obsidian_note_utils.py +546 -0
  129. package/.opencode/mednotes/src/mednotes/domains/flashcards/pipeline.py +580 -0
  130. package/.opencode/mednotes/src/mednotes/domains/flashcards/report.py +510 -0
  131. package/.opencode/mednotes/src/mednotes/domains/flashcards/sources.py +682 -0
  132. package/.opencode/mednotes/src/mednotes/domains/flashcards/sync_rules.py +184 -0
  133. package/.opencode/mednotes/src/mednotes/domains/history/__init__.py +1 -0
  134. package/.opencode/mednotes/src/mednotes/domains/history/history_fsm.py +852 -0
  135. package/.opencode/mednotes/src/mednotes/domains/history/history_machine.py +453 -0
  136. package/.opencode/mednotes/src/mednotes/domains/setup/__init__.py +7 -0
  137. package/.opencode/mednotes/src/mednotes/domains/setup/setup_fsm.py +808 -0
  138. package/.opencode/mednotes/src/mednotes/domains/setup/setup_machine.py +973 -0
  139. package/.opencode/mednotes/src/mednotes/domains/wiki/README.md +64 -0
  140. package/.opencode/mednotes/src/mednotes/domains/wiki/__init__.py +1 -0
  141. package/.opencode/mednotes/src/mednotes/domains/wiki/api.py +668 -0
  142. package/.opencode/mednotes/src/mednotes/domains/wiki/batch_state.py +102 -0
  143. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/__init__.py +1 -0
  144. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/atomicity/__init__.py +1 -0
  145. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/atomicity/atomicity.py +877 -0
  146. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/body_link/__init__.py +1 -0
  147. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/body_link/body_linker.py +1562 -0
  148. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/effects/__init__.py +1 -0
  149. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/effects/effect_adapters.py +949 -0
  150. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/effects/fix_wiki_runtime_adapters.py +433 -0
  151. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/graph/__init__.py +1 -0
  152. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/graph/coverage.py +413 -0
  153. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/graph/graph.py +396 -0
  154. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/graph/graph_fixes.py +161 -0
  155. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/hygiene/__init__.py +1 -0
  156. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/hygiene/hygiene.py +483 -0
  157. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/__init__.py +2 -0
  158. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/anchors.py +185 -0
  159. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/__init__.py +0 -0
  160. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/cache.py +223 -0
  161. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/config.py +131 -0
  162. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/download.py +224 -0
  163. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/frontmatter.py +59 -0
  164. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/insert.py +227 -0
  165. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/core/local_import.py +54 -0
  166. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/sources/__init__.py +42 -0
  167. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/sources/web_profiles.py +99 -0
  168. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/sources/web_search.py +203 -0
  169. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/illustrate/sources/wikimedia.py +102 -0
  170. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/markdown/__init__.py +1 -0
  171. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/markdown/markdown_db_adapter.mjs +434 -0
  172. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/markdown/markdown_node_runtime.py +274 -0
  173. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/markdown/markdown_query.py +227 -0
  174. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/__init__.py +1 -0
  175. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/artifacts.py +605 -0
  176. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/canonical_merge.py +277 -0
  177. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/markdown_zones.py +85 -0
  178. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/meaning_planner.py +307 -0
  179. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_iter.py +67 -0
  180. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_merge.py +278 -0
  181. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_plan.py +409 -0
  182. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_policy.py +22 -0
  183. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/__init__.py +79 -0
  184. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/fixes.py +264 -0
  185. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/frontmatter.py +435 -0
  186. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/models.py +208 -0
  187. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/prompts.py +37 -0
  188. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/tables.py +236 -0
  189. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/note_style/validate.py +404 -0
  190. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/provenance.py +478 -0
  191. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/raw_chats.py +273 -0
  192. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/notes/sources_backfill.py +235 -0
  193. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/__init__.py +10 -0
  194. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/anchors.py +16 -0
  195. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/captions.py +47 -0
  196. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/cli.py +179 -0
  197. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/cloud.py +52 -0
  198. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/config.py +196 -0
  199. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/context_packets.py +76 -0
  200. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/db.py +81 -0
  201. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/doctor.py +102 -0
  202. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/figure_ids.py +42 -0
  203. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/ingest.py +326 -0
  204. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/insert.py +316 -0
  205. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/mentions.py +57 -0
  206. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/ocr.py +71 -0
  207. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/paths.py +35 -0
  208. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/pdf_engine.py +77 -0
  209. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/schema.py +155 -0
  210. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/search.py +188 -0
  211. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/tui/__init__.py +1 -0
  212. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/tui/app.py +89 -0
  213. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/tui/image_backend.py +29 -0
  214. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/pdf/tui/state.py +65 -0
  215. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/publish/__init__.py +1 -0
  216. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/publish/publish.py +1139 -0
  217. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/publish/publish_receipts.py +365 -0
  218. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/publish/publish_recovery.py +240 -0
  219. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/__init__.py +1 -0
  220. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/agent_behavior_corpus.py +2069 -0
  221. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/agent_report_validation.py +4448 -0
  222. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/agent_run_audit.py +852 -0
  223. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/architect_prompt_eval.py +341 -0
  224. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/body_linker_eval.py +240 -0
  225. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/curator_output_validation.py +175 -0
  226. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/curator_prompt_eval.py +865 -0
  227. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/quality/triager_prompt_eval.py +1295 -0
  228. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/related_notes/__init__.py +1 -0
  229. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/related_notes/related_notes.py +1920 -0
  230. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/related_notes/related_notes_headless.py +1186 -0
  231. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/specialist/__init__.py +1 -0
  232. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/specialist/plan_attestation.py +148 -0
  233. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/specialist/specialist_receipts.py +360 -0
  234. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/specialist/specialist_runtime.py +52 -0
  235. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/specialist/specialist_task_runner.py +2470 -0
  236. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/style/__init__.py +1 -0
  237. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/style/style.py +1952 -0
  238. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/subagents/__init__.py +1 -0
  239. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/subagents/agents.py +1767 -0
  240. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/__init__.py +1 -0
  241. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/alias_projection.py +331 -0
  242. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/link_terms.py +151 -0
  243. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/llm_disambiguation.py +182 -0
  244. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/__init__.py +116 -0
  245. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/audit.py +201 -0
  246. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/migration.py +314 -0
  247. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/normalize.py +72 -0
  248. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/policy.py +135 -0
  249. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/resolve.py +413 -0
  250. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/schema.py +157 -0
  251. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/taxonomy/status.py +137 -0
  252. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/vocabulary_bootstrap.py +509 -0
  253. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/vocabulary_curator_batch.py +1115 -0
  254. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/vocabulary_ingestion.py +632 -0
  255. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/vocabulary_map.py +930 -0
  256. package/.opencode/mednotes/src/mednotes/domains/wiki/capabilities/vocabulary/vocabulary_recovery.py +1388 -0
  257. package/.opencode/mednotes/src/mednotes/domains/wiki/cli.py +6665 -0
  258. package/.opencode/mednotes/src/mednotes/domains/wiki/common.py +69 -0
  259. package/.opencode/mednotes/src/mednotes/domains/wiki/config.py +210 -0
  260. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/__init__.py +74 -0
  261. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/agent_report.py +242 -0
  262. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/agent_run_audit.py +196 -0
  263. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/agents.py +601 -0
  264. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/curator.py +256 -0
  265. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/effect_payloads.py +519 -0
  266. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/happy_path.py +190 -0
  267. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/link_git.py +110 -0
  268. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/link_runtime_artifact.py +52 -0
  269. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/note_plan.py +75 -0
  270. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/paths.py +114 -0
  271. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/public_report.py +53 -0
  272. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/publish.py +111 -0
  273. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/raw_coverage.py +217 -0
  274. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/related_notes.py +136 -0
  275. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/related_notes_headless.py +153 -0
  276. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/related_notes_runtime.py +395 -0
  277. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/schema_registry.py +637 -0
  278. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/specialist.py +432 -0
  279. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/status.py +62 -0
  280. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/style_rewrite.py +568 -0
  281. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/vocabulary_ingestion.py +223 -0
  282. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/workflow_blockers.py +510 -0
  283. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/workflow_guardrails.py +637 -0
  284. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/workflow_outcomes.py +121 -0
  285. package/.opencode/mednotes/src/mednotes/domains/wiki/contracts/workflow_receipts.py +100 -0
  286. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/__init__.py +1 -0
  287. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/__init__.py +1 -0
  288. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/__main__.py +4 -0
  289. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/cli.py +275 -0
  290. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/__init__.py +2 -0
  291. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/candidates.py +193 -0
  292. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/cli.py +189 -0
  293. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/gemini.py +220 -0
  294. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/inputs.py +120 -0
  295. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/models.py +34 -0
  296. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/parsing.py +48 -0
  297. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/prompts.py +216 -0
  298. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/quality.py +54 -0
  299. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/reporting.py +24 -0
  300. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/runner.py +433 -0
  301. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/utils.py +39 -0
  302. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/enrich/workflow/vault_guard_bridge.py +17 -0
  303. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/__init__.py +1 -0
  304. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_context_packets.py +454 -0
  305. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_decision_projection.py +133 -0
  306. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_effects.py +1260 -0
  307. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_fsm.py +2768 -0
  308. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_machine.py +1588 -0
  309. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_plan.py +306 -0
  310. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_primary_objective.py +316 -0
  311. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_problem.py +153 -0
  312. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_receipt_evidence.py +306 -0
  313. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_states.py +290 -0
  314. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/fix_wiki_user_report.py +342 -0
  315. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/fix_wiki/health.py +6332 -0
  316. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/__init__.py +1 -0
  317. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/link_fsm.py +1119 -0
  318. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/link_git.py +638 -0
  319. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/link_machine.py +1106 -0
  320. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/link_retry_governance.py +374 -0
  321. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/link_runtime_result.py +485 -0
  322. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/link_triggers.py +183 -0
  323. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/linking.py +2758 -0
  324. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/reference_repair.py +718 -0
  325. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link/related_notes_fsm.py +1855 -0
  326. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link_related/__init__.py +1 -0
  327. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/link_related/link_related_machine.py +834 -0
  328. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/process_chats/__init__.py +1 -0
  329. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/process_chats/process_chats_fsm.py +1592 -0
  330. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/process_chats/process_chats_machine.py +3097 -0
  331. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/process_chats/process_chats_primary_objective.py +28 -0
  332. package/.opencode/mednotes/src/mednotes/domains/wiki/flows/process_chats/process_chats_runtime_result.py +185 -0
  333. package/.opencode/mednotes/src/mednotes/domains/wiki/performance.py +97 -0
  334. package/.opencode/mednotes/src/mednotes/kernel/__init__.py +6 -0
  335. package/.opencode/mednotes/src/mednotes/kernel/agent_directive.py +336 -0
  336. package/.opencode/mednotes/src/mednotes/kernel/base.py +51 -0
  337. package/.opencode/mednotes/src/mednotes/kernel/blockers.py +39 -0
  338. package/.opencode/mednotes/src/mednotes/kernel/effect_executor.py +55 -0
  339. package/.opencode/mednotes/src/mednotes/kernel/effect_intent.py +69 -0
  340. package/.opencode/mednotes/src/mednotes/kernel/effects.py +160 -0
  341. package/.opencode/mednotes/src/mednotes/kernel/errors.py +38 -0
  342. package/.opencode/mednotes/src/mednotes/kernel/fsm_event.py +35 -0
  343. package/.opencode/mednotes/src/mednotes/kernel/fsm_model.py +55 -0
  344. package/.opencode/mednotes/src/mednotes/kernel/fsm_transition_result.py +75 -0
  345. package/.opencode/mednotes/src/mednotes/kernel/guardrails.py +188 -0
  346. package/.opencode/mednotes/src/mednotes/kernel/progress.py +319 -0
  347. package/.opencode/mednotes/src/mednotes/kernel/public_report.py +346 -0
  348. package/.opencode/mednotes/src/mednotes/kernel/state_machine.py +164 -0
  349. package/.opencode/mednotes/src/mednotes/kernel/workflow.py +619 -0
  350. package/.opencode/mednotes/src/mednotes/platform/__init__.py +5 -0
  351. package/.opencode/mednotes/src/mednotes/platform/backup_policy.py +382 -0
  352. package/.opencode/mednotes/src/mednotes/platform/feedback/__init__.py +62 -0
  353. package/.opencode/mednotes/src/mednotes/platform/feedback/cli.py +275 -0
  354. package/.opencode/mednotes/src/mednotes/platform/feedback/contracts.py +83 -0
  355. package/.opencode/mednotes/src/mednotes/platform/feedback/core.py +4168 -0
  356. package/.opencode/mednotes/src/mednotes/platform/feedback/integrity.py +989 -0
  357. package/.opencode/mednotes/src/mednotes/platform/feedback/operational_contract.py +2293 -0
  358. package/.opencode/mednotes/src/mednotes/platform/feedback/telemetry.py +875 -0
  359. package/.opencode/mednotes/src/mednotes/platform/feedback/telemetry_config.py +65 -0
  360. package/.opencode/mednotes/src/mednotes/platform/opencode_runtime_config.py +182 -0
  361. package/.opencode/mednotes/src/mednotes/platform/paths/__init__.py +1560 -0
  362. package/.opencode/mednotes/src/mednotes/platform/secrets.py +89 -0
  363. package/.opencode/mednotes/src/mednotes/platform/user_config.py +103 -0
  364. package/.opencode/mednotes/src/mednotes/platform/vault_guard.py +214 -0
  365. package/.opencode/mednotes/uv.lock +932 -0
  366. package/.opencode/mednotes.generated.json +395 -0
  367. package/.opencode/opencode.json +31 -0
  368. package/.opencode/plugins/mednotes-fsm.mjs +7 -0
  369. package/.opencode/plugins/mednotes_hook/adapters/antigravity.mjs +169 -0
  370. package/.opencode/plugins/mednotes_hook/adapters/harness_payload.mjs +103 -0
  371. package/.opencode/plugins/mednotes_hook/adapters/opencode_plugin.mjs +341 -0
  372. package/.opencode/plugins/mednotes_hook/adapters/opencode_user_config_sync.mjs +177 -0
  373. package/.opencode/plugins/mednotes_hook/anki_preflight.mjs +214 -0
  374. package/.opencode/plugins/mednotes_hook/cli.mjs +143 -0
  375. package/.opencode/plugins/mednotes_hook/diagnostics.mjs +11 -0
  376. package/.opencode/plugins/mednotes_hook/domain/agent_directive_core.mjs +160 -0
  377. package/.opencode/plugins/mednotes_hook/fsm_directive.mjs +1470 -0
  378. package/.opencode/plugins/mednotes_hook/hook_errors.mjs +120 -0
  379. package/.opencode/plugins/mednotes_hook/retention.mjs +114 -0
  380. package/.opencode/plugins/mednotes_hook/runtime.mjs +174 -0
  381. package/.opencode/plugins/mednotes_hook/telemetry_capture.mjs +511 -0
  382. package/.opencode/plugins/mednotes_hook/vault_guard.mjs +624 -0
  383. package/AGENTS.md +57 -0
  384. package/README.md +194 -0
  385. package/adapters/antigravity/agents.json +80 -0
  386. package/adapters/antigravity/templates/med-chat-triager.md +214 -0
  387. package/adapters/antigravity/templates/med-flashcard-maker.md +72 -0
  388. package/adapters/antigravity/templates/med-knowledge-architect.md +241 -0
  389. package/adapters/antigravity/templates/med-link-graph-curator.md +187 -0
  390. package/adapters/antigravity/templates/med-publish-guard.md +71 -0
  391. package/adapters/gemini-cli/gemini-extension.json +14 -0
  392. package/adapters/gemini-cli/package.json +15 -0
  393. package/adapters/gemini-cli/pyproject.toml +48 -0
  394. package/bin/mednotes-opencode.mjs +155 -0
  395. package/contracts/agents.json +116 -0
  396. package/core/agents/med-chat-triager.md +197 -0
  397. package/core/agents/med-flashcard-maker.md +56 -0
  398. package/core/agents/med-knowledge-architect.md +224 -0
  399. package/core/agents/med-link-graph-curator.md +171 -0
  400. package/core/agents/med-publish-guard.md +55 -0
  401. package/core/commands/flashcards.toml +22 -0
  402. package/core/commands/mednotes/create.toml +22 -0
  403. package/core/commands/mednotes/enrich.toml +24 -0
  404. package/core/commands/mednotes/fix-wiki.toml +24 -0
  405. package/core/commands/mednotes/history.toml +19 -0
  406. package/core/commands/mednotes/link-body.toml +22 -0
  407. package/core/commands/mednotes/link-related.toml +24 -0
  408. package/core/commands/mednotes/link.toml +24 -0
  409. package/core/commands/mednotes/pdf-library.toml +24 -0
  410. package/core/commands/mednotes/process-chats.toml +20 -0
  411. package/core/commands/mednotes/setup.toml +18 -0
  412. package/core/commands/mednotes/status.toml +24 -0
  413. package/core/commands/mednotes/telemetry.toml +24 -0
  414. package/core/commands/report.toml +23 -0
  415. package/core/skills/THIRD_PARTY_NOTICES.md +45 -0
  416. package/core/skills/create-medical-flashcards/SKILL.md +113 -0
  417. package/core/skills/create-medical-note/SKILL.md +90 -0
  418. package/core/skills/enrich-medical-note/SKILL.md +120 -0
  419. package/core/skills/fix-medical-wiki/SKILL.md +559 -0
  420. package/core/skills/link-medical-wiki/SKILL.md +224 -0
  421. package/core/skills/obsidian-cli/SKILL.md +118 -0
  422. package/core/skills/obsidian-markdown/SKILL.md +207 -0
  423. package/core/skills/obsidian-markdown/references/CALLOUTS.md +58 -0
  424. package/core/skills/obsidian-markdown/references/EMBEDS.md +63 -0
  425. package/core/skills/obsidian-markdown/references/PROPERTIES.md +61 -0
  426. package/core/skills/obsidian-ops/SKILL.md +136 -0
  427. package/core/skills/pdf-library/SKILL.md +45 -0
  428. package/core/skills/process-medical-chats/SKILL.md +246 -0
  429. package/core/skills/workflow-report/SKILL.md +100 -0
  430. package/package.json +45 -0
@@ -0,0 +1,214 @@
1
+ # Local Copy Provenance
2
+
3
+ This file is the Medical Notes Workbench operational copy of the Anki MCP
4
+ `/twenty_rules` prompt content. It is bundled locally because Gemini CLI
5
+ subagents and extension commands cannot reliably invoke an MCP slash prompt and
6
+ pull its content into a delegated agent's context.
7
+
8
+ Source package path:
9
+ `@ankimcp/anki-mcp-server/dist/mcp/primitives/essential/prompts/twenty-rules.prompt/content.md`
10
+
11
+ Refresh this file when the configured `@ankimcp/anki-mcp-server` prompt changes.
12
+ The MCP prompt remains the upstream provenance; this local file is the runtime
13
+ methodology used by `/flashcards`.
14
+
15
+ Medical Notes Workbench overrides live in `flashcard-ingestion.md` and take
16
+ precedence for local behavior: do not add Anki tags, do not use media tools
17
+ unless explicitly allowed, use the required `Obsidian` source field, and apply
18
+ the preview/confirmation thresholds defined by the extension.
19
+
20
+ # Description
21
+
22
+ Twenty rules of formulating knowledge for effective Anki flashcard creation based on Dr. Piotr Wozniak's SuperMemo research
23
+
24
+ # Content
25
+
26
+ *Based on "Twenty Rules of Formulating Knowledge" by Dr. Piotr Wozniak: https://www.supermemo.com/en/blog/twenty-rules-of-formulating-knowledge*
27
+
28
+ You are helping a user create effective Anki flashcards based on Dr. Piotr Wozniak's "Twenty Rules of Formulating Knowledge" from SuperMemo research. These principles dramatically improve retention and reduce study time.
29
+
30
+ ## Core Principles
31
+
32
+ ### 1. Do Not Learn If You Do Not Understand
33
+ **Before creating any flashcard, ensure the user understands the concept.**
34
+ - Ask clarifying questions if the topic seems unclear
35
+ - Don't create cards from material the user hasn't comprehended
36
+ - Suggest breaking down complex topics into understandable chunks first
37
+
38
+ ### 2. Learn Before You Memorize - Build the Big Picture First
39
+ **Context before details. Overview before memorization.**
40
+ - When user wants to learn a new topic, suggest understanding the overall structure first
41
+ - Example: Before creating cards about React hooks, ensure they understand React's component model
42
+ - Create foundational cards before advanced ones
43
+
44
+ ### 3. Build Upon the Basics
45
+ **Never skip fundamentals. Simple before complex.**
46
+ - Identify prerequisite knowledge
47
+ - Suggest creating basic cards first, then build complexity
48
+ - Example: Learn addition before multiplication, HTTP before REST APIs
49
+
50
+ ### 4. Stick to the Minimum Information Principle
51
+ **CRITICAL: Each card should test ONE piece of information.**
52
+ - ❌ BAD: "What are the three main features of React and how do they work?"
53
+ - ✅ GOOD: Three separate cards, each testing one feature
54
+ - Break complex cards into atomic units
55
+ - Simpler cards = faster reviews = better retention
56
+
57
+ ### 5. Cloze Deletion is Easy and Effective
58
+ **Use fill-in-the-blank format extensively.**
59
+ - Convert statements into cloze deletions
60
+ - Example: "The capital of {{c1::France}} is {{c2::Paris}}"
61
+ - Particularly effective for facts, definitions, and relationships
62
+ - Multiple clozes per card are OK if they test the same context
63
+
64
+ ### 6. Use Imagery - Visual Memory is Powerful
65
+ **Add images whenever possible.**
66
+ - "A picture is worth a thousand words"
67
+ - Suggest adding relevant images for:
68
+ - Geography, anatomy, architecture
69
+ - Historical figures, artworks
70
+ - Diagrams for abstract concepts
71
+ - Use the storeMediaFile tool to help users add images
72
+
73
+ ### 7. Use Mnemonic Techniques
74
+ **Memory aids make retention easier.**
75
+ - Suggest mnemonics for difficult items
76
+ - Use acronyms (e.g., "PEMDAS" for math order of operations)
77
+ - Create vivid, memorable associations
78
+ - Link abstract concepts to concrete images
79
+
80
+ ### 8. Avoid Sets - They're Difficult to Memorize
81
+ **Large lists are memory killers.**
82
+ - ❌ BAD: "List all 50 US state capitals"
83
+ - ✅ GOOD: Convert to cloze deletions or enumerated questions
84
+ - If a set is necessary, break it into overlapping subsets
85
+ - Use enumerations with context cues
86
+
87
+ ### 9. Avoid Enumerations When Possible
88
+ **Lists are harder than single facts.**
89
+ - Instead of "What are the 7 principles of X?", create 7 separate cards
90
+ - If enumeration is necessary:
91
+ - Use cloze deletion: "The 7 principles are: {{c1::principle1}}, {{c2::principle2}}..."
92
+ - Add context and memory aids
93
+ - Keep lists short (max 5-7 items)
94
+
95
+ ### 10. Combat Interference - Make Items Distinct
96
+ **Similar cards cause confusion.**
97
+ - Avoid creating nearly identical cards
98
+ - Make distinctions explicit
99
+ - Add context to differentiate similar concepts
100
+ - Example for similar countries:
101
+ - ❌ "Capital of Guyana?" and "Capital of Suriname?" (too similar)
102
+ - ✅ Add distinguishing features: "Capital of Guyana (only English-speaking country in South America)?"
103
+
104
+ ### 11. Optimize Wording - Keep It Simple and Clear
105
+ **Shorter, simpler wording = faster reviews.**
106
+ - Remove unnecessary words
107
+ - Use active voice
108
+ - Make questions unambiguous
109
+ - ❌ "In the context of programming, when considering the various paradigms, what would you say is the main characteristic that defines the functional approach?"
110
+ - ✅ "Functional programming's main characteristic?"
111
+
112
+ ### 12. Refer to Other Memories - Build Connections
113
+ **Connect new knowledge to existing knowledge.**
114
+ - Reference previously learned concepts
115
+ - Build knowledge networks
116
+ - Example: "Like REST but for GraphQL: {{c1::single endpoint}}"
117
+ - Use analogies to familiar concepts
118
+
119
+ ### 13. Personalize and Provide Examples
120
+ **Personal context dramatically improves retention.**
121
+ - Link to user's experiences
122
+ - Use examples from their projects, life, or interests
123
+ - ❌ Generic: "TypeScript interface definition?"
124
+ - ✅ Personal: "TypeScript interface (like the User type in your project)?"
125
+
126
+ ### 14. Rely on Emotional States
127
+ **Emotion enhances memory.**
128
+ - Use vivid, emotionally charged examples when appropriate
129
+ - Link to memorable events or stories
130
+ - Make boring facts interesting with context
131
+ - Example: Instead of dry historical dates, add dramatic context
132
+
133
+ ### 15. Context Cues Simplify Wording
134
+ **Categories and prefixes reduce cognitive load.**
135
+ - Add subject prefixes: "bio:", "hist:", "prog:"
136
+ - Use tags effectively
137
+ - Group related cards in decks
138
+ - Example: "js: Array method for filtering?" (context cue: "js:")
139
+
140
+ ### 16. Redundancy Can Be Beneficial
141
+ **Some repetition from different angles helps.**
142
+ - Create multiple cards for critical concepts from different angles
143
+ - Test the same fact in different contexts
144
+ - Balance with "don't overdo it"
145
+
146
+ ### 17. Provide Sources and References
147
+ **Context helps understanding and future reference.**
148
+ - Add source information in card metadata or extra field
149
+ - Link to documentation, books, or articles
150
+ - Helps when reviewing old cards
151
+
152
+ ### 18. Prioritize - Learn What Matters Most
153
+ **Not everything deserves a flashcard.**
154
+ - Focus on applicable, useful knowledge
155
+ - Ask: "Will I actually need to recall this?"
156
+ - Quality over quantity
157
+
158
+ ## Workflow for Creating Cards
159
+
160
+ 1. **Understand First**: Verify user understands the concept
161
+ 2. **Build Context**: Ensure foundational knowledge exists
162
+ 3. **Apply Minimum Information**: Break into atomic facts
163
+ 4. **Choose Format**: Prefer cloze deletion for facts, Q&A for concepts
164
+ 5. **Optimize Wording**: Make it clear, concise, unambiguous
165
+ 6. **Add Richness**: Images, mnemonics, personal connections
166
+ 7. **Review**: Check for interference with existing cards
167
+
168
+ ## When User Asks to Create Cards
169
+
170
+ 1. Ask about their understanding of the topic
171
+ 2. Suggest the number and type of cards (don't just create them)
172
+ 3. Show examples of proposed cards
173
+ 4. Wait for approval before creating
174
+ 5. Apply these rules to make cards effective
175
+ 6. Use addNote tool only after user confirms
176
+
177
+ ## Example Transformations
178
+
179
+ ### Example 1: Complex → Simple
180
+ ❌ **Bad Card**:
181
+ Q: "What are the main differences between REST and GraphQL APIs and when would you use each?"
182
+ A: [Long paragraph explaining both]
183
+
184
+ ✅ **Good Cards** (4 separate cards):
185
+ 1. "REST uses {{c1::multiple endpoints}}, GraphQL uses {{c2::single endpoint}}"
186
+ 2. "GraphQL advantage over REST: {{c1::client specifies exact data needed}}"
187
+ 3. "REST advantage over GraphQL: {{c1::simpler caching}} and {{c2::better tooling support}}"
188
+ 4. "Use GraphQL when: {{c1::client needs flexible queries}} and {{c2::reducing over-fetching matters}}"
189
+
190
+ ### Example 2: Generic → Personal
191
+ ❌ **Bad Card**:
192
+ Q: "What is a closure in JavaScript?"
193
+ A: "A function that has access to outer function variables"
194
+
195
+ ✅ **Good Card**:
196
+ Q: "js: Closure definition (like in your React hooks code)?"
197
+ A: "Function that remembers variables from its outer scope even after outer function returns"
198
+
199
+ ### Example 3: Adding Visual Memory
200
+ ❌ **Text Only**:
201
+ Q: "Structure of the human heart?"
202
+ A: [Text description]
203
+
204
+ ✅ **With Image**:
205
+ Q: [Image of heart with blank labels]
206
+ A: [Same image with labels visible]
207
+ (Use storeMediaFile to help user add the image)
208
+
209
+ ## Remember
210
+
211
+ **Quality > Quantity**: Five well-formed cards beat twenty poorly made ones.
212
+ **Atomic Knowledge**: One fact per card, always.
213
+ **User Context**: Personalize everything you can.
214
+ **Understanding First**: Never create cards from material the user doesn't understand.
@@ -0,0 +1,39 @@
1
+ # Anki Card Templates
2
+
3
+ Templates oficiais dos modelos Anki gerenciados pela Medical Notes Workbench.
4
+ Os arquivos aqui são fonte de verdade — `flashcards/install_models.py` lê este
5
+ diretório para montar os payloads de `mcp_anki-mcp_createModel`,
6
+ `mcp_anki-mcp_updateModelTemplates` e `mcp_anki-mcp_updateModelStyling`.
7
+
8
+ ## Modelos
9
+
10
+ ### `Medicina` — Q&A
11
+ - Tipo: básico (não cloze).
12
+ - Campos: `Frente`, `Verso`, `Verso Extra`, `Obsidian`.
13
+ - Templates: `qa.front.html`, `qa.back.html`.
14
+
15
+ ### `Medicina Cloze` — Cloze
16
+ - Tipo: cloze (`isCloze: true`).
17
+ - Campos: `Texto`, `Verso Extra`, `Obsidian`.
18
+ - Templates: `cloze.front.html`, `cloze.back.html`.
19
+ - O campo `Texto` é o cloze field (`{{cloze:Texto}}` nos templates) e carrega
20
+ `{{c1::...}}`, `{{c2::...}}` etc.
21
+
22
+ ## CSS compartilhado
23
+
24
+ `style.css` é único para os dois modelos. Mantém tipografia/espaçamento
25
+ consistente entre Q&A e Cloze, com suporte a `nightMode`.
26
+
27
+ Convenções para evitar colisão com Anki/outros modelos: tudo é prefixado com
28
+ `mnw-` (Medical Notes Workbench), exceto `.cloze` (classe que o próprio Anki
29
+ injeta nos clozes; estilizamos só dentro de `.mnw-cloze`).
30
+
31
+ ## Como atualizar
32
+
33
+ 1. Edite os arquivos HTML/CSS aqui.
34
+ 2. A skill `create-medical-flashcards` deve, no boot do `/flashcards`, chamar
35
+ `install_models.py ensure --output -` e mandar o payload resultante para o
36
+ Anki MCP (`createModel` se faltar, `updateModelTemplates` +
37
+ `updateModelStyling` se já existir e estiver desatualizado).
38
+ 3. Não edite os modelos manualmente no Anki Desktop — qualquer mudança ali
39
+ é sobrescrita no próximo run.
@@ -0,0 +1,23 @@
1
+ <div class="mnw-shell mnw-cloze">
2
+ <span class="mnw-deck" data-deck="{{Deck}}">{{Deck}}</span>
3
+ <div class="mnw-back">{{cloze:Texto}}</div>
4
+ {{#Verso Extra}}
5
+ <hr class="mnw-divider">
6
+ <div class="mnw-extra">{{Verso Extra}}</div>
7
+ {{/Verso Extra}}
8
+ {{#Obsidian}}
9
+ <div class="mnw-footer">
10
+ <a class="mnw-obsidian" href="{{text:Obsidian}}">Abrir no Obsidian</a>
11
+ </div>
12
+ {{/Obsidian}}
13
+ </div>
14
+ <script>
15
+ (function () {
16
+ var nodes = document.querySelectorAll(".mnw-deck[data-deck]");
17
+ for (var i = 0; i < nodes.length; i++) {
18
+ var raw = nodes[i].getAttribute("data-deck") || "";
19
+ var parts = raw.split("::").filter(Boolean);
20
+ nodes[i].textContent = parts.slice(-2).join(" · ");
21
+ }
22
+ })();
23
+ </script>
@@ -0,0 +1,14 @@
1
+ <div class="mnw-shell mnw-cloze">
2
+ <span class="mnw-deck" data-deck="{{Deck}}">{{Deck}}</span>
3
+ <div class="mnw-back">{{cloze:Texto}}</div>
4
+ </div>
5
+ <script>
6
+ (function () {
7
+ var nodes = document.querySelectorAll(".mnw-deck[data-deck]");
8
+ for (var i = 0; i < nodes.length; i++) {
9
+ var raw = nodes[i].getAttribute("data-deck") || "";
10
+ var parts = raw.split("::").filter(Boolean);
11
+ nodes[i].textContent = parts.slice(-2).join(" · ");
12
+ }
13
+ })();
14
+ </script>
@@ -0,0 +1,24 @@
1
+ <div class="mnw-shell">
2
+ <span class="mnw-deck" data-deck="{{Deck}}">{{Deck}}</span>
3
+ <div class="mnw-front is-muted">{{Frente}}</div>
4
+ <hr class="mnw-divider">
5
+ <div class="mnw-back">{{Verso}}</div>
6
+ {{#Verso Extra}}
7
+ <div class="mnw-extra">{{Verso Extra}}</div>
8
+ {{/Verso Extra}}
9
+ {{#Obsidian}}
10
+ <div class="mnw-footer">
11
+ <a class="mnw-obsidian" href="{{text:Obsidian}}">Abrir no Obsidian</a>
12
+ </div>
13
+ {{/Obsidian}}
14
+ </div>
15
+ <script>
16
+ (function () {
17
+ var nodes = document.querySelectorAll(".mnw-deck[data-deck]");
18
+ for (var i = 0; i < nodes.length; i++) {
19
+ var raw = nodes[i].getAttribute("data-deck") || "";
20
+ var parts = raw.split("::").filter(Boolean);
21
+ nodes[i].textContent = parts.slice(-2).join(" · ");
22
+ }
23
+ })();
24
+ </script>
@@ -0,0 +1,14 @@
1
+ <div class="mnw-shell">
2
+ <span class="mnw-deck" data-deck="{{Deck}}">{{Deck}}</span>
3
+ <div class="mnw-front">{{Frente}}</div>
4
+ </div>
5
+ <script>
6
+ (function () {
7
+ var nodes = document.querySelectorAll(".mnw-deck[data-deck]");
8
+ for (var i = 0; i < nodes.length; i++) {
9
+ var raw = nodes[i].getAttribute("data-deck") || "";
10
+ var parts = raw.split("::").filter(Boolean);
11
+ nodes[i].textContent = parts.slice(-2).join(" · ");
12
+ }
13
+ })();
14
+ </script>
@@ -0,0 +1,182 @@
1
+ /* Medical Notes Workbench — Anki cards (Medicina + Medicina Cloze)
2
+ * Direção: editorial, com serif na pergunta/resposta e sans nos detalhes,
3
+ * paleta warm stone, sem botões/pills agressivos. */
4
+
5
+ .card {
6
+ font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
7
+ "Helvetica Neue", Arial, sans-serif;
8
+ font-size: 17px;
9
+ line-height: 1.6;
10
+ color: #1c1917;
11
+ background: #fdfcfa;
12
+ text-align: left;
13
+ -webkit-font-smoothing: antialiased;
14
+ -moz-osx-font-smoothing: grayscale;
15
+ }
16
+
17
+ .mnw-shell {
18
+ max-width: 680px;
19
+ margin: 32px auto;
20
+ padding: 36px 44px 32px;
21
+ background: #ffffff;
22
+ border-radius: 16px;
23
+ box-shadow:
24
+ 0 1px 2px rgba(28, 25, 23, 0.04),
25
+ 0 8px 32px -8px rgba(28, 25, 23, 0.08);
26
+ }
27
+
28
+ /* Deck breadcrumb: monospace, mostra só os 2 últimos segmentos via JS */
29
+ .mnw-deck {
30
+ display: block;
31
+ font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo,
32
+ Consolas, monospace;
33
+ font-size: 11px;
34
+ letter-spacing: 0.02em;
35
+ color: #a8a29e;
36
+ margin-bottom: 28px;
37
+ }
38
+
39
+ /* Front Q&A: serif, centralizada, espaço generoso */
40
+ .mnw-front {
41
+ font-family: "Charter", "Iowan Old Style", "Apple Garamond", Baskerville,
42
+ "Source Serif Pro", "Source Serif", Georgia, "Times New Roman", serif;
43
+ font-size: 26px;
44
+ line-height: 1.4;
45
+ font-weight: 400;
46
+ color: #1c1917;
47
+ text-align: center;
48
+ margin: 16px 0 24px;
49
+ letter-spacing: -0.005em;
50
+ }
51
+
52
+ /* Mesma pergunta no verso, mas como contexto silencioso */
53
+ .mnw-front.is-muted {
54
+ font-size: 15px;
55
+ color: #78716c;
56
+ font-style: italic;
57
+ font-weight: 400;
58
+ text-align: left;
59
+ margin: 0 0 16px;
60
+ letter-spacing: 0;
61
+ }
62
+
63
+ /* Divisor curto e centrado, não um hr cheio */
64
+ .mnw-divider {
65
+ border: 0;
66
+ height: 1px;
67
+ width: 48px;
68
+ background: #d6d3d1;
69
+ margin: 24px auto;
70
+ }
71
+
72
+ /* Resposta (Q&A) e enunciado cloze: serif, esquerda */
73
+ .mnw-back {
74
+ font-family: "Charter", "Iowan Old Style", "Apple Garamond", Baskerville,
75
+ Georgia, "Times New Roman", serif;
76
+ font-size: 22px;
77
+ line-height: 1.5;
78
+ color: #1c1917;
79
+ font-weight: 400;
80
+ margin: 8px 0;
81
+ }
82
+
83
+ /* Cloze front pode ser longo: mantém esquerda e tipografia menor */
84
+ .mnw-cloze .mnw-back {
85
+ font-size: 21px;
86
+ text-align: left;
87
+ margin: 16px 0 8px;
88
+ }
89
+
90
+ /* Verso Extra: marginalia em sans, menor, borda lateral fina */
91
+ .mnw-extra {
92
+ margin-top: 24px;
93
+ padding-left: 16px;
94
+ border-left: 2px solid #e7e5e4;
95
+ font-size: 14.5px;
96
+ line-height: 1.65;
97
+ color: #57534e;
98
+ font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
99
+ sans-serif;
100
+ }
101
+
102
+ .mnw-extra :first-child { margin-top: 0; }
103
+ .mnw-extra :last-child { margin-bottom: 0; }
104
+ .mnw-extra ul, .mnw-extra ol { margin: 6px 0 6px 18px; padding: 0; }
105
+ .mnw-extra li { margin: 3px 0; }
106
+ .mnw-extra strong { color: #1c1917; font-weight: 600; }
107
+ .mnw-extra em { color: #44403c; }
108
+ .mnw-extra code {
109
+ font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo,
110
+ Consolas, monospace;
111
+ font-size: 0.9em;
112
+ background: #f5f5f4;
113
+ padding: 1px 6px;
114
+ border-radius: 3px;
115
+ color: #44403c;
116
+ }
117
+
118
+ /* Rodapé: link de texto com seta, sem botão */
119
+ .mnw-footer {
120
+ margin-top: 28px;
121
+ padding-top: 16px;
122
+ border-top: 1px solid #f5f5f4;
123
+ display: flex;
124
+ justify-content: flex-end;
125
+ }
126
+ .mnw-obsidian {
127
+ font-size: 13px;
128
+ font-weight: 500;
129
+ color: #6c5ce7;
130
+ text-decoration: none;
131
+ letter-spacing: 0.005em;
132
+ transition: color 0.15s ease;
133
+ }
134
+ .mnw-obsidian:hover { color: #5648c2; }
135
+ .mnw-obsidian::after { content: " →"; }
136
+
137
+ /* Cloze: efeito marca-texto em gradiente, não pill */
138
+ .mnw-cloze .cloze {
139
+ background: linear-gradient(transparent 62%, #fde68a 62%);
140
+ font-weight: 500;
141
+ color: #1c1917;
142
+ padding: 0 2px;
143
+ }
144
+
145
+ /* Anki night mode (Anki injeta .nightMode no body).
146
+ * Direção: warm black, elevação por inset highlight no shell em vez de
147
+ * sombra (sombra preta em preto não rende), cloze translúcido pra preservar
148
+ * o gesto de marca-texto do light. */
149
+ .nightMode .card,
150
+ .night_mode .card {
151
+ color: #e7e5e4;
152
+ background: #0f0e10;
153
+ }
154
+ .nightMode .mnw-shell {
155
+ background: #1c1b1f;
156
+ box-shadow:
157
+ inset 0 1px 0 rgba(255, 255, 255, 0.04),
158
+ 0 1px 2px rgba(0, 0, 0, 0.4);
159
+ }
160
+ .nightMode .mnw-deck { color: #a8a29e; }
161
+ .nightMode .mnw-front { color: #f5f5f4; }
162
+ .nightMode .mnw-front.is-muted { color: #a8a29e; }
163
+ .nightMode .mnw-back { color: #f5f5f4; }
164
+ .nightMode .mnw-divider { background: #3a3637; }
165
+ .nightMode .mnw-extra {
166
+ color: #d6d3d1;
167
+ border-left-color: #3a3637;
168
+ }
169
+ .nightMode .mnw-extra strong { color: #fafaf9; }
170
+ .nightMode .mnw-extra em { color: #e7e5e4; }
171
+ .nightMode .mnw-extra code {
172
+ background: #27272a;
173
+ color: #e7e5e4;
174
+ }
175
+ .nightMode .mnw-footer { border-top-color: #27272a; }
176
+ .nightMode .mnw-obsidian { color: #a5a3ff; }
177
+ .nightMode .mnw-obsidian:hover { color: #c7c5ff; }
178
+ .nightMode .mnw-cloze .cloze {
179
+ background: linear-gradient(transparent 62%, rgba(251, 191, 36, 0.22) 62%);
180
+ color: #fef3c7;
181
+ font-weight: 500;
182
+ }
@@ -0,0 +1,113 @@
1
+ # Atomicity Splitting Policy
2
+
3
+ This is the canonical human-readable policy for deciding whether a Wiki note
4
+ must be split into smaller notes. The executable gate lives in the vocabulary
5
+ DB apply path (`wiki.vocabulary_ingestion`); prompts, skills, agents, docs and
6
+ JSON contracts must reference this policy instead of restating their own
7
+ thresholds.
8
+
9
+ ## Contract
10
+
11
+ - Atomicity means `1 meaning canônico = 1 nota Wiki`.
12
+ - The vocabulary DB decides whether a split is applicable.
13
+ - Meaning comes from the note body, not from the file name or title.
14
+ - A title-only signal never authorizes a split.
15
+ - A long note is a review signal, not sufficient evidence by itself.
16
+ - A short proposed child note is a fragmentation risk, not a reason to force a
17
+ split.
18
+
19
+ Every `deferred_work_items[].reason=non_atomic_note` item must include a
20
+ body-based `semantic_signal`. Missing or weak body evidence blocks as
21
+ `semantic_ingestion.atomicity_signal_required` and requires parent/human review.
22
+
23
+ ## semantic_signal
24
+
25
+ `semantic_signal` must describe why the note body contains more than one
26
+ developed canonical concept. It must include:
27
+
28
+ - `score`: explicit semantic score when the curator can estimate one.
29
+ - `evidence[]`: evidence codes from the table below.
30
+ - `concepts[]`: at least two developed concepts found in the note body.
31
+ - `relationship_score`: probability that the note is a valid relationship note
32
+ instead of a non-atomic note.
33
+ - `fragment_risk`: `high` when the split would create underdeveloped children.
34
+ - `child_note_estimates[]`: estimated body size for each proposed child note
35
+ when a split is being considered.
36
+
37
+ Evidence weights used by the vocabulary DB:
38
+
39
+ | evidence code | weight |
40
+ | --- | ---: |
41
+ | `multiple_canonical_entities` | 0.30 |
42
+ | `different_entity_types` | 0.25 |
43
+ | `independent_definition_blocks` | 0.20 |
44
+ | `independent_management_blocks` | 0.20 |
45
+ | `independent_pathophysiology_blocks` | 0.15 |
46
+ | `separable_sections` | 0.15 |
47
+ | `linker_ambiguity` | 0.15 |
48
+
49
+ The DB computes `semantic_score` as the maximum of the explicit `score` and the
50
+ weighted evidence score, capped at 1.0. If `concepts[]` has two or more items,
51
+ `multiple_canonical_entities` is added. If those concepts have two or more
52
+ entity types, `different_entity_types` is added.
53
+
54
+ ## Size Gate
55
+
56
+ Size is a brake and review priority, not the split motor.
57
+
58
+ - Current note `> mean + 1 standard deviation`: enters the review-priority
59
+ path, but still needs semantic body evidence.
60
+ - Current note `<= mean + 1 standard deviation`: only advances with strong
61
+ semantic evidence, such as multiple canonical entities, different entity
62
+ types, independent body blocks, or real linker ambiguity.
63
+ - Proposed child note below `240` body characters, or below 25% of the mean body
64
+ size when that is larger, is treated as fragmentation risk.
65
+
66
+ The phrase `mean + 1 standard deviation` is the durable threshold contract. The
67
+ current implementation stores the calculated threshold in
68
+ `body_size_gate.long_note_threshold_chars`.
69
+
70
+ ## Decisions
71
+
72
+ The vocabulary DB maps `semantic_signal` to one of these decisions:
73
+
74
+ - `relationship_score >= 0.75` -> `relationship_note_valid`. Keep the note
75
+ whole because the body is mainly about a real relationship, such as disease
76
+ plus drug or diagnosis plus management.
77
+ - `semantic_score >= 0.75` and fragmentation risk is not high ->
78
+ `split_required`. This is the only decision that persists as
79
+ `deferred_work_items.status=pending` and can generate an atomicity split plan.
80
+ - `semantic_score >= 0.75` with high fragmentation risk ->
81
+ `split_deferred_fragment_risk`. Do not split automatically; require
82
+ parent/human review or keep as a controlled mention inside the main note.
83
+ - `semantic_score >= 0.45`, or `semantic_score >= 0.35` when the current note is
84
+ above `mean + 1 standard deviation` -> `split_candidate`. Review candidate
85
+ only; not an automatic split.
86
+ - Otherwise -> `no_action`.
87
+
88
+ All decisions except `split_required` are stored as non-applicable/cancelled for
89
+ the DB queue and must not produce an automatic split bundle.
90
+
91
+ ## Workflow Consequences
92
+
93
+ - The `med-link-graph-curator` collects `semantic_signal`; it does not decide or
94
+ perform the split.
95
+ - The vocabulary DB apply path gates the decision and persists only
96
+ `split_required` as pending work.
97
+ - `fix-wiki` may create `medical-notes-workbench.atomicity-split-plan.v1` only
98
+ from DB-pending `split_required` work items.
99
+ - While an atomicity split plan exists, `fix-wiki` must report a real blocker
100
+ such as `atomicity_split_required`; it must not finish as green health.
101
+ - The `med-knowledge-architect` may write only an
102
+ `atomicity-split-bundle.v1` for an official work item, preserving
103
+ `work_id`, `source_path`, `source_hash` and `semantic_signal`.
104
+ - `apply-atomicity-split` validates the bundle, mutates Markdown safely, records
105
+ the receipt, marks the DB work item completed and triggers the linker.
106
+
107
+ ## Relationship Notes
108
+
109
+ A note can be short and still non-atomic, or long and still valid. The deciding
110
+ question is whether the note body develops separate canonical concepts that
111
+ should each stand as an independent study target. If the body instead explains a
112
+ single meaningful relationship between concepts, use `relationship_note_valid`
113
+ or `split_candidate`, not `split_required`.
@@ -0,0 +1,40 @@
1
+ # Medical Notes Workbench Extension Docs
2
+
3
+ These files preserve durable contracts and methodology for Medical Notes
4
+ Workbench workflows. They are reference material for commands, runbook skills
5
+ and subagents; they are not activatable Gemini skills.
6
+
7
+ The distributed Gemini CLI extension is sourced from `bundle/` only. If a
8
+ runtime document, script, package, or example must ship to users, place its
9
+ source under `bundle/` before building.
10
+
11
+ ## Fonte canônica
12
+
13
+ - `knowledge-architect.md`: Padrão Ouro, formato de nota, taxonomia, footer,
14
+ artefatos Gemini e regras estruturais da `Wiki_Medicina`.
15
+ - `semantic-linker.md`: vocabulary DB, body linker, desambiguação contextual,
16
+ Related Notes, reference repair e graph validation.
17
+ - `atomicity-splitting-policy.md`: política canônica para decidir split de nota
18
+ a partir do `semantic_signal` do corpo e dos gates do vocabulary DB.
19
+ - `flashcard-ingestion.md`: modelos Anki, preview-first, idempotência,
20
+ deeplinks Obsidian, tags e pipeline local de flashcards.
21
+ - `anki-mcp-twenty-rules.md`: cópia upstream metodológica do prompt MCP
22
+ `/twenty_rules`; regras locais ficam em `flashcard-ingestion.md`.
23
+ - `vault-version-control.md`: pontos de restauração, histórico, rollback e
24
+ versionamento Git invisível ao usuário.
25
+ - `workflow-output-contract.md`: resposta final visível dos workflows públicos.
26
+
27
+ agents e skills devem referenciar estes docs e não repetir contratos longos.
28
+ Use duplicação só para sentinelas operacionais críticas testadas ou para
29
+ comandos mínimos necessários no runtime context.
30
+
31
+ `obsidian-ops` é a skill operacional que deve ser carregada antes de qualquer
32
+ interação com vault Obsidian. Ela aponta para estes docs e para as CLIs
33
+ canônicas em vez de carregar políticas próprias de Git, taxonomia ou linker.
34
+ As skills vendorizadas `${extensionPath}/skills/obsidian-cli/SKILL.md` e
35
+ `${extensionPath}/skills/obsidian-markdown/SKILL.md` entram como apoio de
36
+ ferramenta/sintaxe, sem substituir os contratos médicos do Workbench.
37
+
38
+ Put workflow sequence and operational branching in activatable skills,
39
+ commands, docs, agents, or scripts. Keep `GEMINI.md` as compact routing kernel
40
+ and load these documents only when a workflow needs their contract.