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,224 @@
1
+ ---
2
+ name: link-medical-wiki
3
+ description: Roda a linkagem da Wiki_Medicina com diagnóstico auditável, vocabulary DB, grafo e Related Notes via export do plugin. Use com /mednotes:link, /mednotes:link-body e /mednotes:link-related.
4
+ ---
5
+
6
+ # Skill: link-medical-wiki
7
+
8
+ Resposta visível: `${extensionPath}/docs/workflow-output-contract.md`.
9
+
10
+ ## Pré-vôo (Hard Stops antes de qualquer comando)
11
+
12
+ Releia `${extensionPath}/docs/agent-prompt-hardening.md` antes de mutar.
13
+ Stop rules específicas deste workflow:
14
+
15
+ - C19 FSM_POLICY_BOUNDARY:
16
+ Adapter detecta fato. FSM decide política. CLI executa efeito.
17
+ Sem WorkflowEffect emitido pela FSM, não existe recovery automático.
18
+ blocked_reason, next_action, status e operation_payload não autorizam retry/recovery/apply.
19
+ - C13 OFFICIAL_ROUTE_ONLY: `related-notes-sync --recover-export --mode auto
20
+ --json` é a ÚNICA rota de recovery do export. Se ele bloquear, reportar e
21
+ parar. NÃO abrir Obsidian CLI direto, NÃO disparar comando do plugin
22
+ Related Notes por fora, NÃO escrever a seção `## 🔗 Notas Relacionadas`
23
+ por regex/manual.
24
+ - C14 NO_PARENT_SCHEMA: o agente pai NUNCA escreve
25
+ `note-semantic-ingestion.v1`. Só `med-link-graph-curator` emite esse
26
+ schema por `work_item`. Se já existir um output_path com objeto que parece
27
+ fabricado pelo pai (sem `agent_metrics`, `agent` errado, `primary_meaning`
28
+ como string, aliases sem `kind`/`link_policy`), invalide e relance o
29
+ subagent.
30
+ - C15 EVAL_TERMINAL: `eval-curator-batch` em `needs_review` é terminal. NÃO
31
+ editar `curator-prompt-eval.json` para `approved`. Regenerar outputs
32
+ (relançar curator com `error_context`) ou ajustar prompt; reavaliar; só
33
+ aplicar se passar limpo.
34
+ - C16 NO_EVAL_BYPASS_IN_PUBLIC: `--skip-prompt-eval` só com
35
+ `MEDNOTES_ALLOW_DEV_ESCAPE=1` + `--skip-prompt-eval-reason`. Em fluxo
36
+ público do usuário, nunca usar esse escape para destravar. Reportar
37
+ `needs_review` e parar.
38
+ - C17 GAP_IS_STOP: `contract_gap.missing_next_action` em qualquer payload do
39
+ batch = parar com `error_context`. Sem script, sem `@generalist`, sem
40
+ edição manual.
41
+ - C18 HARD_STOP_DECISION: `decision.kind=ask_human` ou
42
+ `human_decision_packet` pendente em qualquer payload canônico = HARD STOP.
43
+ Mostrar a pergunta/opções do pacote e parar. NÃO continuar recovery, reindex
44
+ ou curadoria automática até resposta do usuário. Campo técnico legado
45
+ `human_decision_required` não substitui essa verificação canônica.
46
+
47
+ ## Quando usar
48
+
49
+ Use para interconectar `Wiki_Medicina`, sincronizar `Notas Relacionadas`, curar
50
+ vocabulário do grafo, ou separar corpo/relacionadas. `/mednotes:link` é dono de
51
+ todo reparo de grafo: DB, meanings, aliases, body linker, Related Notes e
52
+ validação final. Não mantém índice Dataview.
53
+
54
+ ## Fonte canônica
55
+
56
+ - CLI pública: `${extensionPath}/scripts/mednotes/wiki/cli.py run-linker` com
57
+ `--diagnose` para plano salvo e `--apply --diagnosis <json>` para aplicar só
58
+ diagnóstico validado.
59
+ - Body-only: `run-linker --diagnose --no-related-notes --json`, seguido de
60
+ `run-linker --apply --no-related-notes --diagnosis <json> --json`.
61
+ - Related-only: `related-notes-sync --dry-run --json`, seguido de
62
+ `related-notes-sync --apply --receipt <json> --json`.
63
+ - Export stale do Related Notes: antes de instrução manual, use
64
+ `related-notes-sync --recover-export --mode auto --json`.
65
+ - No pacote completo de `/mednotes:link`, não trate uma única aplicação de
66
+ Related Notes como conclusão. Depois de mutar notas, revalide o export e
67
+ confira se a próxima prévia tem zero mudanças; caso ainda haja mudanças
68
+ seguras, continue pela rota oficial em vez de devolver isso ao usuário.
69
+ - Retry: se diagnóstico retornar
70
+ `skipped_reason=redundant_diagnosis_without_state_change`, não execute campo
71
+ legado como comando. Reuse o artefato indicado ou retome somente por
72
+ `agent_directive.control.effects`; `--force-diagnose` é escape técnico de
73
+ debugging.
74
+ - Regras semânticas: `${extensionPath}/docs/semantic-linker.md`.
75
+ - Prompt hardening: `${extensionPath}/docs/agent-prompt-hardening.md`.
76
+ - Recovery oficial do DB de vocabulário:
77
+ `${extensionPath}/docs/vocabulary-db-recovery.md`.
78
+ - Saída visível: `${extensionPath}/docs/workflow-output-contract.md`.
79
+ - Curadoria semântica é fase interna de /mednotes:link; se o diagnóstico emitir
80
+ `vocabulary_curator_batch_plan_path`, continue o batch e não encerre como
81
+ próximo passo manual.
82
+ - Em apply, `vocabulary_semantic_repair` resolve a fila simples pelo baseline
83
+ título/aliases antes de linkar; só pare em decisão humana ou erro operacional.
84
+
85
+ ## Fluxo
86
+
87
+ 1. Localize `${extensionPath}` e `<wiki/cli.py>`.
88
+ 2. Use `[paths].wiki_dir` do config como destino normal; `--wiki-dir` é override.
89
+ Vocabulary DB é a fonte operacional do body linker.
90
+ 3. Rode o diagnóstico auditável pela CLI pública:
91
+
92
+ ```bash
93
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" run-linker --diagnose --json
94
+ ```
95
+
96
+ 4. Revise `diagnosis_path`, blockers, `reference_repair.note_actions[]`,
97
+ `contextual_alias_disambiguation`, body linker e Related Notes. Ambiguidades reais
98
+ aparecem em `human_decision_packets[]`.
99
+ Para auditoria de grafo, use campos reais: `metrics`, `error_count`,
100
+ `warning_count`, `blocker_count` e agregação de `.errors[].code`. Não use
101
+ campos inexistentes como `broken_links`/`orphaned_notes`; `null` ou `0`
102
+ derivado de campo ausente é falha de schema. Para `run-linker --diagnose`,
103
+ trate campos técnicos como evidência de diagnóstico, não como rota
104
+ operacional paralela. A continuação pública vem do payload FSM/root
105
+ `agent_directive.control` ou do outcome tipado emitido pelo adapter oficial.
106
+ `related_notes_sync.blocked_reason` é evidência diagnóstica do adapter de
107
+ Related Notes, não uma segunda fonte de estado fora da FSM.
108
+ Para `vocabulary-status`, destaque `db_exists`, `queue_counts` e a ação
109
+ pública já normalizada no contrato.
110
+ Se o DB de vocabulário estiver ausente, o diagnóstico só registra
111
+ `vocabulary_bootstrap.status=planned`; ele não cria SQLite nem limpa notas.
112
+ Com notas a ingerir, `vocabulary_bootstrap_required` exige apply antes da curadoria.
113
+ Para DB ausente, rode `vocabulary-status --json` e use a rota pública
114
+ normalizada no payload fresco, que deve apontar rebuild:
115
+
116
+ ```bash
117
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" vocabulary-recover --mode rebuild-db --dry-run --plan-output "<rebuild-plan.json>" --json
118
+ ```
119
+
120
+ Para drift/SQLite/fila em DB existente, rode:
121
+
122
+ ```bash
123
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" vocabulary-status --json
124
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" vocabulary-recover --mode reconcile-queue --dry-run --plan-output "<recovery-plan.json>" --json
125
+ ```
126
+
127
+ Aplique recovery só com plano revisado e recibo:
128
+
129
+ ```bash
130
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" vocabulary-recover --mode <rebuild-db|reconcile-queue> --apply --plan "<recovery-plan.json>" --receipt "<recovery-receipt.json>" --json
131
+ ```
132
+
133
+ Aliases `requires_context` são avaliados no diagnóstico, com
134
+ `--llm-disambiguation auto`. Matches seguros de único alvo canônico são
135
+ resolvidos pelo script; ambiguidades médicas reais não podem abrir
136
+ `gemini -p` escondido e devem seguir orquestração oficial por agente/subagent
137
+ ou virar skip/defer.
138
+ Em `/mednotes:link`, o contrato público é FSM-first:
139
+ `progress_view_model`, `state_machine_snapshot`, `decision`, `receipt`,
140
+ `reports.public_report`, `agent_directive` e `diagnostic_context` quando
141
+ houver problema acionável. Campos técnicos de diagnóstico como `status`,
142
+ `blocked_reason` e `next_action` podem aparecer em payloads internos do
143
+ linker, mas não são fonte de verdade para concluir, bloquear ou responder ao
144
+ usuário.
145
+ Se o blocker for `vocabulary_semantic_ingestion_pending`, o apply deve
146
+ resolver `vocabulary_semantic_repair` e repetir o diagnóstico. Se sobrar
147
+ decisão humana, continue no mesmo `/mednotes:link`: use
148
+ `vocabulary_curator_batch_plan_path`, lance `med-link-graph-curator`, colete
149
+ outputs com `collect-curator-outputs`, valide e aplique. Só pare para o usuário se a
150
+ FSM expuser `decision.kind=ask_human`, `human_decision_packet` pendente ou
151
+ erro operacional real.
152
+
153
+ ```bash
154
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" plan-subagents --phase vocabulary-curation --vocabulary-db "<vocabulary.sqlite>" --output "<vocabulary-curator-batch-plan.json>" --json
155
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" collect-curator-outputs --plan "<vocabulary-curator-batch-plan.json>" --manifest "<manifest.json>" --json
156
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" eval-curator-batch --plan "<vocabulary-curator-batch-plan.json>" --outputs "<manifest.json>" --report "<curator-prompt-eval.json>" --json
157
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" apply-curator-batch --plan "<vocabulary-curator-batch-plan.json>" --outputs "<manifest.json>" --validate-only --json
158
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" apply-curator-batch --plan "<vocabulary-curator-batch-plan.json>" --outputs "<manifest.json>" --prompt-eval "<curator-prompt-eval.json>" --receipt "<receipt.json>" --json
159
+ ```
160
+
161
+ Não use `@generalist`: o agente pai é o único orquestrador; lance `med-link-graph-curator` diretamente por `work_items[]`.
162
+ Curator não edita Markdown nem chama subagente. Se `eval-curator-batch`
163
+ retornar `needs_review`, não aplique; corrija output/prompt e preserve o DB.
164
+ `--skip-prompt-eval` só é aceitável como escape técnico local com
165
+ `MEDNOTES_ALLOW_DEV_ESCAPE=1` e `--skip-prompt-eval-reason`; fluxo público
166
+ deve usar `--prompt-eval`.
167
+ Depois de aplicar o batch, repita `run-linker --diagnose` e aplique o plano
168
+ seguro.
169
+ Comandos mutantes geram `link-trigger-context.v1` e chamam o linker. Exceção:
170
+ mudança puramente visual por imagens/captions/frontmatter `images_*`.
171
+ 5. Se o diagnóstico estiver coerente e sem blockers, aplique o mesmo plano:
172
+
173
+ ```bash
174
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" run-linker --apply --diagnosis "<link-diagnosis.json>" --json
175
+ ```
176
+
177
+ Apply consome o diagnóstico salvo e não chama LLM.
178
+ Não repita `--wiki-dir`, `--catalog-path` ou `--vocabulary-db` quando o
179
+ diagnóstico salvo já contém esses caminhos, a menos que o comando peça
180
+ explicitamente. Use um `--receipt` novo por tentativa; recibo existente é
181
+ bloqueado para preservar a evidência.
182
+
183
+ 6. O JSON inclui `related_notes_sync`; com export do plugin, reescreve a seção
184
+ gerenciada. Sem export, fica `skipped`.
185
+ Se aparecer `related_notes_hash_mismatch` ou export stale, rode:
186
+
187
+ ```bash
188
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" related-notes-sync --recover-export --mode auto --json
189
+ ```
190
+
191
+ O recovery tenta Obsidian CLI, checa plugin/comandos e só então bloqueia com
192
+ fallback manual. Se o diagnóstico trouxer `body_only_fallback.safe=true`,
193
+ você pode oferecer `/mednotes:link-body`; nunca faça downgrade silencioso.
194
+ 7. Para atualizar somente WikiLinks no corpo, sem tocar `Notas Relacionadas`:
195
+
196
+ ```bash
197
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" run-linker --diagnose --no-related-notes --json
198
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" run-linker --apply --no-related-notes --diagnosis "<link-diagnosis.json>" --json
199
+ ```
200
+
201
+ 8. Para depurar a seção gerenciada sem rodar o linker completo:
202
+
203
+ ```bash
204
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" related-notes-sync --dry-run --json
205
+ ```
206
+
207
+ 9. Para aplicar somente a seção gerenciada, use o recibo:
208
+
209
+ ```bash
210
+ uv run python "${extensionPath}/scripts/mednotes/wiki/cli.py" related-notes-sync --apply --receipt "<receipt.json>" --json
211
+ ```
212
+
213
+ 10. Responda usando `workflow-output-contract.md`, sem despejar JSON bruto.
214
+
215
+ 11. Para gate de qualidade do body linker em CI, use `evaluate-body-linker`
216
+ com fixtures redigidas.
217
+
218
+ ## Limites
219
+
220
+ - Não use regex manual para linkar notas.
221
+ - Não preencha `Notas Relacionadas` com a heurística de vocabulário/catálogo;
222
+ a seção é gerenciada apenas pelo export do plugin.
223
+ - Não publique chats nem corrija estilo/YAML/taxonomia; este skill só linka
224
+ conteúdo já existente.
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: obsidian-cli
3
+ description: Use after obsidian-ops when the task needs the Obsidian CLI for a running Obsidian instance, vault search/read operations, generic note operations, properties, tasks, plugin development, theme debugging, DOM inspection, screenshots, or console/error capture.
4
+ ---
5
+
6
+ # Obsidian CLI
7
+
8
+ Workbench boundary: load `${extensionPath}/skills/obsidian-ops/SKILL.md`
9
+ first. For `Wiki_Medicina`, prefer `${extensionPath}/scripts/mednotes/wiki/cli.py`
10
+ and the `/mednotes:*` workflows when they cover the task. Use this skill for
11
+ generic Obsidian CLI mechanics, plugin/theme debugging, and syntax of the
12
+ `obsidian` command.
13
+
14
+ Resposta: `${extensionPath}/docs/workflow-output-contract.md`.
15
+
16
+ Upstream: vendored from `kepano/obsidian-skills` commit
17
+ `ac9398734fe719565809f7a6048b05c36b1ca38f`; MIT notice in
18
+ `${extensionPath}/skills/THIRD_PARTY_NOTICES.md`.
19
+
20
+ Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Obsidian to be open.
21
+
22
+ ## Command reference
23
+
24
+ Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli
25
+
26
+ ## Syntax
27
+
28
+ **Parameters** take a value with `=`. Quote values with spaces:
29
+
30
+ ```bash
31
+ obsidian create name="My Note" content="Hello world"
32
+ ```
33
+
34
+ **Flags** are boolean switches with no value:
35
+
36
+ ```bash
37
+ obsidian create name="My Note" silent overwrite
38
+ ```
39
+
40
+ For multiline content use `\n` for newline and `\t` for tab.
41
+
42
+ ## File targeting
43
+
44
+ Many commands accept `file` or `path` to target a file. Without either, the active file is used.
45
+
46
+ - `file=<name>` — resolves like a wikilink (name only, no path or extension needed)
47
+ - `path=<path>` — exact path from vault root, e.g. `folder/note.md`
48
+
49
+ ## Vault targeting
50
+
51
+ Commands target the most recently focused vault by default. Use `vault=<name>` as the first parameter to target a specific vault:
52
+
53
+ ```bash
54
+ obsidian vault="My Vault" search query="test"
55
+ ```
56
+
57
+ ## Common patterns
58
+
59
+ ```bash
60
+ obsidian read file="My Note"
61
+ obsidian create name="New Note" content="# Hello" template="Template" silent
62
+ obsidian append file="My Note" content="New line"
63
+ obsidian search query="search term" limit=10
64
+ obsidian daily:read
65
+ obsidian daily:append content="- [ ] New task"
66
+ obsidian property:set name="status" value="done" file="My Note"
67
+ obsidian tasks daily todo
68
+ obsidian tags sort=count counts
69
+ obsidian backlinks file="My Note"
70
+ ```
71
+
72
+ Use `--copy` on any command to copy output to clipboard. Use `silent` to prevent files from opening. Use `total` on list commands to get a count.
73
+
74
+ ## Plugin development
75
+
76
+ ### Develop/test cycle
77
+
78
+ After making code changes to a plugin or theme, follow this workflow:
79
+
80
+ 1. **Reload** the plugin to pick up changes:
81
+ ```bash
82
+ obsidian plugin:reload id=my-plugin
83
+ ```
84
+ 2. **Check for errors** — if errors appear, fix and repeat from step 1:
85
+ ```bash
86
+ obsidian dev:errors
87
+ ```
88
+ 3. **Verify visually** with a screenshot or DOM inspection:
89
+ ```bash
90
+ obsidian dev:screenshot path=screenshot.png
91
+ obsidian dev:dom selector=".workspace-leaf" text
92
+ ```
93
+ 4. **Check console output** for warnings or unexpected logs:
94
+ ```bash
95
+ obsidian dev:console level=error
96
+ ```
97
+
98
+ ### Additional developer commands
99
+
100
+ Run JavaScript in the app context:
101
+
102
+ ```bash
103
+ obsidian eval code="app.vault.getFiles().length"
104
+ ```
105
+
106
+ Inspect CSS values:
107
+
108
+ ```bash
109
+ obsidian dev:css selector=".workspace-leaf" prop=background-color
110
+ ```
111
+
112
+ Toggle mobile emulation:
113
+
114
+ ```bash
115
+ obsidian dev:mobile on
116
+ ```
117
+
118
+ Run `obsidian help` to see additional developer commands including CDP and debugger controls.
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: obsidian-markdown
3
+ description: Use after obsidian-ops when editing Obsidian Markdown syntax, wikilinks, embeds, callouts, properties/frontmatter, tags, comments, footnotes, Mermaid, or other Obsidian-specific Markdown constructs.
4
+ ---
5
+
6
+ # Obsidian Flavored Markdown Skill
7
+
8
+ Workbench boundary: load `${extensionPath}/skills/obsidian-ops/SKILL.md`
9
+ first. For medical notes, `${extensionPath}/docs/knowledge-architect.md` and
10
+ `${extensionPath}/docs/semantic-linker.md` override generic examples here for
11
+ frontmatter policy, managed related notes, footer, aliases and automatic links.
12
+
13
+ Resposta visível: `${extensionPath}/docs/workflow-output-contract.md`.
14
+
15
+ Upstream: vendored from `kepano/obsidian-skills` commit
16
+ `ac9398734fe719565809f7a6048b05c36b1ca38f`; MIT notice in
17
+ `${extensionPath}/skills/THIRD_PARTY_NOTICES.md`.
18
+
19
+ Create and edit valid Obsidian Flavored Markdown. Obsidian extends CommonMark and GFM with wikilinks, embeds, callouts, properties, comments, and other syntax. This skill covers only Obsidian-specific extensions -- standard Markdown (headings, bold, italic, lists, quotes, code blocks, tables) is assumed knowledge.
20
+
21
+ ## Workflow: Creating an Obsidian Note
22
+
23
+ 1. **Add frontmatter** with properties (title, tags, aliases) at the top of the file. See [PROPERTIES.md](references/PROPERTIES.md) for all property types.
24
+ 2. **Write content** using standard Markdown for structure, plus Obsidian-specific syntax below.
25
+ 3. **Link related notes** using wikilinks (`[[Note]]`) for internal vault connections, or standard Markdown links for external URLs.
26
+ 4. **Embed content** from other notes, images, or PDFs using the `![[embed]]` syntax. See [EMBEDS.md](references/EMBEDS.md) for all embed types.
27
+ 5. **Add callouts** for highlighted information using `> [!type]` syntax. See [CALLOUTS.md](references/CALLOUTS.md) for all callout types.
28
+ 6. **Verify** the note renders correctly in Obsidian's reading view.
29
+
30
+ > When choosing between wikilinks and Markdown links: use `[[wikilinks]]` for notes within the vault (Obsidian tracks renames automatically) and `[text](url)` for external URLs only.
31
+
32
+ ## Internal Links (Wikilinks)
33
+
34
+ ```markdown
35
+ [[Note Name]] Link to note
36
+ [[Note Name|Display Text]] Custom display text
37
+ [[Note Name#Heading]] Link to heading
38
+ [[Note Name#^block-id]] Link to block
39
+ [[#Heading in same note]] Same-note heading link
40
+ ```
41
+
42
+ Define a block ID by appending `^block-id` to any paragraph:
43
+
44
+ ```markdown
45
+ This paragraph can be linked to. ^my-block-id
46
+ ```
47
+
48
+ For lists and quotes, place the block ID on a separate line after the block:
49
+
50
+ ```markdown
51
+ > A quote block
52
+
53
+ ^quote-id
54
+ ```
55
+
56
+ ## Embeds
57
+
58
+ Prefix any wikilink with `!` to embed its content inline:
59
+
60
+ ```markdown
61
+ ![[Note Name]] Embed full note
62
+ ![[Note Name#Heading]] Embed section
63
+ ![[image.png]] Embed image
64
+ ![[image.png|300]] Embed image with width
65
+ ![[document.pdf#page=3]] Embed PDF page
66
+ ```
67
+
68
+ See [EMBEDS.md](references/EMBEDS.md) for audio, video, search embeds, and external images.
69
+
70
+ ## Callouts
71
+
72
+ ```markdown
73
+ > [!note]
74
+ > Basic callout.
75
+
76
+ > [!warning] Custom Title
77
+ > Callout with a custom title.
78
+
79
+ > [!faq]- Collapsed by default
80
+ > Foldable callout (- collapsed, + expanded).
81
+ ```
82
+
83
+ Common types: `note`, `tip`, `warning`, `info`, `example`, `quote`, `bug`, `danger`, `success`, `failure`, `question`, `abstract`, `todo`.
84
+
85
+ See [CALLOUTS.md](references/CALLOUTS.md) for the full list with aliases, nesting, and custom CSS callouts.
86
+
87
+ ## Properties (Frontmatter)
88
+
89
+ ```yaml
90
+ ---
91
+ title: My Note
92
+ date: 2024-01-15
93
+ tags:
94
+ - project
95
+ - active
96
+ aliases:
97
+ - Alternative Name
98
+ cssclasses:
99
+ - custom-class
100
+ ---
101
+ ```
102
+
103
+ Default properties: `tags` (searchable labels), `aliases` (alternative note names for link suggestions), `cssclasses` (CSS classes for styling).
104
+
105
+ See [PROPERTIES.md](references/PROPERTIES.md) for all property types, tag syntax rules, and advanced usage.
106
+
107
+ ## Tags
108
+
109
+ ```markdown
110
+ #tag Inline tag
111
+ #nested/tag Nested tag with hierarchy
112
+ ```
113
+
114
+ Tags can contain letters, numbers (not first character), underscores, hyphens, and forward slashes. Tags can also be defined in frontmatter under the `tags` property.
115
+
116
+ ## Comments
117
+
118
+ ```markdown
119
+ This is visible %%but this is hidden%% text.
120
+
121
+ %%
122
+ This entire block is hidden in reading view.
123
+ %%
124
+ ```
125
+
126
+ ## Obsidian-Specific Formatting
127
+
128
+ ```markdown
129
+ ==Highlighted text== Highlight syntax
130
+ ```
131
+
132
+ ## Math (LaTeX)
133
+
134
+ ```markdown
135
+ Inline: $e^{i\pi} + 1 = 0$
136
+
137
+ Block:
138
+ $$
139
+ \frac{a}{b} = c
140
+ $$
141
+ ```
142
+
143
+ ## Diagrams (Mermaid)
144
+
145
+ ````markdown
146
+ ```mermaid
147
+ graph TD
148
+ A[Start] --> B{Decision}
149
+ B -->|Yes| C[Do this]
150
+ B -->|No| D[Do that]
151
+ ```
152
+ ````
153
+
154
+ To link Mermaid nodes to Obsidian notes, add `class NodeName internal-link;`.
155
+
156
+ ## Footnotes
157
+
158
+ ```markdown
159
+ Text with a footnote[^1].
160
+
161
+ [^1]: Footnote content.
162
+
163
+ Inline footnote.^[This is inline.]
164
+ ```
165
+
166
+ ## Complete Example
167
+
168
+ ````markdown
169
+ ---
170
+ title: Project Alpha
171
+ date: 2024-01-15
172
+ tags:
173
+ - project
174
+ - active
175
+ status: in-progress
176
+ ---
177
+
178
+ # Project Alpha
179
+
180
+ This project aims to [[improve workflow]] using modern techniques.
181
+
182
+ > [!important] Key Deadline
183
+ > The first milestone is due on ==January 30th==.
184
+
185
+ ## Tasks
186
+
187
+ - [x] Initial planning
188
+ - [ ] Development phase
189
+ - [ ] Backend implementation
190
+ - [ ] Frontend design
191
+
192
+ ## Notes
193
+
194
+ The algorithm uses $O(n \log n)$ sorting. See [[Algorithm Notes#Sorting]] for details.
195
+
196
+ ![[Architecture Diagram.png|600]]
197
+
198
+ Reviewed in [[Meeting Notes 2024-01-10#Decisions]].
199
+ ````
200
+
201
+ ## References
202
+
203
+ - [Obsidian Flavored Markdown](https://help.obsidian.md/obsidian-flavored-markdown)
204
+ - [Internal links](https://help.obsidian.md/links)
205
+ - [Embed files](https://help.obsidian.md/embeds)
206
+ - [Callouts](https://help.obsidian.md/callouts)
207
+ - [Properties](https://help.obsidian.md/properties)
@@ -0,0 +1,58 @@
1
+ # Callouts Reference
2
+
3
+ ## Basic Callout
4
+
5
+ ```markdown
6
+ > [!note]
7
+ > This is a note callout.
8
+
9
+ > [!info] Custom Title
10
+ > This callout has a custom title.
11
+
12
+ > [!tip] Title Only
13
+ ```
14
+
15
+ ## Foldable Callouts
16
+
17
+ ```markdown
18
+ > [!faq]- Collapsed by default
19
+ > This content is hidden until expanded.
20
+
21
+ > [!faq]+ Expanded by default
22
+ > This content is visible but can be collapsed.
23
+ ```
24
+
25
+ ## Nested Callouts
26
+
27
+ ```markdown
28
+ > [!question] Outer callout
29
+ > > [!note] Inner callout
30
+ > > Nested content
31
+ ```
32
+
33
+ ## Supported Callout Types
34
+
35
+ | Type | Aliases | Color / Icon |
36
+ |------|---------|-------------|
37
+ | `note` | - | Blue, pencil |
38
+ | `abstract` | `summary`, `tldr` | Teal, clipboard |
39
+ | `info` | - | Blue, info |
40
+ | `todo` | - | Blue, checkbox |
41
+ | `tip` | `hint`, `important` | Cyan, flame |
42
+ | `success` | `check`, `done` | Green, checkmark |
43
+ | `question` | `help`, `faq` | Yellow, question mark |
44
+ | `warning` | `caution`, `attention` | Orange, warning |
45
+ | `failure` | `fail`, `missing` | Red, X |
46
+ | `danger` | `error` | Red, zap |
47
+ | `bug` | - | Red, bug |
48
+ | `example` | - | Purple, list |
49
+ | `quote` | `cite` | Gray, quote |
50
+
51
+ ## Custom Callouts (CSS)
52
+
53
+ ```css
54
+ .callout[data-callout="custom-type"] {
55
+ --callout-color: 255, 0, 0;
56
+ --callout-icon: lucide-alert-circle;
57
+ }
58
+ ```
@@ -0,0 +1,63 @@
1
+ # Embeds Reference
2
+
3
+ ## Embed Notes
4
+
5
+ ```markdown
6
+ ![[Note Name]]
7
+ ![[Note Name#Heading]]
8
+ ![[Note Name#^block-id]]
9
+ ```
10
+
11
+ ## Embed Images
12
+
13
+ ```markdown
14
+ ![[image.png]]
15
+ ![[image.png|640x480]] Width x Height
16
+ ![[image.png|300]] Width only (maintains aspect ratio)
17
+ ```
18
+
19
+ ## External Images
20
+
21
+ ```markdown
22
+ ![Alt text](https://example.com/image.png)
23
+ ![Alt text|300](https://example.com/image.png)
24
+ ```
25
+
26
+ ## Embed Audio
27
+
28
+ ```markdown
29
+ ![[audio.mp3]]
30
+ ![[audio.ogg]]
31
+ ```
32
+
33
+ ## Embed PDF
34
+
35
+ ```markdown
36
+ ![[document.pdf]]
37
+ ![[document.pdf#page=3]]
38
+ ![[document.pdf#height=400]]
39
+ ```
40
+
41
+ ## Embed Lists
42
+
43
+ ```markdown
44
+ ![[Note#^list-id]]
45
+ ```
46
+
47
+ Where the list has a block ID:
48
+
49
+ ```markdown
50
+ - Item 1
51
+ - Item 2
52
+ - Item 3
53
+
54
+ ^list-id
55
+ ```
56
+
57
+ ## Embed Search Results
58
+
59
+ ````markdown
60
+ ```query
61
+ tag:#project status:done
62
+ ```
63
+ ````