@nahisaho/satori 0.25.5 → 0.26.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 (90) hide show
  1. package/README.md +57 -1
  2. package/bin/satori.js +331 -29
  3. package/package.json +32 -2
  4. package/src/.github/skills/scientific-academic-writing/SKILL.md +10 -0
  5. package/src/.github/skills/scientific-active-learning/SKILL.md +10 -0
  6. package/src/.github/skills/scientific-adaptive-experiments/SKILL.md +10 -0
  7. package/src/.github/skills/scientific-advanced-imaging/SKILL.md +10 -0
  8. package/src/.github/skills/scientific-advanced-visualization/SKILL.md +10 -0
  9. package/src/.github/skills/scientific-anomaly-detection/SKILL.md +10 -0
  10. package/src/.github/skills/scientific-automl/SKILL.md +10 -0
  11. package/src/.github/skills/scientific-bayesian-statistics/SKILL.md +10 -0
  12. package/src/.github/skills/scientific-biobank-cohort/SKILL.md +10 -0
  13. package/src/.github/skills/scientific-biosignal-processing/SKILL.md +10 -0
  14. package/src/.github/skills/scientific-causal-inference/SKILL.md +10 -0
  15. package/src/.github/skills/scientific-causal-ml/SKILL.md +10 -0
  16. package/src/.github/skills/scientific-clinical-nlp/SKILL.md +10 -0
  17. package/src/.github/skills/scientific-clinical-pharmacology/SKILL.md +10 -0
  18. package/src/.github/skills/scientific-clinical-standards/SKILL.md +11 -0
  19. package/src/.github/skills/scientific-crispr-design/SKILL.md +10 -0
  20. package/src/.github/skills/scientific-critical-review/SKILL.md +10 -1
  21. package/src/.github/skills/scientific-data-preprocessing/SKILL.md +10 -0
  22. package/src/.github/skills/scientific-data-profiling/SKILL.md +10 -0
  23. package/src/.github/skills/scientific-data-simulation/SKILL.md +10 -0
  24. package/src/.github/skills/scientific-data-submission/SKILL.md +10 -0
  25. package/src/.github/skills/scientific-deep-chemistry/SKILL.md +10 -0
  26. package/src/.github/skills/scientific-deep-learning/SKILL.md +10 -0
  27. package/src/.github/skills/scientific-doe/SKILL.md +10 -0
  28. package/src/.github/skills/scientific-eda-correlation/SKILL.md +10 -0
  29. package/src/.github/skills/scientific-ensemble-methods/SKILL.md +10 -0
  30. package/src/.github/skills/scientific-explainable-ai/SKILL.md +10 -0
  31. package/src/.github/skills/scientific-feature-importance/SKILL.md +10 -0
  32. package/src/.github/skills/scientific-federated-learning/SKILL.md +10 -0
  33. package/src/.github/skills/scientific-geospatial-analysis/SKILL.md +10 -0
  34. package/src/.github/skills/scientific-glycomics/SKILL.md +10 -0
  35. package/src/.github/skills/scientific-gpu-singlecell/SKILL.md +10 -0
  36. package/src/.github/skills/scientific-hgnc-nomenclature/SKILL.md +10 -0
  37. package/src/.github/skills/scientific-hypothesis-pipeline/SKILL.md +10 -1
  38. package/src/.github/skills/scientific-image-analysis/SKILL.md +10 -0
  39. package/src/.github/skills/scientific-interactive-dashboard/SKILL.md +10 -0
  40. package/src/.github/skills/scientific-lab-automation/SKILL.md +10 -0
  41. package/src/.github/skills/scientific-latex-formatter/SKILL.md +10 -0
  42. package/src/.github/skills/scientific-lipidomics/SKILL.md +10 -0
  43. package/src/.github/skills/scientific-materials-characterization/SKILL.md +10 -0
  44. package/src/.github/skills/scientific-md-simulation/SKILL.md +10 -0
  45. package/src/.github/skills/scientific-medical-imaging/SKILL.md +10 -0
  46. package/src/.github/skills/scientific-metabolic-atlas/SKILL.md +11 -0
  47. package/src/.github/skills/scientific-metabolic-flux/SKILL.md +10 -0
  48. package/src/.github/skills/scientific-metabolomics-network/SKILL.md +10 -0
  49. package/src/.github/skills/scientific-metagenome-assembled-genomes/SKILL.md +10 -0
  50. package/src/.github/skills/scientific-missing-data-analysis/SKILL.md +10 -0
  51. package/src/.github/skills/scientific-ml-classification/SKILL.md +10 -0
  52. package/src/.github/skills/scientific-ml-regression/SKILL.md +10 -0
  53. package/src/.github/skills/scientific-model-monitoring/SKILL.md +10 -0
  54. package/src/.github/skills/scientific-multi-task-learning/SKILL.md +10 -0
  55. package/src/.github/skills/scientific-nci60-screening/SKILL.md +10 -0
  56. package/src/.github/skills/scientific-network-visualization/SKILL.md +10 -0
  57. package/src/.github/skills/scientific-neural-architecture-search/SKILL.md +10 -0
  58. package/src/.github/skills/scientific-neuroscience-electrophysiology/SKILL.md +10 -0
  59. package/src/.github/skills/scientific-paper-quality/SKILL.md +10 -0
  60. package/src/.github/skills/scientific-pca-tsne/SKILL.md +10 -0
  61. package/src/.github/skills/scientific-peer-review-response/SKILL.md +10 -0
  62. package/src/.github/skills/scientific-perturbation-analysis/SKILL.md +10 -0
  63. package/src/.github/skills/scientific-phylogenetics/SKILL.md +10 -0
  64. package/src/.github/skills/scientific-pipeline-scaffold/SKILL.md +10 -0
  65. package/src/.github/skills/scientific-plant-biology/SKILL.md +10 -0
  66. package/src/.github/skills/scientific-presentation-design/SKILL.md +10 -0
  67. package/src/.github/skills/scientific-process-optimization/SKILL.md +10 -0
  68. package/src/.github/skills/scientific-publication-figures/SKILL.md +10 -0
  69. package/src/.github/skills/scientific-quantum-computing/SKILL.md +10 -0
  70. package/src/.github/skills/scientific-radiology-ai/SKILL.md +10 -0
  71. package/src/.github/skills/scientific-reinforcement-learning/SKILL.md +10 -0
  72. package/src/.github/skills/scientific-reproducible-reporting/SKILL.md +10 -0
  73. package/src/.github/skills/scientific-research-methodology/SKILL.md +10 -0
  74. package/src/.github/skills/scientific-revision-tracker/SKILL.md +10 -0
  75. package/src/.github/skills/scientific-scatac-signac/SKILL.md +10 -0
  76. package/src/.github/skills/scientific-scvi-integration/SKILL.md +10 -0
  77. package/src/.github/skills/scientific-semi-supervised-learning/SKILL.md +10 -0
  78. package/src/.github/skills/scientific-spatial-multiomics/SKILL.md +10 -0
  79. package/src/.github/skills/scientific-spectral-signal/SKILL.md +10 -0
  80. package/src/.github/skills/scientific-squidpy-advanced/SKILL.md +11 -0
  81. package/src/.github/skills/scientific-statistical-simulation/SKILL.md +10 -0
  82. package/src/.github/skills/scientific-statistical-testing/SKILL.md +10 -0
  83. package/src/.github/skills/scientific-streaming-analytics/SKILL.md +10 -0
  84. package/src/.github/skills/scientific-supplementary-generator/SKILL.md +10 -0
  85. package/src/.github/skills/scientific-symbolic-mathematics/SKILL.md +10 -0
  86. package/src/.github/skills/scientific-time-series/SKILL.md +10 -0
  87. package/src/.github/skills/scientific-time-series-forecasting/SKILL.md +10 -0
  88. package/src/.github/skills/scientific-toxicology-env/SKILL.md +10 -0
  89. package/src/.github/skills/scientific-transfer-learning/SKILL.md +10 -0
  90. package/src/.github/skills/scientific-uncertainty-quantification/SKILL.md +10 -0
package/README.md CHANGED
@@ -3,11 +3,12 @@
3
3
  **SATORI** は、科学データ解析のための **GitHub Copilot Agent Skills** コレクションです。
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@nahisaho/satori)](https://www.npmjs.com/package/@nahisaho/satori)
6
+ [![CI](https://github.com/nahisaho/satori/actions/workflows/ci.yml/badge.svg)](https://github.com/nahisaho/satori/actions/workflows/ci.yml)
6
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENCE)
7
8
 
8
9
  ## Overview
9
10
 
10
- このディレクトリには、Exp-01〜13 で蓄積した科学データ解析技法を Agent Skills として体系化した **190 個**のスキルを格納しています。Copilot がプロンプトの文脈に応じて適切なスキルを自動ロードし、各実験で確立した解析パターンを再利用します。131 のスキルは [ToolUniverse](https://github.com/mims-harvard/ToolUniverse) SMCP 経由で 1,200 以上の外部科学データベースツールとも連携可能です。
11
+ このディレクトリには、Exp-01〜13 で蓄積した科学データ解析技法を Agent Skills として体系化した **190 個**のスキルを格納しています。Copilot がプロンプトの文脈に応じて適切なスキルを自動ロードし、各実験で確立した解析パターンを再利用します。全 190 スキルが [ToolUniverse](https://github.com/mims-harvard/ToolUniverse) SMCP 経由で 1,200 以上の外部科学データベースツールと連携可能です。
11
12
 
12
13
  ### パイプラインフロー
13
14
 
@@ -702,6 +703,18 @@ satori init
702
703
 
703
704
  `.github/skills/` がカレントディレクトリにコピーされ、Copilot Agent Mode で即座に利用できます。
704
705
 
706
+ ### CLI コマンド一覧
707
+
708
+ | コマンド | 説明 |
709
+ |---|---|
710
+ | `satori init [--force] [--dry-run]` | `.github/skills/` をカレントディレクトリにインストール |
711
+ | `satori pipeline suggest` | キーワードでインタラクティブにパイプラインを推薦 |
712
+ | `satori pipeline list` | 全 26 ドメインパイプラインを一覧表示 |
713
+ | `satori validate [--verbose]` | 全 190 SKILL.md を自動検証 |
714
+ | `satori stats` | スキル数・TU カバレッジなどの統計表示 |
715
+ | `satori help` | ヘルプ表示 |
716
+ | `satori --version` | バージョン表示 |
717
+
705
718
  ---
706
719
 
707
720
  ## 使い方
@@ -979,6 +992,49 @@ Skills は `.github/skills/` に配置されているため、Copilot が自動
979
992
 
980
993
  ---
981
994
 
995
+ ## 開発
996
+
997
+ ### 前提条件
998
+
999
+ - Node.js >= 18
1000
+
1001
+ ### セットアップ
1002
+
1003
+ ```bash
1004
+ git clone https://github.com/nahisaho/satori.git
1005
+ cd satori
1006
+ npm install
1007
+ ```
1008
+
1009
+ ### テスト
1010
+
1011
+ ```bash
1012
+ npm test # 全テスト実行 (1,359 テスト)
1013
+ npm run test:unit # CLI ユニットテストのみ (24 テスト)
1014
+ npm run test:validation # SKILL.md 検証テストのみ (1,335 テスト)
1015
+ npm run test:coverage # カバレッジ付き実行
1016
+ npm run test:watch # ウォッチモード
1017
+ ```
1018
+
1019
+ ### リント・フォーマット
1020
+
1021
+ ```bash
1022
+ npm run lint # Biome lint チェック
1023
+ npm run lint:fix # 自動修正
1024
+ npm run format # コードフォーマット
1025
+ ```
1026
+
1027
+ ### CI
1028
+
1029
+ GitHub Actions で以下の 4 ジョブが `main` ブランチへの push / PR 時に実行されます:
1030
+
1031
+ - **test**: Node.js 18/20/22 マトリクスでの全テスト実行
1032
+ - **validate-skills**: 全 SKILL.md フォーマット検証
1033
+ - **cli-smoke**: CLI コマンドのスモークテスト
1034
+ - **lint**: Biome によるコード品質チェック
1035
+
1036
+ ---
1037
+
982
1038
  ## 参考
983
1039
 
984
1040
  - [SATORI 使い方ガイド](../../docs/qiita-satori-guide.md)
package/bin/satori.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const fs = require('fs');
4
- const path = require('path');
3
+ const fs = require('node:fs');
4
+ const path = require('node:path');
5
5
 
6
6
  const COMMAND = process.argv[2];
7
7
  const SUBCOMMAND = process.argv[3];
@@ -73,48 +73,212 @@ Usage:
73
73
  satori init [--force] [--dry-run] Install .github/ skills into current directory
74
74
  satori pipeline suggest Interactive pipeline recommendation
75
75
  satori pipeline list List all available pipelines
76
+ satori validate [--verbose] Validate all SKILL.md files
77
+ satori stats Show skill/TU coverage statistics
76
78
  satori help Show this help message
77
79
  satori --version, -v Show version number
78
80
 
79
81
  Options:
80
82
  --force Overwrite existing .github/ directory
81
83
  --dry-run Preview what would be installed without making changes
84
+ --verbose Show detailed validation output
82
85
  `);
83
86
  }
84
87
 
85
88
  // ── Pipeline Suggest ──
86
89
 
87
90
  const PIPELINES = [
88
- { id: 1, name: '仮説検証→論文化', domain: 'general', keywords: ['仮説', '統計', '論文', 'hypothesis'], skills: 'hypothesis-engine → data-preprocessing → statistical-testing → ml-classification → publication-figures → academic-writing → critical-review' },
89
- { id: 2, name: 'バリアント→臨床', domain: 'genomics', keywords: ['バリアント', 'variant', 'VCF', 'WGS', 'WES'], skills: 'variant-interpretation → pharmacogenomics → precision-oncology → clinical-decision-support → clinical-reporting' },
90
- { id: 3, name: 'トランスクリプトーム', domain: 'genomics', keywords: ['RNA-seq', 'トランスクリプトーム', 'DEG', '発現'], skills: 'rnaseq-analysis → pathway-enrichment → network-analysis → publication-figures' },
91
- { id: 4, name: 'エピジェネティクス', domain: 'genomics', keywords: ['エピゲノム', 'ChIP-seq', 'ATAC-seq', 'メチル化'], skills: 'epigenomics-chromatin → regulatory-genomics → noncoding-rna → gene-regulation' },
92
- { id: 5, name: 'AlphaFold 構造解析', domain: 'structural', keywords: ['AlphaFold', 'タンパク質構造', '3D', 'protein structure'], skills: 'alphafold-structures → protein-structure-analysis → molecular-docking' },
93
- { id: 6, name: 'エビデンス合成', domain: 'literature', keywords: ['メタアナリシス', 'systematic review', '文献', 'エビデンス'], skills: 'deep-research → literature-search → meta-analysis → evidence-synthesis → academic-writing → critical-review' },
94
- { id: 7, name: '創薬パイプライン', domain: 'pharma', keywords: ['創薬', 'drug discovery', 'ADMET', 'ドッキング'], skills: 'drug-target-profilingcompound-screeningmolecular-dockingadmet-pharmacokineticsdrug-repurposing' },
95
- { id: 8, name: 'ML/XAI パイプライン', domain: 'ml', keywords: ['機械学習', 'ML', 'SHAP', 'XAI', '予測モデル'], skills: 'data-preprocessing → ml-classification → ml-regression → explainable-ai → fairness-bias → publication-figures' },
96
- { id: 9, name: '環境・生態学', domain: 'ecology', keywords: ['生態', '生物多様性', 'SDM', '環境', 'ecology'], skills: 'environmental-ecology → biodiversity-conservation → species-distribution → time-series-forecasting' },
97
- { id: 10, name: '計算材料科学', domain: 'materials', keywords: ['材料', 'materials', 'DFT', '物性'], skills: 'computational-materials → cheminformatics → molecular-dynamics → ml-regression' },
98
- { id: 11, name: '医薬品安全性', domain: 'pharma', keywords: ['有害事象', 'ファーマコビジランス', '安全性', 'adverse'], skills: 'pharmacovigilance → pharmacogenomics → regulatory-science' },
99
- { id: 12, name: '希少疾患', domain: 'clinical', keywords: ['希少疾患', 'rare disease', 'Orphanet'], skills: 'rare-disease-genetics → gene-panel-design → variant-interpretation → clinical-reporting' },
100
- { id: 13, name: 'がんゲノミクス', domain: 'oncology', keywords: ['がん', 'cancer', 'TMB', '体細胞変異'], skills: 'cancer-genomics → precision-oncology → biomarker-discovery → clinical-reporting' },
101
- { id: 14, name: 'GWAS・集団遺伝学', domain: 'genomics', keywords: ['GWAS', '集団遺伝学', 'population genetics', 'biobank'], skills: 'biobank-cohort → population-genetics → statistical-testing → publication-figures' },
102
- { id: 15, name: 'シングルセル', domain: 'genomics', keywords: ['シングルセル', 'single-cell', 'scRNA-seq', '空間トランスクリプトーム'], skills: 'cellxgene-census scvi-integrationspatial-transcriptomicsgene-regulation' },
103
- { id: 16, name: 'プロテオミクス', domain: 'omics', keywords: ['プロテオミクス', 'proteomics', '質量分析'], skills: 'proteomics → protein-structure-analysis → network-analysis' },
104
- { id: 17, name: 'メタボロミクス', domain: 'omics', keywords: ['メタボロミクス', 'metabolomics', '代謝物', '脂質'], skills: 'metabolomics → lipidomics → systems-biology → network-analysis' },
105
- { id: 18, name: 'マイクロバイオーム', domain: 'ecology', keywords: ['マイクロバイオーム', 'metagenome', '16S', '腸内細菌'], skills: 'microbiome-metagenomics → metagenome-assembled-genomes → phylogenetics → environmental-ecology' },
106
- { id: 19, name: 'パスウェイ・KG', domain: 'systems', keywords: ['パスウェイ', 'ナレッジグラフ', 'knowledge graph', 'pathway'], skills: 'gene-id-mapping → pathway-enrichment → ontology-integration → network-analysis → knowledge-graph' },
107
- { id: 20, name: '農業・食品', domain: 'agriculture', keywords: ['農業', '食品', 'agriculture', 'food safety'], skills: 'agricultural-science → food-science-nutrition → environmental-ecology' },
108
- { id: 21, name: '臨床情報学', domain: 'clinical', keywords: ['臨床', 'EHR', 'FHIR', 'OMOP', '電子カルテ'], skills: 'clinical-standards → clinical-nlp → clinical-reporting → healthcare-ai → survival-clinical' },
109
- { id: 22, name: 'ロボティクス・IoT', domain: 'engineering', keywords: ['ロボティクス', 'IoT', 'ロボット', 'robotics'], skills: 'robotics-automationlab-automationlab-data-managementinteractive-dashboard' },
110
- { id: 23, name: '実験計画・統計', domain: 'general', keywords: ['実験計画', 'DOE', '検出力', 'サンプルサイズ'], skills: 'experimental-design → statistical-testing → reproducibility-assessment → publication-figures' },
111
- { id: 24, name: '科学的可視化', domain: 'general', keywords: ['可視化', 'visualization', 'ダッシュボード', 'dashboard'], skills: 'publication-figures → interactive-dashboard' },
112
- { id: 25, name: '学術出版', domain: 'literature', keywords: ['論文投稿', 'journal', 'グラント', 'grant'], skills: 'academic-writing → critical-review → citation-network' },
113
- { id: 26, name: '科学教育', domain: 'education', keywords: ['教育', 'education', 'カリキュラム'], skills: 'science-education → reproducibility-assessment' },
91
+ {
92
+ id: 1,
93
+ name: '仮説検証→論文化',
94
+ domain: 'general',
95
+ keywords: ['仮説', '統計', '論文', 'hypothesis'],
96
+ skills:
97
+ 'hypothesis-engine data-preprocessing statistical-testingml-classificationpublication-figuresacademic-writingcritical-review',
98
+ },
99
+ {
100
+ id: 2,
101
+ name: 'バリアント→臨床',
102
+ domain: 'genomics',
103
+ keywords: ['バリアント', 'variant', 'VCF', 'WGS', 'WES'],
104
+ skills:
105
+ 'variant-interpretation pharmacogenomicsprecision-oncologyclinical-decision-supportclinical-reporting',
106
+ },
107
+ {
108
+ id: 3,
109
+ name: 'トランスクリプトーム',
110
+ domain: 'genomics',
111
+ keywords: ['RNA-seq', 'トランスクリプトーム', 'DEG', '発現'],
112
+ skills: 'rnaseq-analysispathway-enrichmentnetwork-analysispublication-figures',
113
+ },
114
+ {
115
+ id: 4,
116
+ name: 'エピジェネティクス',
117
+ domain: 'genomics',
118
+ keywords: ['エピゲノム', 'ChIP-seq', 'ATAC-seq', 'メチル化'],
119
+ skills: 'epigenomics-chromatin → regulatory-genomics → noncoding-rna → gene-regulation',
120
+ },
121
+ {
122
+ id: 5,
123
+ name: 'AlphaFold 構造解析',
124
+ domain: 'structural',
125
+ keywords: ['AlphaFold', 'タンパク質構造', '3D', 'protein structure'],
126
+ skills: 'alphafold-structures → protein-structure-analysis → molecular-docking',
127
+ },
128
+ {
129
+ id: 6,
130
+ name: 'エビデンス合成',
131
+ domain: 'literature',
132
+ keywords: ['メタアナリシス', 'systematic review', '文献', 'エビデンス'],
133
+ skills:
134
+ 'deep-research → literature-search → meta-analysis → evidence-synthesis → academic-writing → critical-review',
135
+ },
136
+ {
137
+ id: 7,
138
+ name: '創薬パイプライン',
139
+ domain: 'pharma',
140
+ keywords: ['創薬', 'drug discovery', 'ADMET', 'ドッキング'],
141
+ skills:
142
+ 'drug-target-profiling → compound-screening → molecular-docking → admet-pharmacokinetics → drug-repurposing',
143
+ },
144
+ {
145
+ id: 8,
146
+ name: 'ML/XAI パイプライン',
147
+ domain: 'ml',
148
+ keywords: ['機械学習', 'ML', 'SHAP', 'XAI', '予測モデル'],
149
+ skills:
150
+ 'data-preprocessing → ml-classification → ml-regression → explainable-ai → fairness-bias → publication-figures',
151
+ },
152
+ {
153
+ id: 9,
154
+ name: '環境・生態学',
155
+ domain: 'ecology',
156
+ keywords: ['生態', '生物多様性', 'SDM', '環境', 'ecology'],
157
+ skills: 'environmental-ecology → biodiversity-conservation → species-distribution → time-series-forecasting',
158
+ },
159
+ {
160
+ id: 10,
161
+ name: '計算材料科学',
162
+ domain: 'materials',
163
+ keywords: ['材料', 'materials', 'DFT', '物性'],
164
+ skills: 'computational-materials → cheminformatics → molecular-dynamics → ml-regression',
165
+ },
166
+ {
167
+ id: 11,
168
+ name: '医薬品安全性',
169
+ domain: 'pharma',
170
+ keywords: ['有害事象', 'ファーマコビジランス', '安全性', 'adverse'],
171
+ skills: 'pharmacovigilance → pharmacogenomics → regulatory-science',
172
+ },
173
+ {
174
+ id: 12,
175
+ name: '希少疾患',
176
+ domain: 'clinical',
177
+ keywords: ['希少疾患', 'rare disease', 'Orphanet'],
178
+ skills: 'rare-disease-genetics → gene-panel-design → variant-interpretation → clinical-reporting',
179
+ },
180
+ {
181
+ id: 13,
182
+ name: 'がんゲノミクス',
183
+ domain: 'oncology',
184
+ keywords: ['がん', 'cancer', 'TMB', '体細胞変異'],
185
+ skills: 'cancer-genomics → precision-oncology → biomarker-discovery → clinical-reporting',
186
+ },
187
+ {
188
+ id: 14,
189
+ name: 'GWAS・集団遺伝学',
190
+ domain: 'genomics',
191
+ keywords: ['GWAS', '集団遺伝学', 'population genetics', 'biobank'],
192
+ skills: 'biobank-cohort → population-genetics → statistical-testing → publication-figures',
193
+ },
194
+ {
195
+ id: 15,
196
+ name: 'シングルセル',
197
+ domain: 'genomics',
198
+ keywords: ['シングルセル', 'single-cell', 'scRNA-seq', '空間トランスクリプトーム'],
199
+ skills: 'cellxgene-census → scvi-integration → spatial-transcriptomics → gene-regulation',
200
+ },
201
+ {
202
+ id: 16,
203
+ name: 'プロテオミクス',
204
+ domain: 'omics',
205
+ keywords: ['プロテオミクス', 'proteomics', '質量分析'],
206
+ skills: 'proteomics → protein-structure-analysis → network-analysis',
207
+ },
208
+ {
209
+ id: 17,
210
+ name: 'メタボロミクス',
211
+ domain: 'omics',
212
+ keywords: ['メタボロミクス', 'metabolomics', '代謝物', '脂質'],
213
+ skills: 'metabolomics → lipidomics → systems-biology → network-analysis',
214
+ },
215
+ {
216
+ id: 18,
217
+ name: 'マイクロバイオーム',
218
+ domain: 'ecology',
219
+ keywords: ['マイクロバイオーム', 'metagenome', '16S', '腸内細菌'],
220
+ skills: 'microbiome-metagenomics → metagenome-assembled-genomes → phylogenetics → environmental-ecology',
221
+ },
222
+ {
223
+ id: 19,
224
+ name: 'パスウェイ・KG',
225
+ domain: 'systems',
226
+ keywords: ['パスウェイ', 'ナレッジグラフ', 'knowledge graph', 'pathway'],
227
+ skills: 'gene-id-mapping → pathway-enrichment → ontology-integration → network-analysis → knowledge-graph',
228
+ },
229
+ {
230
+ id: 20,
231
+ name: '農業・食品',
232
+ domain: 'agriculture',
233
+ keywords: ['農業', '食品', 'agriculture', 'food safety'],
234
+ skills: 'agricultural-science → food-science-nutrition → environmental-ecology',
235
+ },
236
+ {
237
+ id: 21,
238
+ name: '臨床情報学',
239
+ domain: 'clinical',
240
+ keywords: ['臨床', 'EHR', 'FHIR', 'OMOP', '電子カルテ'],
241
+ skills: 'clinical-standards → clinical-nlp → clinical-reporting → healthcare-ai → survival-clinical',
242
+ },
243
+ {
244
+ id: 22,
245
+ name: 'ロボティクス・IoT',
246
+ domain: 'engineering',
247
+ keywords: ['ロボティクス', 'IoT', 'ロボット', 'robotics'],
248
+ skills: 'robotics-automation → lab-automation → lab-data-management → interactive-dashboard',
249
+ },
250
+ {
251
+ id: 23,
252
+ name: '実験計画・統計',
253
+ domain: 'general',
254
+ keywords: ['実験計画', 'DOE', '検出力', 'サンプルサイズ'],
255
+ skills: 'experimental-design → statistical-testing → reproducibility-assessment → publication-figures',
256
+ },
257
+ {
258
+ id: 24,
259
+ name: '科学的可視化',
260
+ domain: 'general',
261
+ keywords: ['可視化', 'visualization', 'ダッシュボード', 'dashboard'],
262
+ skills: 'publication-figures → interactive-dashboard',
263
+ },
264
+ {
265
+ id: 25,
266
+ name: '学術出版',
267
+ domain: 'literature',
268
+ keywords: ['論文投稿', 'journal', 'グラント', 'grant'],
269
+ skills: 'academic-writing → critical-review → citation-network',
270
+ },
271
+ {
272
+ id: 26,
273
+ name: '科学教育',
274
+ domain: 'education',
275
+ keywords: ['教育', 'education', 'カリキュラム'],
276
+ skills: 'science-education → reproducibility-assessment',
277
+ },
114
278
  ];
115
279
 
116
280
  function pipelineSuggest() {
117
- const readline = require('readline');
281
+ const readline = require('node:readline');
118
282
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
119
283
 
120
284
  const ask = (q) => new Promise((resolve) => rl.question(q, resolve));
@@ -184,6 +348,138 @@ function showVersion() {
184
348
  console.log(pkg.version);
185
349
  }
186
350
 
351
+ // ── Validate ──
352
+
353
+ function parseFrontmatter(content) {
354
+ const match = content.match(/^---\n([\s\S]*?)\n---/);
355
+ if (!match) return null;
356
+ const yaml = match[1];
357
+ const name = yaml.match(/^name:\s*(.+)$/m)?.[1]?.trim();
358
+ const hasDescription = /^description:/m.test(yaml);
359
+ return { name, hasDescription };
360
+ }
361
+
362
+ function validate() {
363
+ const verbose = FLAGS.includes('--verbose');
364
+ const skillsDir = path.join(SOURCE_DIR, 'skills');
365
+
366
+ if (!fs.existsSync(skillsDir)) {
367
+ console.error('Error: skills directory not found:', skillsDir);
368
+ process.exit(1);
369
+ }
370
+
371
+ const dirs = fs
372
+ .readdirSync(skillsDir)
373
+ .filter((d) => d.startsWith('scientific-'))
374
+ .sort();
375
+ let pass = 0;
376
+ let fail = 0;
377
+ const errors = [];
378
+
379
+ for (const dir of dirs) {
380
+ const filePath = path.join(skillsDir, dir, 'SKILL.md');
381
+ const issues = [];
382
+
383
+ if (!fs.existsSync(filePath)) {
384
+ issues.push('SKILL.md が見つかりません');
385
+ } else {
386
+ const content = fs.readFileSync(filePath, 'utf-8');
387
+ const fm = parseFrontmatter(content);
388
+
389
+ if (!fm) issues.push('YAML Frontmatter がありません');
390
+ else {
391
+ if (!fm.name) issues.push('Frontmatter に name がありません');
392
+ else if (fm.name !== dir) issues.push(`name 不一致: "${fm.name}" (期待値: "${dir}")`);
393
+ if (!fm.hasDescription) issues.push('Frontmatter に description がありません');
394
+ }
395
+
396
+ if (!/^# .+$/m.test(content)) issues.push('H1 タイトルがありません');
397
+ if (!/^## When to Use/m.test(content)) issues.push('## When to Use セクションがありません');
398
+ if (!/^## Quick Start/m.test(content)) issues.push('## Quick Start セクションがありません');
399
+ if (!/```(?:python|markdown|json)/.test(content)) issues.push('コードブロックがありません');
400
+ }
401
+
402
+ if (issues.length === 0) {
403
+ pass++;
404
+ if (verbose) console.log(` ✔ ${dir}`);
405
+ } else {
406
+ fail++;
407
+ errors.push({ dir, issues });
408
+ if (verbose) {
409
+ console.log(` ✘ ${dir}`);
410
+ for (const issue of issues) console.log(` - ${issue}`);
411
+ }
412
+ }
413
+ }
414
+
415
+ console.log(`\n📋 SKILL.md 検証結果: ${pass} pass / ${fail} fail (全 ${dirs.length} スキル)`);
416
+
417
+ if (errors.length > 0 && !verbose) {
418
+ console.log('\n問題のあるスキル:');
419
+ for (const e of errors) {
420
+ console.log(` ✘ ${e.dir}: ${e.issues.join(', ')}`);
421
+ }
422
+ }
423
+
424
+ if (fail > 0) {
425
+ console.log('\n詳細は --verbose オプションで確認してください。');
426
+ process.exit(1);
427
+ } else {
428
+ console.log('\n✔ 全スキルの検証に成功しました。');
429
+ }
430
+ }
431
+
432
+ // ── Stats ──
433
+
434
+ function stats() {
435
+ const skillsDir = path.join(SOURCE_DIR, 'skills');
436
+
437
+ if (!fs.existsSync(skillsDir)) {
438
+ console.error('Error: skills directory not found:', skillsDir);
439
+ process.exit(1);
440
+ }
441
+
442
+ const dirs = fs
443
+ .readdirSync(skillsDir)
444
+ .filter((d) => d.startsWith('scientific-'))
445
+ .sort();
446
+ const totalSkills = dirs.length;
447
+ let tuLinked = 0;
448
+ let totalCodeBlocks = 0;
449
+ const tuPattern = /ToolUniverse|利用可能ツール|SMCP/i;
450
+ const tuKeyPattern = /`([A-Z][a-zA-Z]*_[a-z]+_[a-z_]+)`/g;
451
+ const allTuKeys = new Set();
452
+
453
+ for (const dir of dirs) {
454
+ const filePath = path.join(skillsDir, dir, 'SKILL.md');
455
+ if (!fs.existsSync(filePath)) continue;
456
+ const content = fs.readFileSync(filePath, 'utf-8');
457
+
458
+ if (tuPattern.test(content)) tuLinked++;
459
+
460
+ const codeBlocks = content.match(/```(?:python|markdown|json)/g);
461
+ if (codeBlocks) totalCodeBlocks += codeBlocks.length;
462
+
463
+ for (const m of content.matchAll(tuKeyPattern)) {
464
+ allTuKeys.add(m[1]);
465
+ }
466
+ }
467
+
468
+ const coverage = ((tuLinked / totalSkills) * 100).toFixed(1);
469
+ const pkg = require(path.join(PACKAGE_ROOT, 'package.json'));
470
+
471
+ console.log(`
472
+ 📊 SATORI v${pkg.version} — 統計
473
+
474
+ スキル総数: ${totalSkills}
475
+ パイプライン数: ${PIPELINES.length}
476
+ TU 連携スキル: ${tuLinked} (${coverage}%)
477
+ TU 未連携: ${totalSkills - tuLinked}
478
+ ユニーク TU キー: ${allTuKeys.size}
479
+ コードブロック総数: ${totalCodeBlocks}
480
+ `);
481
+ }
482
+
187
483
  switch (COMMAND) {
188
484
  case 'init':
189
485
  init();
@@ -199,6 +495,12 @@ switch (COMMAND) {
199
495
  process.exit(1);
200
496
  }
201
497
  break;
498
+ case 'validate':
499
+ validate();
500
+ break;
501
+ case 'stats':
502
+ stats();
503
+ break;
202
504
  case 'help':
203
505
  case '--help':
204
506
  case '-h':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nahisaho/satori",
3
- "version": "0.25.5",
3
+ "version": "0.26.0",
4
4
  "description": "SATORI — Agent Skills for Science. GitHub Copilot Agent Skills collection for scientific data analysis.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -11,7 +11,17 @@
11
11
  "src/.github/"
12
12
  ],
13
13
  "scripts": {
14
- "test": "node bin/satori.js init --dry-run"
14
+ "test": "vitest run",
15
+ "test:watch": "vitest",
16
+ "test:unit": "vitest run tests/unit/",
17
+ "test:validation": "vitest run tests/validation/",
18
+ "test:coverage": "vitest run --coverage",
19
+ "validate:skills": "vitest run tests/validation/skill-format.test.js",
20
+ "validate:tu": "vitest run tests/validation/tu-coverage.test.js",
21
+ "lint": "biome check bin/ tests/ vitest.config.js",
22
+ "lint:fix": "biome check --write bin/ tests/ vitest.config.js",
23
+ "format": "biome format --write bin/ tests/ vitest.config.js",
24
+ "prepare": "husky"
15
25
  },
16
26
  "keywords": [
17
27
  "copilot",
@@ -25,5 +35,25 @@
25
35
  "repository": {
26
36
  "type": "git",
27
37
  "url": "git+https://github.com/nahisaho/satori.git"
38
+ },
39
+ "engines": {
40
+ "node": ">=18"
41
+ },
42
+ "devDependencies": {
43
+ "@biomejs/biome": "^2.3.15",
44
+ "husky": "^9.1.7",
45
+ "lint-staged": "^16.2.7",
46
+ "vitest": "^4.0.18"
47
+ },
48
+ "lint-staged": {
49
+ "bin/**/*.js": [
50
+ "biome check --write"
51
+ ],
52
+ "tests/**/*.js": [
53
+ "biome check --write"
54
+ ],
55
+ "vitest.config.js": [
56
+ "biome check --write"
57
+ ]
28
58
  }
29
59
  }
@@ -5,6 +5,10 @@ description: |
5
5
  Elsevier 系のジャーナル形式に対応した論文構成・セクション設計・文章パターンを提供。
6
6
  「論文を書いて」「Abstract を作成して」「Methods セクションを書いて」で発火。
7
7
  assets/ に主要ジャーナル形式の Markdown テンプレートを同梱。
8
+ tu_tools:
9
+ - key: crossref
10
+ name: Crossref
11
+ description: 論文メタデータ検索・引用情報取得
8
12
  ---
9
13
 
10
14
  # Scientific Academic Writing
@@ -464,6 +468,12 @@ needed and take full responsibility for the content of the publication.
464
468
  [SI 内でのみ引用した文献]
465
469
  ```
466
470
 
471
+ ## ToolUniverse 連携
472
+
473
+ | TU Key | ツール名 | 連携内容 |
474
+ |--------|---------|--------|
475
+ | `crossref` | Crossref | 論文メタデータ検索・引用情報取得 |
476
+
467
477
  ## References
468
478
 
469
479
  ### Output Files
@@ -5,6 +5,10 @@ description: |
5
5
  Query-by-Committee・期待モデル変化・プール型/ストリーム型・
6
6
  バッチアクティブラーニング・停止基準判定・
7
7
  モデル改善パイプライン。
8
+ tu_tools:
9
+ - key: openml
10
+ name: OpenML
11
+ description: 能動学習データセット・評価指標
8
12
  ---
9
13
 
10
14
  # Scientific Active Learning
@@ -287,3 +291,9 @@ eda-correlation → active-learning → ml-classification
287
291
  | `al_history.csv` | AL ラウンド履歴 | → 停止判定 |
288
292
  | `selected_samples.csv` | 選択サンプル | → ラベル付け |
289
293
  | `strategy_comparison.csv` | 戦略比較 | → advanced-visualization |
294
+
295
+ ## ToolUniverse 連携
296
+
297
+ | TU Key | ツール名 | 連携内容 |
298
+ |--------|---------|--------|
299
+ | `openml` | OpenML | 能動学習データセット・評価指標 |
@@ -4,6 +4,10 @@ description: |
4
4
  適応的実験計画スキル。多腕バンディット (Thompson Sampling/UCB)・
5
5
  ベイズ適応設計・逐次検定 (SPRT)・
6
6
  Response-Adaptive Randomization・早期停止規則。
7
+ tu_tools:
8
+ - key: biotools
9
+ name: bio.tools
10
+ description: 適応的実験設計ツール検索
7
11
  ---
8
12
 
9
13
  # Scientific Adaptive Experiments
@@ -285,3 +289,9 @@ def bayesian_adaptive_dose_finding(dose_levels, n_patients=30,
285
289
  | `bandit_summary.csv` | バンディット結果 | → 最適アーム |
286
290
  | `sprt_history.csv` | SPRT 検定履歴 | → 判定結果 |
287
291
  | `dose_finding.csv` | 用量探索結果 | → MTD 推定 |
292
+
293
+ ## ToolUniverse 連携
294
+
295
+ | TU Key | ツール名 | 連携内容 |
296
+ |--------|---------|--------|
297
+ | `biotools` | bio.tools | 適応的実験設計ツール検索 |
@@ -4,6 +4,10 @@ description: |
4
4
  高度バイオイメージング解析スキル。CellProfiler によるモフォロジカル
5
5
  プロファイリング・Cell Painting 解析、Cellpose による深層学習
6
6
  セルセグメンテーション、napari によるインタラクティブ 3D 可視化。
7
+ tu_tools:
8
+ - key: biotools
9
+ name: bio.tools
10
+ description: 高度イメージングツール検索
7
11
  ---
8
12
 
9
13
  # Scientific Advanced Imaging
@@ -380,3 +384,9 @@ fluorescence-microscopy ──┘ drug-target-profiling
380
384
  | `results/features.csv` | 形態学的特徴量マトリクス | → cheminformatics |
381
385
  | `results/cell_painting.csv` | Cell Painting プロファイル | → drug-target-profiling |
382
386
  | `results/model/` | 微調整 Cellpose モデル | — |
387
+
388
+ ## ToolUniverse 連携
389
+
390
+ | TU Key | ツール名 | 連携内容 |
391
+ |--------|---------|--------|
392
+ | `biotools` | bio.tools | 高度イメージングツール検索 |
@@ -4,6 +4,10 @@ description: |
4
4
  科学データ高度可視化スキル。Plotly インタラクティブ 3D ・
5
5
  Altair 宣言的可視化・Seaborn 統計プロット・
6
6
  アニメーション・Parallel Coordinates・出版品質図。
7
+ tu_tools:
8
+ - key: biotools
9
+ name: bio.tools
10
+ description: 高度可視化ツール検索
7
11
  ---
8
12
 
9
13
  # Scientific Advanced Visualization
@@ -308,3 +312,9 @@ eda-correlation → advanced-visualization → presentation-design
308
312
  | `publication_fig.pdf` | 出版品質図 | → presentation |
309
313
  | `parallel_coordinates.html` | 多変量可視化 | → reporting |
310
314
  | `animation.html` | アニメーション | → presentation |
315
+
316
+ ## ToolUniverse 連携
317
+
318
+ | TU Key | ツール名 | 連携内容 |
319
+ |--------|---------|--------|
320
+ | `biotools` | bio.tools | 高度可視化ツール検索 |