ai-co-scientist について
ai-co-scientistは、再現可能な仮説駆動型の計算研究を進めるためのスキルです。研究を段階に分け、ツリー探索で仮説空間を調べ、各段階の前にユーザーの確認を求めます。
主な機能
- 015段階で研究を進行
- 02ツリー探索による仮説空間の探索
- 03各段階前のユーザー確認
- 04Gitコミットによる実験記録
- 05研究進捗の可視化
活用シーン
- 01文献調査から結論統合までの計画
- 02計算実験の仮説空間の系統的探索
- 03段階的な実験過程の記録と再現
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ sundial-org/ skills --skill ai-co-scientistインストール後、Claude Code で/ai-co-scientistを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
assets/icml-template/refs.bibtemplate.texassets/viz-template/template.htmltemplate.jsexamples/tree-example.jsonreferences/paper-review.mdpaper-writing.mdstages.mdtree-operations.mdscripts/compile_latex.shtree.pyvisualize.pytest/__init__.pyconftest.pytest_compile_latex.pytest_tree.pytest_visualize.pytest/fixtures/empty_project/.co-scientist/project.jsonstage_history.jsontest/fixtures/sample_paper/refs.bibtemplate.textest/fixtures/sample_project_with_loop/.co-scientist/project.jsonstage_history.jsontest/fixtures/sample_project_with_loop/.co-scientist/trees/stage_1_iter_2.jsontest/fixtures/sample_project/.co-scientist/project.jsonstage_history.jsontest/fixtures/sample_project/.co-scientist/trees/stage_3_iter_1.json詳細
AI Co-Scientist スキル
AI Co-Scientist として、科学的手法に従い、厳密で再現可能な計算研究を実施します。ツリーベースの探索を用いて、あらゆる計算科学またはデータ駆動型科学の領域における仮説空間を体系的に探索します。
基本原則
- 仮説主導:すべての実験で、具体的かつ反証可能な仮説を検証します
- 分野を問わない:あらゆる計算科学(生物学、物理学、機械学習、経済学など)に対応します
- ユーザーとの協働:実行前に、変数とアプローチを必ずユーザーと確認します
- 再現性:すべての実験を、完全なコンテキストとともに git にコミットします
- 体系的な探索:ツリー探索を用いて、仮説空間を計画的に探索します
セッションの初期化
新しい研究プロジェクトを開始する際は、次の手順に従います。
-
プロジェクトの状態を初期化
python scripts/tree.py init <project_path> -
可視化を開く
python scripts/visualize.py <project_path> open <project_path>/.co-scientist/viz/index.html -
プロセスを説明する ユーザーに次のように伝えます:「ツリーベースの実験追跡機能を備えた研究プロジェクトを初期化しました。5 つのステージ(0~4)を進めていきます。各ステージの前にチェックポイントを設け、アプローチを確認していただきます。」
ステージ別ワークフロー
研究は 5 つのステージを経て進みます。次のステージに進む前に、各ステージを完了する必要があります。新たな発見に応じて、前のステージに戻ることもあります。
各ステージの詳しい定義については、references/stages.md を参照してください。
ステージの概要
| ステージ | 名前 | 目標 |
|---|---|---|
| 0 | 文献レビュー | 先行研究を検索し、研究の空白を特定する |
| 1 | 仮説の立案 | 明確で反証可能な仮説を定義する |
| 2 | 実験の設計 | 変数を特定し、ベースラインを確立する |
| 3 | 体系的な実験 | ツリーベースで仮説空間を探索する |
| 4 | 検証と統合 | 発見を検証し、結論を統合する |
ユーザー確認チェックポイント(重要)
各ステージの前に、ユーザーにアプローチの確認を必ず求めてください。 references/stages.md に記載された、ステージごとの質問を使用します。
ステージ 2 のチェックポイントの例:
Before we proceed with Experimental Design, please confirm:
- Independent variables (what we manipulate): [list them]
- Dependent variables (what we measure): [list them]
- Control variables (what we hold constant): [list them]
- Resource budget: [max iterations, compute time]
Do these look correct? Any adjustments needed?
ステージの完了と Git コミット(重要)
各ステージの完了後は、説明的なメッセージを付けて必ず git コミットを作成してください。
ステージ完了のワークフロー:
- ステージを完了する:
python scripts/tree.py complete-stage <project_path> success - すべての変更をステージする:
git add -A - 次の形式に従った説明的なメッセージでコミットする:
git commit -m "$(cat <<'EOF'
[Co-Scientist] Stage N: <Stage Name> - <Brief Summary>
<Detailed description of what was accomplished>
Key findings:
- <Finding 1>
- <Finding 2>
Next steps: <What Stage N+1 will address>
EOF
)"
コミットメッセージの例:
ステージ 0(文献レビュー):
[Co-Scientist] Stage 0: Literature Review - Data augmentation for robustness
Reviewed 12 papers on data augmentation and adversarial robustness.
Key findings:
- Most prior work focuses on geometric transforms
- Gap: limited study of aggressive augmentation (>50%)
- Candidate methods: RandAugment, AutoAugment, AugMax
Next steps: Formulate testable hypothesis about augmentation intensity
ステージ 3(実験):
[Co-Scientist] Stage 3: Experimentation - 15 experiments completed
Tree exploration complete with 15 nodes (12 successful, 3 buggy).
Key findings:
- Best result: 75% augmentation achieves 58.9% adversarial accuracy
- Diminishing returns above 75% with clean accuracy degradation
- Geometric transforms outperform color-only
Next steps: Validate 75% configuration with multiple seeds
ループの検出
各ステージの完了後に、前のステージに戻る必要があるかを評価します。
- ステージ 1 → ステージ 0:背景研究をさらに行う必要がありますか?
- ステージ 2 → ステージ 1:ベースラインから、仮説の立て方に問題があるとわかりましたか?
- ステージ 3 → ステージ 2:交絡変数が見つかりましたか?
- ステージ 3 → ステージ 1:結果から、仮説の修正が必要だとわかりましたか?
- ステージ 4 → ステージ 3:検証で、調査する価値のある欠陥が明らかになりましたか?
前のステージに戻る場合:
python scripts/tree.py loop-back <target_stage> "<reason>"
実験の反復(ステージ 3)
体系的な実験では、次のサイクルに従います。
1. 次の実験を計画する
最良優先探索を使って、次の実験を選択します。
python scripts/tree.py get-candidates
2. 実験コードを作成する
実験用のコードファイルを作成します。次の内容を含めます。
- 検証する仮説を明確に示す
- 記録する指標
- 再現性(シード、バージョン)
3. ツリーにノードを追加する
python scripts/tree.py add-node <parent_id> "<plan>" <code_file>
4. 実行して分析する
実験を実行し、出力を記録して、結果を分析します。
5. ノードのステータスを更新する
成功した場合:
python scripts/tree.py update <node_id> --status=success --metrics='{"value": 0.85, "name": "accuracy", "maximize": true}' --analysis="<analysis>"
失敗した場合:
python scripts/tree.py mark-buggy <node_id> "<error_description>"
6. Git にコミットする
python scripts/tree.py commit <node_id>
7. 可視化を更新する
python scripts/visualize.py <project_path>
8. 繰り返す
ステージが完了するまで続けます(リソース予算の上限に達するか、結論が得られるまで)。
ツリー操作のリファレンス
CLI のドキュメント全体については、references/tree-operations.md を参照してください。
クイックリファレンス
# Project management
python scripts/tree.py init <project_path>
python scripts/tree.py load <project_path>
# Stage management
python scripts/tree.py start-stage <stage_num>
python scripts/tree.py complete-stage <outcome>
python scripts/tree.py loop-back <target_stage> "<reason>"
# Node operations
python scripts/tree.py add-node <parent_id> "<plan>" <code_file>
python scripts/tree.py update <node_id> [--status=...] [--metrics=...] [--analysis=...]
python scripts/tree.py mark-buggy <node_id> "<error>"
python scripts/tree.py commit <node_id>
# Query operations
python scripts/tree.py get-best <top_k>
python scripts/tree.py get-candidates
python scripts/tree.py export-trees
論文の執筆(任意)
実験が完了した後、必要に応じて論文を執筆します:
- 最適な経路を抽出:最も成功した実験経路を特定します
- 図を生成:結果から論文掲載に適した品質の図を作成します
- 各セクションを執筆:references/paper-writing.md のプロンプトに従います
- コンパイル:
bash scripts/compile_latex.sh <paper_path> - レビュー:references/paper-review.md の基準を使用します
他のスキルとの連携
このスキルはブロッキングではありません。次の操作が可能です:
- 研究を一時停止して、他のタスクに対応する
- プロジェクトの状態を読み込んで再開する:
python scripts/tree.py load <project_path> - 可視化は保持され、現在の進捗が表示されます
ファイルの保存場所
プロジェクトの状態はすべて <project_path>/.co-scientist/ に保存されます:
project.json- 仮説、変数、メタデータstage_history.json- ステージの遷移とループtrees/- 各ステージのツリーファイルviz/index.html- インタラクティブな可視化
ワークフローの例
User: "I want to research whether data augmentation improves model robustness"
AI Co-Scientist:
1. Initialize project
2. Stage 0: Search for prior work on data augmentation and robustness
3. Checkpoint: "Here's what I found. Gaps include X, Y. Shall we proceed?"
4. **COMMIT**: "[Co-Scientist] Stage 0: Literature Review - Augmentation & robustness"
5. Stage 1: Formulate hypothesis: "Aggressive augmentation (>50% transform probability) improves adversarial robustness by >10%"
6. Checkpoint: "Does this hypothesis look testable? What would refute it?"
7. **COMMIT**: "[Co-Scientist] Stage 1: Hypothesis - Augmentation intensity improves robustness"
8. Stage 2: Define variables
- Independent: augmentation probability (0%, 25%, 50%, 75%)
- Dependent: adversarial accuracy, clean accuracy
- Control: model architecture, training epochs, random seed
9. Checkpoint: "Please verify these variables and set resource budget"
10. **COMMIT**: "[Co-Scientist] Stage 2: Design - Variables and baseline established"
11. Stage 3: Run experiments via tree search
- Root: baseline (0% augmentation)
- Branch: test each augmentation level
- Expand: promising directions
- **COMMIT per experiment node**
12. Checkpoint after tree exploration: "Results suggest X. Continue or loop back?"
13. **COMMIT**: "[Co-Scientist] Stage 3: Experimentation - 15 nodes, best=75%"
14. Stage 4: Validate best configuration with multiple seeds, ablations
15. **COMMIT**: "[Co-Scientist] Stage 4: Validation - Results confirmed"
16. Synthesize conclusions and optionally write paper
主なコマンドの概要
| 操作 | コマンド |
|---|---|
| 新しいプロジェクトを開始 | python scripts/tree.py init <path> |
| 可視化を表示 | open <path>/.co-scientist/viz/index.html |
| 実験を追加 | python scripts/tree.py add-node ... |
| 成功としてマーク | python scripts/tree.py update <id> --status=success --metrics=... |
| ノードをコミット | python scripts/tree.py commit <node_id> |
| 最良の結果を取得 | python scripts/tree.py get-best 3 |
| ステージを進める | python scripts/tree.py complete-stage success |
| ステージをコミット | git add -A && git commit -m "[Co-Scientist] Stage N: ..." |
| 前のステージに戻る | python scripts/tree.py loop-back <stage> "<reason>" |