@brainpilot/skills 0.0.11 → 0.0.13

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 (405) hide show
  1. package/package.json +1 -1
  2. package/skills/01_Meta-Skills/workflow-skill-creator/SKILL.md +288 -0
  3. package/skills/01_Meta-Skills/workflow-skill-creator/references/cli_script_template.py +217 -0
  4. package/skills/06_fMRI_Neuroimaging/fmriprep/SKILL.md +256 -0
  5. package/skills/06_fMRI_Neuroimaging/fmriprep/references/bids-filter.md +287 -0
  6. package/skills/06_fMRI_Neuroimaging/fmriprep/references/citation.md +284 -0
  7. package/skills/06_fMRI_Neuroimaging/fmriprep/references/cli-reference.md +260 -0
  8. package/skills/06_fMRI_Neuroimaging/fmriprep/references/confounds.md +344 -0
  9. package/skills/06_fMRI_Neuroimaging/fmriprep/references/installation.md +346 -0
  10. package/skills/06_fMRI_Neuroimaging/fmriprep/references/outputs.md +369 -0
  11. package/skills/06_fMRI_Neuroimaging/fmriprep/references/sdc-fieldmaps.md +306 -0
  12. package/skills/06_fMRI_Neuroimaging/fmriprep/references/spaces.md +334 -0
  13. package/skills/06_fMRI_Neuroimaging/fmriprep/references/troubleshooting-faq.md +419 -0
  14. package/skills/06_fMRI_Neuroimaging/fmriprep/references/usage-examples.md +465 -0
  15. package/skills/06_fMRI_Neuroimaging/fmriprep/references/versions-dependencies.md +228 -0
  16. package/skills/06_fMRI_Neuroimaging/fmriprep/references/workflows.md +392 -0
  17. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/SKILL.md +212 -0
  18. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/datasets.md +252 -0
  19. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/interface-plotting.md +238 -0
  20. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/metrics.md +236 -0
  21. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/networks.md +273 -0
  22. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/spatial-modularity.md +291 -0
  23. package/skills/06_fMRI_Neuroimaging/netneurotools-guide/references/stats.md +290 -0
  24. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/SKILL.md +116 -0
  25. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/references/citation.bib +58 -0
  26. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/scripts/analyze_pae.py +212 -0
  27. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/scripts/analyze_plddt.py +125 -0
  28. package/skills/09_Cellular_Molecular_Neuroscience/alphafold-database-fetch-and-analyze/scripts/fetch_structure.py +168 -0
  29. package/skills/09_Cellular_Molecular_Neuroscience/gtex-database/SKILL.md +176 -0
  30. package/skills/09_Cellular_Molecular_Neuroscience/gtex-database/references/citation.bib +14 -0
  31. package/skills/09_Cellular_Molecular_Neuroscience/gtex-database/scripts/gtex_cli.py +281 -0
  32. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/SKILL.md +181 -0
  33. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/references/citation.bib +14 -0
  34. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/references/search-api.md +137 -0
  35. package/skills/09_Cellular_Molecular_Neuroscience/human-protein-atlas-database/scripts/hpa_cli.py +263 -0
  36. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/SKILL.md +169 -0
  37. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/references/citation.bib +15 -0
  38. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/download_coordinate_files.py +113 -0
  39. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/fetch_pdb_metadata.py +70 -0
  40. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/fetch_schema.py +251 -0
  41. package/skills/09_Cellular_Molecular_Neuroscience/pdb-database/scripts/search_pdb.py +187 -0
  42. package/skills/09_Cellular_Molecular_Neuroscience/pymol/SKILL.md +146 -0
  43. package/skills/09_Cellular_Molecular_Neuroscience/pymol/references/PYMOL_REFERENCE.md +160 -0
  44. package/skills/09_Cellular_Molecular_Neuroscience/pymol/references/RECIPES.md +348 -0
  45. package/skills/09_Cellular_Molecular_Neuroscience/pymol/references/citation.bib +6 -0
  46. package/skills/17_Literature_Databases/literature-search-arxiv/SKILL.md +120 -0
  47. package/skills/17_Literature_Databases/literature-search-arxiv/references/citation.bib +18 -0
  48. package/skills/17_Literature_Databases/literature-search-arxiv/references/query_syntax.md +34 -0
  49. package/skills/17_Literature_Databases/literature-search-arxiv/scripts/download_paper.py +116 -0
  50. package/skills/17_Literature_Databases/literature-search-arxiv/scripts/download_paper_source.py +98 -0
  51. package/skills/17_Literature_Databases/literature-search-arxiv/scripts/search_arxiv.py +174 -0
  52. package/skills/17_Literature_Databases/literature-search-biorxiv/SKILL.md +169 -0
  53. package/skills/17_Literature_Databases/literature-search-biorxiv/references/citation.bib +12 -0
  54. package/skills/17_Literature_Databases/literature-search-biorxiv/scripts/search_by_dates.py +297 -0
  55. package/skills/17_Literature_Databases/literature-search-biorxiv/scripts/search_by_doi.py +72 -0
  56. package/skills/17_Literature_Databases/literature-search-europepmc/SKILL.md +229 -0
  57. package/skills/17_Literature_Databases/literature-search-europepmc/references/citation.bib +15 -0
  58. package/skills/17_Literature_Databases/literature-search-europepmc/scripts/europepmc_api.py +345 -0
  59. package/skills/17_Literature_Databases/literature-search-openalex/SKILL.md +169 -0
  60. package/skills/17_Literature_Databases/literature-search-openalex/references/authors.md +78 -0
  61. package/skills/17_Literature_Databases/literature-search-openalex/references/citation.bib +8 -0
  62. package/skills/17_Literature_Databases/literature-search-openalex/references/geo_and_language.md +37 -0
  63. package/skills/17_Literature_Databases/literature-search-openalex/references/institutions.md +64 -0
  64. package/skills/17_Literature_Databases/literature-search-openalex/references/publishers_funders.md +42 -0
  65. package/skills/17_Literature_Databases/literature-search-openalex/references/sources.md +79 -0
  66. package/skills/17_Literature_Databases/literature-search-openalex/references/taxonomy.md +52 -0
  67. package/skills/17_Literature_Databases/literature-search-openalex/references/topics.md +29 -0
  68. package/skills/17_Literature_Databases/literature-search-openalex/references/type_values.md +65 -0
  69. package/skills/17_Literature_Databases/literature-search-openalex/references/works.md +304 -0
  70. package/skills/17_Literature_Databases/literature-search-openalex/scripts/openalex_cli.py +633 -0
  71. package/skills/17_Literature_Databases/pubmed-database/SKILL.md +185 -0
  72. package/skills/17_Literature_Databases/pubmed-database/references/advanced-linking.md +128 -0
  73. package/skills/17_Literature_Databases/pubmed-database/references/advanced-search.md +98 -0
  74. package/skills/17_Literature_Databases/pubmed-database/references/bulk-workflows.md +88 -0
  75. package/skills/17_Literature_Databases/pubmed-database/references/citation-matching.md +155 -0
  76. package/skills/17_Literature_Databases/pubmed-database/references/citation.bib +15 -0
  77. package/skills/17_Literature_Databases/pubmed-database/references/cross-database-linking.md +93 -0
  78. package/skills/17_Literature_Databases/pubmed-database/references/fetch-and-resolve.md +125 -0
  79. package/skills/17_Literature_Databases/pubmed-database/references/search-and-discovery.md +106 -0
  80. package/skills/17_Literature_Databases/pubmed-database/references/utilities.md +42 -0
  81. package/skills/17_Literature_Databases/pubmed-database/scripts/pubmed_api.py +715 -0
  82. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/SKILL.md +251 -0
  83. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/pyproject.toml +15 -0
  84. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/references/citation.bib +12 -0
  85. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/analyze_ism.py +334 -0
  86. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/generate_ontology_mapping.py +170 -0
  87. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/interpret_splicing.py +305 -0
  88. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/lookup_gene_info.py +337 -0
  89. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/resolve_ontology_terms.py +155 -0
  90. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/visualize_genome_tracks.py +402 -0
  91. package/skills/18_Genetics_Genomics/alphagenome-single-variant-analysis/scripts/visualize_variant_effects.py +1198 -0
  92. package/skills/18_Genetics_Genomics/clinvar-database/SKILL.md +370 -0
  93. package/skills/18_Genetics_Genomics/clinvar-database/references/citation.bib +23 -0
  94. package/skills/18_Genetics_Genomics/clinvar-database/scripts/clinvar_api.py +711 -0
  95. package/skills/18_Genetics_Genomics/dbsnp-database/SKILL.md +350 -0
  96. package/skills/18_Genetics_Genomics/dbsnp-database/references/api-notes.md +88 -0
  97. package/skills/18_Genetics_Genomics/dbsnp-database/references/citation.bib +12 -0
  98. package/skills/18_Genetics_Genomics/dbsnp-database/scripts/dbsnp_cli.py +625 -0
  99. package/skills/18_Genetics_Genomics/gnomad-database/SKILL.md +73 -0
  100. package/skills/18_Genetics_Genomics/gnomad-database/references/citation.bib +14 -0
  101. package/skills/18_Genetics_Genomics/gnomad-database/scripts/get_gene_constraint.py +90 -0
  102. package/skills/18_Genetics_Genomics/gnomad-database/scripts/get_variant_frequency.py +181 -0
  103. package/skills/18_Genetics_Genomics/gnomad-database/scripts/search_variants.py +207 -0
  104. package/skills/19_Pharmacology/chembl-database/SKILL.md +283 -0
  105. package/skills/19_Pharmacology/chembl-database/references/api_endpoints.md +97 -0
  106. package/skills/19_Pharmacology/chembl-database/references/citation.bib +30 -0
  107. package/skills/19_Pharmacology/chembl-database/scripts/chembl_api.py +657 -0
  108. package/skills/19_Pharmacology/clinical-trials-database/SKILL.md +378 -0
  109. package/skills/19_Pharmacology/clinical-trials-database/references/citation.bib +11 -0
  110. package/skills/19_Pharmacology/clinical-trials-database/references/clinical_trials_api.md +187 -0
  111. package/skills/19_Pharmacology/clinical-trials-database/references/studies_schema.md +143 -0
  112. package/skills/19_Pharmacology/clinical-trials-database/scripts/clinical_trials_api.py +373 -0
  113. package/skills/19_Pharmacology/openfda-database/SKILL.md +225 -0
  114. package/skills/19_Pharmacology/openfda-database/references/api_endpoints.md +207 -0
  115. package/skills/19_Pharmacology/openfda-database/references/citation.bib +15 -0
  116. package/skills/19_Pharmacology/openfda-database/references/recipes.md +150 -0
  117. package/skills/19_Pharmacology/openfda-database/scripts/openfda_query.py +505 -0
  118. package/skills/19_Pharmacology/opentargets-database/SKILL.md +198 -0
  119. package/skills/19_Pharmacology/opentargets-database/references/OpenTargets_GraphQL_Guide.md +216 -0
  120. package/skills/19_Pharmacology/opentargets-database/references/citation.bib +15 -0
  121. package/skills/19_Pharmacology/opentargets-database/scripts/query_opentargets.py +533 -0
  122. package/skills/19_Pharmacology/pubchem-database/SKILL.md +164 -0
  123. package/skills/19_Pharmacology/pubchem-database/references/citation.bib +15 -0
  124. package/skills/19_Pharmacology/pubchem-database/references/endpoints.md +71 -0
  125. package/skills/19_Pharmacology/pubchem-database/references/workflows.md +32 -0
  126. package/skills/19_Pharmacology/pubchem-database/scripts/pubchem_api.py +327 -0
  127. package/skills/20_Infrastructure/uv/SKILL.md +30 -0
  128. package/skills/01_Meta-Skills/academic-research-hub/SKILL.md +0 -108
  129. package/skills/01_Meta-Skills/academic-research-hub/scripts/requirements.txt +0 -17
  130. package/skills/01_Meta-Skills/academic-research-hub/scripts/research.py +0 -781
  131. package/skills/01_Meta-Skills/beautiful-log/SKILL.md +0 -64
  132. package/skills/01_Meta-Skills/beautiful-log/scripts/beautiful_log.py +0 -274
  133. package/skills/01_Meta-Skills/ethoclaw-daily-paper/SKILL.md +0 -130
  134. package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/config.template.yaml +0 -54
  135. package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/top5_digest_template.md +0 -5
  136. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/build_top5_digest.py +0 -300
  137. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/common.py +0 -137
  138. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/merge_results.py +0 -106
  139. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/run_pipeline.py +0 -177
  140. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_arxiv.py +0 -162
  141. package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_pubmed.py +0 -202
  142. package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/SKILL.md +0 -173
  143. package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/scripts/normalize_data.py +0 -874
  144. package/skills/01_Meta-Skills/ethoclaw-pdf-research/SKILL.md +0 -134
  145. package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/confirmation-prompts.md +0 -31
  146. package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/output-patterns.md +0 -45
  147. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_markdown_deliverables.py +0 -41
  148. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_research_log.py +0 -84
  149. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_summary_md.py +0 -63
  150. package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/extract_pdf_bundle.py +0 -140
  151. package/skills/01_Meta-Skills/experiment-controller/SKILL.md +0 -140
  152. package/skills/01_Meta-Skills/knowledge-graph-builder/SKILL.md +0 -366
  153. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/entity_resolution.py +0 -120
  154. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/extraction_prompt_template.txt +0 -19
  155. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/graph_query.py +0 -106
  156. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/hypothesis_cli_reference.py +0 -42
  157. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/new_data_source_template.py +0 -116
  158. package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/requirements.txt +0 -15
  159. package/skills/01_Meta-Skills/method-design/SKILL.md +0 -61
  160. package/skills/01_Meta-Skills/multi-search-engine/SKILL.md +0 -119
  161. package/skills/01_Meta-Skills/research-idea/SKILL.md +0 -65
  162. package/skills/05_EEG_ERP/eeg-skill/SKILL.md +0 -197
  163. package/skills/05_EEG_ERP/meg-skill/SKILL.md +0 -188
  164. package/skills/05_EEG_ERP/meg-skill/scripts/time_frequency.py +0 -223
  165. package/skills/05_EEG_ERP/mne-eeg-tool/SKILL.md +0 -165
  166. package/skills/05_EEG_ERP/mne-eeg-tool/scripts/eeg_pipeline_reference.py +0 -231
  167. package/skills/05_EEG_ERP/seed-iv-skill/SKILL.md +0 -184
  168. package/skills/05_EEG_ERP/seed-iv-skill/scripts/classify_seed_iv.py +0 -154
  169. package/skills/05_EEG_ERP/seed-iv-skill/scripts/extract_seed_iv_features.py +0 -190
  170. package/skills/05_EEG_ERP/seed-iv-skill/scripts/validate_seed_iv.py +0 -102
  171. package/skills/05_EEG_ERP/seed-vig-skill/SKILL.md +0 -182
  172. package/skills/05_EEG_ERP/seed-vig-skill/scripts/classify_seed_vig.py +0 -165
  173. package/skills/05_EEG_ERP/seed-vig-skill/scripts/extract_seed_vig_features.py +0 -185
  174. package/skills/05_EEG_ERP/seed-vig-skill/scripts/validate_seed_vig.py +0 -88
  175. package/skills/06_fMRI_Neuroimaging/abcd-skill/SKILL.md +0 -308
  176. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/abcd_qc_summary.py +0 -449
  177. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/extract_abcd_phenotype.py +0 -292
  178. package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/reorganize_abcd.py +0 -387
  179. package/skills/06_fMRI_Neuroimaging/abide-skill/SKILL.md +0 -302
  180. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/abide_qc_summary.py +0 -317
  181. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/extract_abide_phenotype.py +0 -267
  182. package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/reorganize_abide.py +0 -387
  183. package/skills/06_fMRI_Neuroimaging/adhd200-skill/SKILL.md +0 -244
  184. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/adhd200_qc_summary.py +0 -98
  185. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/extract_adhd200_phenotype.py +0 -134
  186. package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/reorganize_adhd200.py +0 -206
  187. package/skills/06_fMRI_Neuroimaging/adni-skill/SKILL.md +0 -358
  188. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_adni_task_files.py +0 -1305
  189. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_vqa_from_tasks.py +0 -766
  190. package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/reorganize_adni.py +0 -491
  191. package/skills/06_fMRI_Neuroimaging/aibl-skill/SKILL.md +0 -295
  192. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/aibl_qc_summary.py +0 -260
  193. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/extract_aibl_phenotype.py +0 -365
  194. package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/reorganize_aibl.py +0 -394
  195. package/skills/06_fMRI_Neuroimaging/aomic-skill/SKILL.md +0 -292
  196. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/aomic_qc_summary.py +0 -258
  197. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/extract_aomic_phenotype.py +0 -284
  198. package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/reorganize_aomic.py +0 -322
  199. package/skills/06_fMRI_Neuroimaging/asl-skill/SKILL.md +0 -168
  200. package/skills/06_fMRI_Neuroimaging/asl-skill/scripts/compute_cbf.py +0 -224
  201. package/skills/06_fMRI_Neuroimaging/bids-organizer/SKILL.md +0 -241
  202. package/skills/06_fMRI_Neuroimaging/bold5000-skill/SKILL.md +0 -186
  203. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/bold5000_qc_summary.py +0 -96
  204. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/extract_bold5000_stimulus.py +0 -125
  205. package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/reorganize_bold5000.py +0 -102
  206. package/skills/06_fMRI_Neuroimaging/camcan-skill/SKILL.md +0 -213
  207. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/camcan_qc_summary.py +0 -131
  208. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/extract_camcan_phenotype.py +0 -145
  209. package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/validate_camcan.py +0 -141
  210. package/skills/06_fMRI_Neuroimaging/cobre-skill/SKILL.md +0 -201
  211. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/cobre_qc_summary.py +0 -95
  212. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/extract_cobre_phenotype.py +0 -104
  213. package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/reorganize_cobre.py +0 -140
  214. package/skills/06_fMRI_Neuroimaging/conn-tool/SKILL.md +0 -180
  215. package/skills/06_fMRI_Neuroimaging/dcm2nii/SKILL.md +0 -189
  216. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/SKILL.md +0 -183
  217. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/dmt_har_med_qc_summary.py +0 -96
  218. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/extract_dmt_har_med_phenotype.py +0 -121
  219. package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/reorganize_dmt_har_med.py +0 -125
  220. package/skills/06_fMRI_Neuroimaging/dwi-skill/SKILL.md +0 -359
  221. package/skills/06_fMRI_Neuroimaging/fmri-skill/SKILL.md +0 -371
  222. package/skills/06_fMRI_Neuroimaging/fmriprep-tool/SKILL.md +0 -228
  223. package/skills/06_fMRI_Neuroimaging/freesurfer-tool/SKILL.md +0 -286
  224. package/skills/06_fMRI_Neuroimaging/freesurfer-tool/scripts/freesurfer_processor.py +0 -145
  225. package/skills/06_fMRI_Neuroimaging/fsl-tool/SKILL.md +0 -208
  226. package/skills/06_fMRI_Neuroimaging/hbn-skill/SKILL.md +0 -271
  227. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/extract_hbn_phenotype.py +0 -107
  228. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/hbn_qc_summary.py +0 -96
  229. package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/reorganize_hbn.py +0 -150
  230. package/skills/06_fMRI_Neuroimaging/hcpa-skill/SKILL.md +0 -210
  231. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/extract_hcpa_phenotype.py +0 -146
  232. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/hcpa_qc_summary.py +0 -120
  233. package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/reorganize_hcpa.py +0 -155
  234. package/skills/06_fMRI_Neuroimaging/hcpd-skill/SKILL.md +0 -210
  235. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/extract_hcpd_phenotype.py +0 -148
  236. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/hcpd_qc_summary.py +0 -125
  237. package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/reorganize_hcpd.py +0 -146
  238. package/skills/06_fMRI_Neuroimaging/hcpep-skill/SKILL.md +0 -215
  239. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/extract_hcpep_phenotype.py +0 -157
  240. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/hcpep_qc_summary.py +0 -143
  241. package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/reorganize_hcpep.py +0 -146
  242. package/skills/06_fMRI_Neuroimaging/hcppipeline-tool/SKILL.md +0 -217
  243. package/skills/06_fMRI_Neuroimaging/hcpya-skill/SKILL.md +0 -214
  244. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/extract_hcpya_phenotype.py +0 -190
  245. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/hcpya_qc_summary.py +0 -152
  246. package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/reorganize_hcpya.py +0 -203
  247. package/skills/06_fMRI_Neuroimaging/ixi-skill/SKILL.md +0 -198
  248. package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/ixi_qc_summary.py +0 -137
  249. package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/reorganize_ixi.py +0 -190
  250. package/skills/06_fMRI_Neuroimaging/mnd-skill/SKILL.md +0 -191
  251. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/extract_mnd_phenotype.py +0 -143
  252. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/mnd_qc_summary.py +0 -120
  253. package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/validate_mnd.py +0 -107
  254. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/SKILL.md +0 -203
  255. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/analyze_lesions.py +0 -119
  256. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/longitudinal_lesion.py +0 -148
  257. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/mschallenge_qc_summary.py +0 -132
  258. package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/validate_mschallenge.py +0 -116
  259. package/skills/06_fMRI_Neuroimaging/nibabel-skill/SKILL.md +0 -184
  260. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/atlas_coordinate_reference.py +0 -61
  261. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/freesurfer_io_reference.py +0 -34
  262. package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/nifti_inspection_reference.py +0 -35
  263. package/skills/06_fMRI_Neuroimaging/nifd-skill/SKILL.md +0 -205
  264. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/extract_nifd_phenotype.py +0 -132
  265. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/nifd_qc_summary.py +0 -111
  266. package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/validate_nifd.py +0 -111
  267. package/skills/06_fMRI_Neuroimaging/nii2dcm/SKILL.md +0 -143
  268. package/skills/06_fMRI_Neuroimaging/nilearn-tool/SKILL.md +0 -266
  269. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/connectome_reference.py +0 -65
  270. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/denoise_timeseries_reference.py +0 -58
  271. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/hierarchical_parcellation_reference.py +0 -53
  272. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/kmeans_parcellation_reference.py +0 -53
  273. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/preprocess_bold_reference.py +0 -76
  274. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_dictlearning_reference.py +0 -56
  275. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_ica_reference.py +0 -59
  276. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/second_level_glm_reference.py +0 -58
  277. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/spacenet_classifier_reference.py +0 -59
  278. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/svm_classifier_reference.py +0 -60
  279. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/task_glm_reference.py +0 -63
  280. package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/zalff_summary_reference.py +0 -109
  281. package/skills/06_fMRI_Neuroimaging/nsd-skill/SKILL.md +0 -210
  282. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/extract_nsd_stimulus.py +0 -171
  283. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/nsd_qc_summary.py +0 -142
  284. package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/validate_nsd.py +0 -142
  285. package/skills/06_fMRI_Neuroimaging/oasis-skill/SKILL.md +0 -205
  286. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/extract_oasis_phenotype.py +0 -126
  287. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/oasis_qc_summary.py +0 -115
  288. package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/validate_oasis.py +0 -119
  289. package/skills/06_fMRI_Neuroimaging/pet-skill/SKILL.md +0 -173
  290. package/skills/06_fMRI_Neuroimaging/pet-skill/scripts/compute_suvr.py +0 -202
  291. package/skills/06_fMRI_Neuroimaging/pnc-skill/SKILL.md +0 -206
  292. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/extract_pnc_phenotype.py +0 -136
  293. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/pnc_qc_summary.py +0 -116
  294. package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/validate_pnc.py +0 -120
  295. package/skills/06_fMRI_Neuroimaging/ppmi-skill/SKILL.md +0 -209
  296. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/extract_ppmi_phenotype.py +0 -138
  297. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/ppmi_qc_summary.py +0 -111
  298. package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/validate_ppmi.py +0 -117
  299. package/skills/06_fMRI_Neuroimaging/qsiprep-tool/SKILL.md +0 -320
  300. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/SKILL.md +0 -215
  301. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/extract_rest_mdd_phenotype.py +0 -132
  302. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/harmonize_sites.py +0 -152
  303. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/rest_mdd_qc_summary.py +0 -124
  304. package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py +0 -103
  305. package/skills/06_fMRI_Neuroimaging/smri-skill/SKILL.md +0 -302
  306. package/skills/06_fMRI_Neuroimaging/tcp-skill/SKILL.md +0 -204
  307. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/extract_tcp_phenotype.py +0 -139
  308. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/tcp_qc_summary.py +0 -111
  309. package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/validate_tcp.py +0 -99
  310. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/SKILL.md +0 -217
  311. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/extract_ucla_cnp_phenotype.py +0 -145
  312. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/ucla_cnp_qc_summary.py +0 -111
  313. package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/validate_ucla_cnp.py +0 -113
  314. package/skills/06_fMRI_Neuroimaging/ukb-skill/SKILL.md +0 -310
  315. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/build_ukb_survival.py +0 -210
  316. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_cases.py +0 -308
  317. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_phenotype.py +0 -232
  318. package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/ukb_qc_summary.py +0 -158
  319. package/skills/06_fMRI_Neuroimaging/wmh-segmentation/SKILL.md +0 -133
  320. package/skills/07_Computational_Modeling/detrending/SKILL.md +0 -118
  321. package/skills/07_Computational_Modeling/dictlearning/SKILL.md +0 -122
  322. package/skills/07_Computational_Modeling/filtering/SKILL.md +0 -121
  323. package/skills/07_Computational_Modeling/glm/SKILL.md +0 -153
  324. package/skills/07_Computational_Modeling/hierarchical/SKILL.md +0 -121
  325. package/skills/07_Computational_Modeling/ica/SKILL.md +0 -122
  326. package/skills/07_Computational_Modeling/kmeans/SKILL.md +0 -119
  327. package/skills/07_Computational_Modeling/run_models/SKILL.md +0 -427
  328. package/skills/07_Computational_Modeling/spacenet/SKILL.md +0 -122
  329. package/skills/07_Computational_Modeling/svm/SKILL.md +0 -120
  330. package/skills/08_Computational_Neuroscience/brain_gnn/SKILL.md +0 -183
  331. package/skills/08_Computational_Neuroscience/dipy-tool/SKILL.md +0 -239
  332. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/dti_metrics_reference.py +0 -70
  333. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/load_and_mask_reference.py +0 -76
  334. package/skills/08_Computational_Neuroscience/dipy-tool/scripts/roi_stats_reference.py +0 -59
  335. package/skills/08_Computational_Neuroscience/fm_app/SKILL.md +0 -195
  336. package/skills/08_Computational_Neuroscience/neurostorm/SKILL.md +0 -151
  337. package/skills/13_Visualization/brain-visualization/SKILL.md +0 -191
  338. package/skills/13_Visualization/brain-visualization/scripts/connectome_reference.py +0 -108
  339. package/skills/13_Visualization/brain-visualization/scripts/freesurfer_ply_reference.py +0 -54
  340. package/skills/13_Visualization/brain-visualization/scripts/zalff_summary_reference.py +0 -116
  341. package/skills/13_Visualization/ethoclaw-paper-figure-layout/SKILL.md +0 -78
  342. package/skills/13_Visualization/ethoclaw-paper-figure-layout/assets/naturecomm_figures.tex +0 -74
  343. package/skills/13_Visualization/ethoclaw-paper-figure-layout/scripts/layout_results_foldered.py +0 -579
  344. package/skills/14_Writing/overleaf-skill/SKILL.md +0 -184
  345. package/skills/14_Writing/overleaf-skill/scripts/install.sh +0 -30
  346. package/skills/14_Writing/paper-writing/SKILL.md +0 -146
  347. package/skills/14_Writing/paper-writing/scripts/data_statement_templates.py +0 -164
  348. package/skills/14_Writing/paper-writing/scripts/figure_templates.py +0 -315
  349. package/skills/14_Writing/paper-writing/scripts/nature_figure_style.py +0 -214
  350. package/skills/14_Writing/paper-writing/scripts/section_phrasebank.py +0 -246
  351. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/SKILL.md +0 -274
  352. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.html +0 -112
  353. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.md +0 -21
  354. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/cluster-section.md +0 -5
  355. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/heatmap-section.md +0 -5
  356. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/integrated-interpretation.md +0 -3
  357. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/overview.md +0 -3
  358. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/project-summary.md +0 -3
  359. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/radar-section.md +0 -5
  360. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/raw-trajectory.md +0 -3
  361. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/sample-check.md +0 -3
  362. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/single-subject-section.md +0 -3
  363. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/stats-section.md +0 -5
  364. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/epm.md +0 -52
  365. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/fst.md +0 -37
  366. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/nor.md +0 -39
  367. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/oft.md +0 -43
  368. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tcst.md +0 -45
  369. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tst.md +0 -36
  370. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/input-types.md +0 -59
  371. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/interpretation-guardrails.md +0 -45
  372. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/metadata-schema.md +0 -57
  373. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/report-sections.md +0 -86
  374. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/section-selection-rules.md +0 -169
  375. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/build_report_manifest.py +0 -27
  376. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/render_report.py +0 -34
  377. package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/report_utils.py +0 -1121
  378. package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/SKILL.md +0 -390
  379. package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/reference_code.py +0 -98
  380. package/skills/16_Animal_Behavior/ethoclaw-animal-pose-estimation/SKILL.md +0 -336
  381. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/README.md +0 -21
  382. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/SKILL.md +0 -41
  383. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/batch_kinematic_generator.py +0 -663
  384. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/config.json +0 -19
  385. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/generate_kinematic_parameter.py +0 -401
  386. package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/kinematic_generator.py +0 -265
  387. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/SKILL.md +0 -72
  388. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/references/config.example.toml +0 -56
  389. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params.py +0 -232
  390. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params_from_config.py +0 -236
  391. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/SKILL.md +0 -68
  392. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/references/notes.md +0 -5
  393. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/scripts/plot_h5_radar.py +0 -513
  394. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/SKILL.md +0 -52
  395. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/config.toml +0 -81
  396. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/references/stats-rule.md +0 -18
  397. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_inspect.py +0 -79
  398. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_batch.py +0 -624
  399. package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_stats.py +0 -438
  400. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/SKILL.md +0 -280
  401. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_trajectory.py +0 -790
  402. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_velocity.py +0 -855
  403. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.csv +0 -101
  404. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.h5 +0 -0
  405. package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_data_readme.md +0 -126
@@ -1,366 +0,0 @@
1
- ---
2
- name: knowledge-graph-builder
3
- description: "Use this skill when users need to build, populate, or extend a domain-specific knowledge graph from literature and structured databases. Triggers include: 'build knowledge graph', 'extract claims from papers', 'ingest data into graph', 'batch extract claims', 'knowledge graph construction', 'populate graph from PubMed', 'extract structured claims', 'ingest atlas data', or any request involving knowledge graph population from scientific literature or biomedical databases. Covers both structured data ingestion (Phase 1) and LLM-based claim extraction from papers (Phase 2)."
4
- license: MIT License (NeuroClaw custom skill – freely modifiable within the project)
5
- layer: base
6
- skill_type: tool
7
- dependencies:
8
- - multi-search-engine
9
- - academic-research-hub
10
- ---
11
- # Knowledge Graph Builder
12
-
13
- ## Overview
14
-
15
- This skill provides a reusable framework for constructing domain-specific knowledge graphs by combining two complementary data pipelines:
16
-
17
- - **Phase 1 — Structured Ingestion**: Import concepts and relations from curated databases, ontologies, and brain atlases (e.g., NeuroNames, MeSH, DisGeNET, Cognitive Atlas, Nilearn atlases).
18
- - **Phase 2 — Literature Claim Extraction**: Use LLMs to extract structured scientific claims from PubMed paper abstracts, then resolve entities and ingest into the graph.
19
- - **Phase 3 — Hypothesis Engine**: Traverse the graph to find novel connections, contradictions, and unexplored gaps — turning raw claims into testable research hypotheses.
20
-
21
- The output is a directed knowledge graph (NetworkX DiGraph + JSON serialization) where nodes represent domain concepts and claims, and edges represent typed relationships with confidence scores and provenance.
22
-
23
- **Primary implementation**: `core/knowledge_graph/` in the NeuroClaw project.
24
-
25
- ## Architecture
26
-
27
- ```
28
- ┌─────────────────────┐
29
- │ Knowledge Graph │
30
- │ (NetworkX DiGraph) │
31
- └──────┬──────────────┘
32
- │
33
- ┌─────────────────┼─────────────────┐
34
- │ │ │
35
- ┌────────▼────────┐ ┌─────▼──────────┐ ┌────▼─────────────┐
36
- │ Phase 1: │ │ Phase 2: │ │ Phase 3: │
37
- │ Structured │ │ Literature │ │ Hypothesis │
38
- │ Data Ingestion │ │ Claim Extract │ │ Engine │
39
- └────────┬────────┘ └──────┬─────────┘ └────┬─────────────┘
40
- │ │ │
41
- ┌────────▼────────┐ ┌──────▼─────────┐ ┌────▼─────────────┐
42
- │ - NeuroNames │ │ - PubMed search│ │ - Path finding │
43
- │ - MeSH │ │ - LLM extract │ │ - Bridge discover│
44
- │ - DisGeNET │ │ - Entity resol │ │ - Contradictions │
45
- │ - Cognitive Atl │ │ - Claim ingest │ │ - Gap detection │
46
- │ - Nilearn atlas │ │ │ │ - Ranking │
47
- └─────────────────┘ └────────────────┘ └──────────────────┘
48
- ```
49
-
50
- ## Key Design Decisions (Lessons Learned)
51
-
52
- ### 1. Schema Design: Three-Tier Nodes
53
-
54
- The graph uses three types of nodes, all stored in the same DiGraph:
55
-
56
- | Node Type | ID Format | Purpose |
57
- |-----------|-----------|---------|
58
- | **ConceptNode** | `NN:1234`, `CUI:xxx`, `MESH:D0001` | Domain concepts (brain regions, diseases, genes, drugs) |
59
- | **Claim** | `CLM:abc123def456` | Structured scientific claims extracted from papers |
60
- | **Edge** | (implicit) | Typed relationships between any two nodes |
61
-
62
- **Why this matters**: Claims are stored as nodes (not just edges) so they can carry full metadata (evidence, p-value, sample size, conditions, population). Simplified edges are also generated for fast traversal.
63
-
64
- ### 2. Entity Resolution: 5-Level Matching
65
-
66
- When ingesting claims, entity names must be resolved to existing concept IDs. Use a cascading strategy:
67
-
68
- 1. **Exact match** on preferred_name
69
- 2. **Case-insensitive** match
70
- 3. **Alias match** (check synonyms)
71
- 4. **Substring match** (entity contained in name or vice versa, prefer shortest name)
72
- 5. **Create new** concept if no match found
73
-
74
- **Why not just use embeddings?** For small-to-medium graphs (<100K concepts), string matching is fast and predictable. SapBERT/FAISS alignment is recommended when UMLS is available and the graph exceeds 100K concepts.
75
-
76
- ### 3. LLM Extraction: Keep Prompts Short
77
-
78
- LLMs (especially via proxy endpoints) return empty responses when prompts + expected output exceed the token window. Hard-won rules:
79
-
80
- - **Truncate abstracts** to 2000 chars before sending to LLM
81
- - **Keep extraction prompts concise** — list field names and allowed values, not verbose descriptions
82
- - **Use `max_tokens=8192`** — 4096 is too small for papers with many claims
83
- - **Fix `[[` double brackets** — a common LLM error when outputting JSON arrays
84
- - **Temperature=0.1** for extraction consistency
85
-
86
- ### 4. Contextualized Triplets (MDKG-style)
87
-
88
- Beyond simple (subject, predicate, object), extract:
89
-
90
- - **Conditions**: list of conditions under which the claim holds (e.g., `["female only", "age > 65"]`)
91
- - **Population**: study demographics (mean_age, gender distribution, sample size, cohort name)
92
-
93
- This enables more nuanced graph queries and downstream hypothesis generation.
94
-
95
- ### 5. Checkpoint/Resume for Batch Jobs
96
-
97
- Large-scale extraction (10 diseases x 27 years x 20 papers = 5400 papers) takes 10-60 hours. Always implement:
98
-
99
- - Save checkpoint after each batch (disease+year)
100
- - Track completed_diseases and completed_years
101
- - Save graph periodically (every 5 years or after each disease)
102
- - CSV export of paper metadata for audit trail
103
-
104
- ## Quick Reference
105
-
106
- | Task | Command |
107
- |------|---------|
108
- | Ingest atlas data (Phase 1) | `python -m core.knowledge_graph.ingest_pipeline` |
109
- | Generate brain atlas TSV | `python core/knowledge_graph/data/raw/generate_brain_atlas_nilearn.py` |
110
- | Run single-disease extraction | `python -m core.knowledge_graph.batch_extract --diseases "Alzheimer's disease" --year-start 2024 --year-end 2024 --papers-per-year 5` |
111
- | Run full batch extraction | `python -m core.knowledge_graph.batch_extract` |
112
- | Resume from checkpoint | `python -m core.knowledge_graph.batch_extract` (auto-resumes) |
113
- | Start fresh (ignore checkpoint) | `python -m core.knowledge_graph.batch_extract --no-resume` |
114
- | Verbose logging | `python -m core.knowledge_graph.batch_extract -v` |
115
- | Query graph stats | `python -c "from core.knowledge_graph import load_graph; g = load_graph(); print(g.stats())"` |
116
- | **Batch generate hypotheses** | `python -m core.knowledge_graph.hypothesis_cli batch --output data/hypotheses.json` |
117
- | **Rank saved hypotheses** | `python -m core.knowledge_graph.hypothesis_cli rank --input data/hypotheses.json --top 20` |
118
- | Find hypothesis paths | `python -m core.knowledge_graph.hypothesis_cli paths "hippocampus" "Alzheimer Disease"` |
119
- | Bridge discovery | `python -m core.knowledge_graph.hypothesis_cli bridge "hippocampus" --target-domain disease` |
120
- | **Discover from concept** | `python -m core.knowledge_graph.hypothesis_cli discover "Alzheimer" --max-hops 3` |
121
- | **Find trending evidence** | `python -m core.knowledge_graph.hypothesis_cli trending --since 2020 --direction strengthening` |
122
- | Find contradictions | `python -m core.knowledge_graph.hypothesis_cli contradictions` |
123
- | Detect gaps | `python -m core.knowledge_graph.hypothesis_cli gaps --domain-a neuroanatomy --domain-b disease` |
124
- | Explore a concept | `python -m core.knowledge_graph.hypothesis_cli explore "hippocampus"` |
125
-
126
- ## Agent Reference Rule
127
-
128
- When the agent needs knowledge graph implementation code, it should first consult the curated snippets in `skills/knowledge-graph-builder/scripts/` instead of writing from scratch.
129
-
130
- Reference snippets available:
131
- - `scripts/entity_resolution.py` → EntityResolver class with 5-level matching
132
- - `scripts/graph_query.py` → CLI tool for graph queries (stats, search, neighbors, paths, domain)
133
- - `scripts/hypothesis_cli_reference.py` → Hypothesis engine usage patterns (executable code in `core/knowledge_graph/hypothesis_cli.py`)
134
- - `scripts/extraction_prompt_template.txt` → LLM extraction prompt template
135
- - `scripts/new_data_source_template.py` → Template for adding new data sources
136
-
137
- ## Installation
138
-
139
- ```bash
140
- # Core dependencies
141
- pip install networkx requests openai
142
-
143
- # Optional: for atlas generation
144
- pip install nilearn nibabel
145
-
146
- # Optional: for Biopython Entrez (PubMed)
147
- pip install biopython
148
-
149
- # Use the neuroclaw conda environment
150
- conda activate neuroclaw
151
- ```
152
-
153
- ## Phase 1: Structured Data Ingestion
154
-
155
- ### Supported Data Sources
156
-
157
- | Source | Data Type | Entity Type | Edge Type |
158
- |--------|-----------|-------------|-----------|
159
- | NeuroNames / Nilearn atlases | Brain region hierarchy | neuroanatomy | part_of |
160
- | MeSH (desc*.xml) | Medical subject headings | disease, anatomy | is_a |
161
- | DisGeNET (TSV) | Gene-disease associations | gene | gene_associated_with_disease |
162
- | Cognitive Atlas (API) | Tasks, concepts, disorders | cognitive_function, paradigm | — |
163
- | UMLS (pending) | Unified medical language system | all types | various |
164
-
165
- ### Adding a New Data Source
166
-
167
- Create a new file in `core/knowledge_graph/ingestion/` following this pattern:
168
-
169
- ```python
170
- """Ingest data from [SOURCE] into the knowledge graph."""
171
-
172
- from ..schema import ConceptNode, Edge, DomainTag
173
- from ..graph_manager import KnowledgeGraph
174
-
175
- def ingest_source(kg: KnowledgeGraph, data_path: str) -> dict:
176
- """Parse source data and add to graph.
177
-
178
- Returns summary dict with counts.
179
- """
180
- concepts_added = 0
181
- edges_added = 0
182
-
183
- # 1. Parse raw data
184
- records = parse_data(data_path)
185
-
186
- # 2. Create ConceptNodes
187
- for record in records:
188
- node = ConceptNode(
189
- id=record["id"],
190
- preferred_name=record["name"],
191
- domain_tags=[DomainTag.DISEASE.value],
192
- source_vocab="my_source",
193
- aliases=record.get("synonyms", []),
194
- )
195
- kg.add_concept(node)
196
- concepts_added += 1
197
-
198
- # 3. Create Edges (if hierarchical)
199
- for record in records:
200
- if record.get("parent_id"):
201
- edge = Edge(
202
- source_id=record["id"],
203
- target_id=record["parent_id"],
204
- relation_type="is_a",
205
- source="my_source",
206
- )
207
- kg.add_edge(edge)
208
- edges_added += 1
209
-
210
- return {"concepts_added": concepts_added, "edges_added": edges_added}
211
- ```
212
-
213
- ### Atlas Generation (Nilearn)
214
-
215
- Use `scripts/generate_atlas.py` as a template for generating brain region hierarchies from Nilearn built-in atlases. Key points:
216
-
217
- - Start with a manual hierarchy of core brain regions (~100-200)
218
- - Augment with atlas labels (Talairach, Harvard-Oxford, AAL, Dosenbach, Pauli, Seitzman)
219
- - Handle SSL issues by patching `requests.Session.verify` before Nilearn calls
220
- - Output: TSV with columns: NN_ID, Name, Latin_Name, Synonyms, Parent_ID, Brodmann_area
221
-
222
- ## Phase 2: Literature Claim Extraction
223
-
224
- ### Pipeline: PubMed Search → LLM Extraction → Entity Resolution → Ingestion
225
-
226
- ```
227
- PubMed query → PMIDs → XML parse → (abstract, PaperRef)
228
- │
229
- LLM extraction
230
- │
231
- [Claim objects]
232
- │
233
- Entity resolution
234
- │
235
- Graph ingestion (nodes + edges)
236
- ```
237
-
238
- ### PubMed Search Strategy
239
-
240
- For each disease+year combination, search with neuroimaging focus:
241
-
242
- ```
243
- ({disease}[Title/Abstract])
244
- AND ("brain imaging"[Title/Abstract] OR "neuroimaging"[Title/Abstract]
245
- OR "MRI"[Title/Abstract] OR "fMRI"[Title/Abstract] OR "PET"[Title/Abstract])
246
- AND {year}:{year}[pdat]
247
- ```
248
-
249
- Rate limit: 0.4s between NCBI API calls (3 req/sec without API key).
250
-
251
- ### LLM Extraction Prompt Design
252
-
253
- See `scripts/extraction_prompt_template.txt` for the recommended prompt structure. Key fields to extract:
254
-
255
- | Field | Description |
256
- |-------|-------------|
257
- | subject / object | Entity names |
258
- | subject_type / object_type | Entity category (brain_region, disease, gene, ...) |
259
- | predicate | Relationship type (reduces, increases, correlates_with, ...) |
260
- | negated | Whether the claim states NO relationship |
261
- | effect_metric / effect_size | Statistical effect (Cohen's d, r, OR, ...) |
262
- | p_value | Statistical significance |
263
- | sample_size | Study sample size |
264
- | study_type | fMRI, PET, GWAS, meta_analysis, ... |
265
- | conditions | List of contextual conditions |
266
- | population | Study demographics |
267
- | raw_sentence | Source sentence from abstract |
268
-
269
- ### Entity Resolution During Ingestion
270
-
271
- When a claim references "hippocampus" and the graph already has `NN:11` (preferred_name="Hippocampus"), the entity resolver matches them. If no match is found, a new concept node is created with prefix `CLM_CONCEPT:`.
272
-
273
- This means the graph grows organically: atlas data provides the backbone, and claim extraction fills in relationships and discovers new entities.
274
-
275
- ### Claim Node vs. Simplified Edge
276
-
277
- Each claim generates **three** graph elements:
278
-
279
- 1. **Claim node** (`CLM:abc123`): full metadata (evidence, conditions, population, raw text)
280
- 2. **Simplified edge** (subject → object): for fast multi-hop traversal
281
- 3. **About edges** (claim → subject, claim → object): for provenance queries
282
-
283
- ## Output Files
284
-
285
- | File | Description |
286
- |------|-------------|
287
- | `data/knowledge_graph.json` | Full graph (concepts + edges + metadata) |
288
- | `data/papers_metadata.csv` | Paper records: pmid, doi, title, authors, year, journal, disease, abstract_length, n_claims, timestamp |
289
- | `data/batch_checkpoint.json` | Resume checkpoint: completed_diseases, completed_years, totals |
290
-
291
- ## Complementary / Related Skills
292
-
293
- - `academic-research-hub` → paper search (arXiv, PubMed, Semantic Scholar)
294
- - `research-idea` → consumes knowledge graph for hypothesis generation
295
- - `method-design` → uses graph structure for method comparison
296
-
297
- ## Reference
298
-
299
- - MDKG paper: Gao et al., "Large language model powered knowledge graph construction for mental health exploration." Nature Communications (2025). PMID: 40804250
300
- - NeuroNames: Brain region hierarchy
301
- - MeSH: Medical Subject Headings (NLM)
302
- - DisGeNET: Gene-disease association database
303
- - Cognitive Atlas: Cognitive paradigm ontology
304
- - Nilearn: Python brain atlas library
305
-
306
- ## Phase 3: Hypothesis Engine
307
-
308
- The hypothesis engine **batch-generates** hypotheses across the entire graph, **persists** them to JSON, and **ranks** by novelty, evidence, testability, and confidence. See `core/knowledge_graph/hypothesis_engine.py` for the implementation.
309
-
310
- ### Workflow
311
-
312
- ```
313
- batch_generate() → save_hypotheses() → rank_hypotheses() → (Phase 5: convert to analysis tasks)
314
- ```
315
-
316
- ### Capabilities
317
-
318
- | Function | Description |
319
- |----------|-------------|
320
- | `batch_generate()` | Traverse entire graph, generate hypotheses across all domain pairs |
321
- | `save_hypotheses()` / `load_hypotheses()` | Persist to JSON for iterative re-ranking |
322
- | `rank_hypotheses()` | Sort by composite score (4 dimensions) |
323
- | `find_paths(src, tgt)` | Interactive: multi-hop path finding |
324
- | `bridge_discovery(concept, domain)` | Interactive: cross-domain connection discovery |
325
- | `discover_hypotheses(concept)` | Find hypotheses radiating from a single concept to all reachable domains |
326
- | `find_trending(since_year, direction)` | Find concept pairs with strengthening/weakening evidence over time |
327
- | `contradiction_detection()` | Find opposing claims on same concept pair |
328
- | `gap_detection(domain_a, domain_b)` | Find 2-hop concept pairs with no direct edge |
329
-
330
- ### Scoring (4 Dimensions)
331
-
332
- Each hypothesis is scored on four dimensions:
333
-
334
- | Dimension | Weight | What it measures |
335
- |-----------|--------|------------------|
336
- | **Confidence** | 0.25 | Edge confidence × study type quality × replicability |
337
- | **Novelty** | 0.25 | Cross-domain paths, rare relations, few supporting papers |
338
- | **Evidence** | 0.25 | p-value strength, sample size, effect size presence |
339
- | **Testability** | 0.25 | Can NeuroClaw execute this? Modality detection (sMRI, EEG, fMRI, PET, DTI), brain region specificity |
340
-
341
- Composite ranking: `confidence^0.25 * evidence^0.25 * novelty^0.25 * testability^0.25`
342
-
343
- ### Default Domain Pairs
344
-
345
- The batch generator explores these cross-domain pairs:
346
- - neuroanatomy ↔ disease
347
- - neuroanatomy ↔ cognitive_function
348
- - disease ↔ gene
349
- - disease ↔ drug
350
- - disease ↔ biomarker
351
- - gene ↔ disease
352
- - drug ↔ disease
353
- - cognitive_function ↔ disease
354
- - neurotransmitter ↔ disease
355
-
356
- ## Future Work
357
-
358
- - **SapBERT entity alignment** with UMLS (cosine similarity > 0.9)
359
- - **LLM-based hypothesis summarization** — use LLM to generate natural language hypothesis descriptions
360
- - **Result feedback loop**: validated hypotheses write back to graph
361
- - ~~**Temporal analysis**~~: implemented as `find_trending()` — tracks strengthening/weakening evidence trends across publication years
362
-
363
- ---
364
- Created At: 2026-05-04 20:28 HKT
365
- Last Updated At: 2026-05-06 14:46 HKT
366
- Author: chengwang96
@@ -1,120 +0,0 @@
1
- """Reusable entity resolution for knowledge graph construction.
2
-
3
- Resolves entity names to concept IDs using a 5-level cascading strategy:
4
- 1. Exact match on preferred_name
5
- 2. Case-insensitive match
6
- 3. Alias match
7
- 4. Substring match (prefer shortest name)
8
- 5. Create new concept if no match
9
-
10
- Usage:
11
- from scripts.entity_resolution import EntityResolver
12
- resolver = EntityResolver(kg)
13
- concept_id = resolver.resolve("hippocampus", entity_type="brain_region")
14
- """
15
-
16
- from __future__ import annotations
17
-
18
- import logging
19
- from typing import Optional
20
-
21
- from core.knowledge_graph.src.schema import ConceptNode, DomainTag
22
- from core.knowledge_graph.src.graph_manager import KnowledgeGraph
23
-
24
- logger = logging.getLogger(__name__)
25
-
26
- # Map entity type strings to DomainTag values
27
- ENTITY_TYPE_TO_DOMAIN = {
28
- "brain_region": DomainTag.NEUROANATOMY,
29
- "disease": DomainTag.DISEASE,
30
- "gene": DomainTag.GENE,
31
- "neurotransmitter": DomainTag.NEUROTRANSMITTER,
32
- "protein": DomainTag.GENE,
33
- "drug": DomainTag.DRUG,
34
- "network": DomainTag.CONNECTIVITY,
35
- "biomarker": DomainTag.BIOMARKER,
36
- "cognitive_function": DomainTag.COGNITIVE_FUNCTION,
37
- }
38
-
39
-
40
- class EntityResolver:
41
- """Resolve entity names to concept IDs in a knowledge graph."""
42
-
43
- def __init__(self, kg: KnowledgeGraph):
44
- self.kg = kg
45
-
46
- def resolve(
47
- self,
48
- entity_name: str,
49
- entity_type: str = "",
50
- source_vocab: str = "entity_resolution",
51
- ) -> Optional[str]:
52
- """Resolve an entity name to a concept ID.
53
-
54
- Args:
55
- entity_name: The entity name to resolve.
56
- entity_type: Entity type string (maps to DomainTag).
57
- source_vocab: Source vocabulary for new concepts.
58
-
59
- Returns:
60
- Concept ID string, or None if entity_name is empty.
61
- """
62
- if not entity_name:
63
- return None
64
-
65
- # 1. Exact match
66
- for node in self.kg._index.values():
67
- if node.preferred_name == entity_name:
68
- return node.id
69
-
70
- # 2. Case-insensitive match
71
- entity_lower = entity_name.lower()
72
- for node in self.kg._index.values():
73
- if node.preferred_name.lower() == entity_lower:
74
- return node.id
75
-
76
- # 3. Alias match
77
- for node in self.kg._index.values():
78
- for alias in node.aliases:
79
- if alias.lower() == entity_lower:
80
- return node.id
81
-
82
- # 4. Substring match
83
- candidates = []
84
- for node in self.kg._index.values():
85
- name_lower = node.preferred_name.lower()
86
- if entity_lower in name_lower or name_lower in entity_lower:
87
- candidates.append(node)
88
- continue
89
- for alias in node.aliases:
90
- if entity_lower in alias.lower() or alias.lower() in entity_lower:
91
- candidates.append(node)
92
- break
93
-
94
- if len(candidates) == 1:
95
- return candidates[0].id
96
- elif len(candidates) > 1:
97
- candidates.sort(key=lambda n: len(n.preferred_name))
98
- return candidates[0].id
99
-
100
- # 5. Not found — create new concept
101
- return self._create_new_concept(entity_name, entity_type, source_vocab)
102
-
103
- def _create_new_concept(
104
- self,
105
- name: str,
106
- entity_type: str,
107
- source_vocab: str,
108
- ) -> str:
109
- """Create a new concept node for an unresolved entity."""
110
- domain = ENTITY_TYPE_TO_DOMAIN.get(entity_type, DomainTag.DISEASE)
111
- new_id = f"CLM_CONCEPT:{name.replace(' ', '_')}"
112
-
113
- self.kg.add_concept(ConceptNode(
114
- id=new_id,
115
- preferred_name=name,
116
- domain_tags=[domain.value],
117
- source_vocab=source_vocab,
118
- ))
119
- logger.info(f"created new concept: {new_id} ({name})")
120
- return new_id
@@ -1,19 +0,0 @@
1
- Extract ALL scientific claims from this neuroscience paper abstract as JSON array.
2
-
3
- Each claim object fields:
4
- - subject, subject_type, predicate, object, object_type, negated
5
- - effect_metric, effect_size, p_value, sample_size
6
- - study_type, methodology, replicability, direction, raw_sentence
7
- - conditions: list of conditions under which this claim holds (e.g. ["female only", "age > 65", "resting-state fMRI"]). Empty list [] if unconditional.
8
- - population: object with study population info, null if not reported:
9
- {{"mean_age": number or null, "age_range": "e.g. 18-65" or null, "n_female": int or null, "n_male": int or null, "ethnicity": str or null, "cohort_name": str or null}}
10
-
11
- Types: brain_region, disease, gene, neurotransmitter, protein, drug, network, biomarker, cognitive_function
12
- Predicates: reduces, increases, correlates_with, causes, is_biomarker_of, is_risk_factor_for, treats, modulates, activates, inhibits, predicts, mediates, is_associated_with, distinguishes
13
- Study types: fMRI, PET, DTI, sMRI, EEG, MEG, lesion, meta_analysis, GWAS, animal_model, clinical_trial, case_control, longitudinal, cross_sectional, review
14
-
15
- Title: {title}
16
- PMID: {pmid}
17
- Abstract: {abstract}
18
-
19
- Return JSON array. Empty array [] if no claims.
@@ -1,106 +0,0 @@
1
- """Quick graph query helpers for knowledge graph exploration.
2
-
3
- Usage:
4
- python scripts/graph_query.py stats
5
- python scripts/graph_query.py search "hippocampus"
6
- python scripts/graph_query.py neighbors "NN:11" --relation part_of
7
- python scripts/graph_query.py paths "NN:11" "DOID:10652" --max-hops 3
8
- python scripts/graph_query.py domain neuroanatomy
9
- """
10
-
11
- from __future__ import annotations
12
-
13
- import argparse
14
- import json
15
- import sys
16
- from pathlib import Path
17
-
18
- from core.knowledge_graph.src.storage import load_graph
19
-
20
-
21
- def cmd_stats(kg):
22
- stats = kg.stats()
23
- print(json.dumps(stats, indent=2))
24
-
25
-
26
- def cmd_search(kg, query, limit=20):
27
- results = kg.search_by_name(query, limit)
28
- for node in results:
29
- tags = ", ".join(node.domain_tags)
30
- print(f" {node.id:30s} {node.preferred_name:30s} [{tags}]")
31
-
32
-
33
- def cmd_neighbors(kg, concept_id, relation=None, direction="out"):
34
- neighbors = kg.get_neighbors(concept_id, relation_type=relation, direction=direction)
35
- if not neighbors:
36
- print(f"No neighbors found for {concept_id}")
37
- return
38
- for target_id, edge in neighbors:
39
- print(f" {edge.source_id} --[{edge.relation_type}]--> {edge.target_id} (conf={edge.confidence:.2f})")
40
-
41
-
42
- def cmd_paths(kg, source, target, max_hops=3):
43
- paths = kg.find_paths(source, target, max_hops)
44
- if not paths:
45
- print(f"No paths found between {source} and {target}")
46
- return
47
- print(f"Found {len(paths)} path(s):")
48
- for i, path in enumerate(paths):
49
- hops = " -> ".join(f"{n}[{r}]" for n, r in path)
50
- print(f" Path {i+1}: {hops}")
51
-
52
-
53
- def cmd_domain(kg, domain_tag):
54
- nodes = kg.search_by_domain(domain_tag)
55
- print(f"Domain '{domain_tag}': {len(nodes)} concepts")
56
- for node in nodes[:20]:
57
- print(f" {node.id:30s} {node.preferred_name}")
58
- if len(nodes) > 20:
59
- print(f" ... and {len(nodes) - 20} more")
60
-
61
-
62
- def main():
63
- parser = argparse.ArgumentParser(description="Knowledge graph query tool")
64
- parser.add_argument("--graph", default=None, help="Path to graph JSON")
65
- sub = parser.add_subparsers(dest="command")
66
-
67
- sub.add_parser("stats")
68
-
69
- p_search = sub.add_parser("search")
70
- p_search.add_argument("query")
71
- p_search.add_argument("--limit", type=int, default=20)
72
-
73
- p_neighbors = sub.add_parser("neighbors")
74
- p_neighbors.add_argument("concept_id")
75
- p_neighbors.add_argument("--relation", default=None)
76
- p_neighbors.add_argument("--direction", default="out", choices=["out", "in", "both"])
77
-
78
- p_paths = sub.add_parser("paths")
79
- p_paths.add_argument("source")
80
- p_paths.add_argument("target")
81
- p_paths.add_argument("--max-hops", type=int, default=3)
82
-
83
- p_domain = sub.add_parser("domain")
84
- p_domain.add_argument("domain_tag")
85
-
86
- args = parser.parse_args()
87
-
88
- graph_path = Path(args.graph) if args.graph else Path("core/knowledge_graph/data/knowledge_graph.json")
89
- kg = load_graph(graph_path)
90
-
91
- if args.command == "stats":
92
- cmd_stats(kg)
93
- elif args.command == "search":
94
- cmd_search(kg, args.query, args.limit)
95
- elif args.command == "neighbors":
96
- cmd_neighbors(kg, args.concept_id, args.relation, args.direction)
97
- elif args.command == "paths":
98
- cmd_paths(kg, args.source, args.target, args.max_hops)
99
- elif args.command == "domain":
100
- cmd_domain(kg, args.domain_tag)
101
- else:
102
- parser.print_help()
103
-
104
-
105
- if __name__ == "__main__":
106
- main()
@@ -1,42 +0,0 @@
1
- """Hypothesis Engine CLI Reference - for agent use.
2
-
3
- The executable CLI lives in core/knowledge_graph/phase3.py.
4
- This file documents the usage patterns for agent reference.
5
-
6
- Usage (run from project root):
7
-
8
- # Batch generate hypotheses across the entire graph
9
- python -m core.knowledge_graph.phase3 batch --output data/hypotheses.json
10
-
11
- # Load and re-rank saved hypotheses
12
- python -m core.knowledge_graph.phase3 rank --input data/hypotheses.json --top 20
13
-
14
- # Interactive queries
15
- python -m core.knowledge_graph.phase3 paths "hippocampus" "Alzheimer Disease"
16
- python -m core.knowledge_graph.phase3 bridge "hippocampus" --target-domain disease
17
- python -m core.knowledge_graph.phase3 contradictions --domain disease
18
- python -m core.knowledge_graph.phase3 gaps --domain-a neuroanatomy --domain-b disease
19
- python -m core.knowledge_graph.phase3 explore "hippocampus"
20
- python -m core.knowledge_graph.phase3 stats
21
-
22
- Programmatic usage:
23
- from core.knowledge_graph import load_graph, HypothesisEngine
24
-
25
- kg = load_graph()
26
- engine = HypothesisEngine(kg)
27
-
28
- # batch generate
29
- hypotheses = engine.batch_generate()
30
- engine.save_hypotheses(hypotheses, "data/hypotheses.json")
31
-
32
- # load and rank
33
- hypotheses = engine.load_hypotheses("data/hypotheses.json")
34
- ranked = engine.rank_hypotheses(hypotheses, top_n=50)
35
-
36
- # each hypothesis has 4 scores:
37
- # confidence_score - evidence quality
38
- # novelty_score - how unexpected
39
- # evidence_score - statistical strength
40
- # testability_score - can NeuroClaw execute this?
41
- # composite_score - combined ranking
42
- """