@dogfood-lab/study-swarm 0.6.0 → 1.0.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.
- package/CHANGELOG.md +40 -0
- package/PROTOCOL.md +30 -2
- package/README.es.md +68 -31
- package/README.fr.md +69 -32
- package/README.hi.md +67 -30
- package/README.it.md +71 -34
- package/README.ja.md +73 -36
- package/README.md +41 -4
- package/README.pt-BR.md +73 -36
- package/README.zh.md +74 -37
- package/SECURITY.md +6 -6
- package/bin/study-swarm.mjs +176 -48
- package/examples/study-swarm-ci.yml +28 -0
- package/examples/study-swarm-self.dispatch.md +46 -0
- package/package.json +2 -1
package/README.ja.md
CHANGED
|
@@ -13,77 +13,114 @@
|
|
|
13
13
|
<img src="https://img.shields.io/badge/cited%20research-verified-1f6feb" alt="Cited research, verified">
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
**引用された研究に基づいて設計上の決定を обосновывайте, そして、それらの決定が公式なものになる前に、*異なる*モデルファミリーを使用して引用の正確性を検証してください。**
|
|
17
17
|
|
|
18
|
-
`study-swarm
|
|
18
|
+
`study-swarm`はツールではなくプロトコルです。大規模言語モデル(LLM)を使用して重要な設計上の決定を行う場合(新しい製品レイヤー、アーキテクチャの選択、「ここでモデルを信頼すべきか」という判断など)、最初から即興で進めるのではなく、事前に研究を行い、その結果に基づいて設計すると、時代遅れの設計になったり、存在しない情報源や誤った情報を基にした設計になってしまう可能性があります。`study-swarm`はこれらの問題を解決します。複数の研究エージェントを並行して実行し、特定の引用された調査結果を要求し、すべての引用について**異なるモデルファミリーの外部検証者**を通じて確認してから、それを設計に反映させます。
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
これは、自らその方法を採用しています。このプロトコルでは、システムがどのように設計されるかを支援する際に、検証者によって保護された情報を提供するように規定されており、そのため、このプロトコル自体にも適用されます。**プロトコルを実行しているモデルであっても、自分の宿題を評価することはできません。**
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## このプロトコルは5つのステップで構成されます
|
|
23
23
|
|
|
24
|
-
1.
|
|
25
|
-
2.
|
|
26
|
-
3.
|
|
27
|
-
4.
|
|
28
|
-
5.
|
|
24
|
+
1. **特定する**: 経験的な証拠によって回答が変わる可能性のある3〜5個の重要な設計上の質問を特定します。
|
|
25
|
+
2. **実行する**: 各質問に対して、複数の研究エージェントを並行して実行します。各エージェントは、論文タイトル+著者+発表年+URL+1文の調査結果を返します(広範囲よりも具体性を重視、「6〜8件の信頼できる調査結果が、20件の曖昧な情報よりも優れている」)。
|
|
26
|
+
3. **統合する**: 調査結果を「研究による根拠」セクションにまとめます。`N. <調査結果>。<著者><年>(<arXiv/DOI>)。<設計への影響>。`
|
|
27
|
+
4. **外部で検証する**: *異なるモデルファミリー*(推論機能を削除したもの)を使用して、すべての引用について2段階のチェックを行います。まず、**検索オラクル**が論文が存在することを確認します(モデルの記憶ではなく)。次に、「根拠」フィルターが、調査結果が情報源と一致するかどうかを確認します。**捏造または誤った帰属がある場合は、処理を停止します。検証者または検索オラクルが利用できない場合は、処理を停止し、エスカレーションします(ただし、利用できないことを「引用は問題ない」と解釈しないでください)。
|
|
28
|
+
5. **関連付ける**: 各アーキテクチャの選択について、番号を使用して対応する調査結果に関連付けます。設計への影響がない引用はノイズです。
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
完全な実行可能な詳細(停止テーブル、情報源に関する標準、アンサンブルルール)は、**[PROTOCOL.md](PROTOCOL.md)**に記載されています。
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## なぜ*異なる*モデルファミリーで、推論機能を削除する必要があるのでしょうか?
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
その理由は、失敗モードが仮説ではなく、実際に確認されているからです。
|
|
35
35
|
|
|
36
|
-
- **LLM
|
|
37
|
-
-
|
|
38
|
-
- **LLM
|
|
39
|
-
-
|
|
40
|
-
-
|
|
36
|
+
- **LLMは、自分の出力を確実に検証できません**。Huang et al. 2023 ([arXiv:2310.01798](https://arxiv.org/abs/2310.01798)); Kambhampati et al. 2024 ([arXiv:2402.01817](https://arxiv.org/abs/2402.01817), LLM-Modulo); Stechly et al. 2024 ([arXiv:2402.08115](https://arxiv.org/abs/2402.08115)) — 外部検証者がそのメリットをもたらします。自己批判的な内容は効果がありません。
|
|
37
|
+
- **同じファミリーの評価者は、自分を高く評価する傾向があります**。Panickssery, Bowman & Feng 2024 ([arXiv:2404.13076](https://arxiv.org/abs/2404.13076)) — 自己認識と自己選好は*線形に*相関するため、部分的なブラインド処理だけでは効果がありません。Verga et al. 2024 ([arXiv:2404.18796](https://arxiv.org/abs/2404.18796), PoLL) — 異なるファミリーのパネルを使用すると、約7分の1のコストで偏りが少なくなります。
|
|
38
|
+
- **LLMは、引用において嘘をつきます**。Walters & Wilder 2023 ([doi:10.1038/s41598-023-41032-5](https://doi.org/10.1038/s41598-023-41032-5)) — GPT-3.5の55%、GPT-4の18%の引用が捏造されています。Onweller et al. 2026 ([arXiv:2605.06635](https://arxiv.org/abs/2605.06635)) — リンクは94%以上の確率で解決されますが、実際に引用された内容が主張を裏付けているのは、39〜77%に過ぎません。したがって、存在を確認するには、**検索ではなく、リコールを使用する必要があります。**
|
|
39
|
+
- **生成者の推論を隠します**。Khalifa et al. 2026 ([arXiv:2601.14691](https://arxiv.org/abs/2601.14691), "Gaming the Judge") — 操作された連鎖思考だけでは、評価者の誤検出率が最大90%まで増加します(ただし、アクションは固定されています)。Turpin et al. 2023 ([arXiv:2305.04388](https://arxiv.org/abs/2305.04388)) — CoTは事後的な合理化です。検証者は、単なる引用の主張のみを確認し、「なぜこれを含めたのか」という理由は確認しません。
|
|
40
|
+
- **多様性は数よりも重要です**。Rajan 2025 ([arXiv:2511.16708](https://arxiv.org/abs/2511.16708)) — ペアワイズ相関ρ∈[0.05, 0.25]の4つの検証者は、サブモジュールカバレッジによって、単一の検証者よりも優れた結果をもたらします。Kim et al. 2025 ([arXiv:2506.07962](https://arxiv.org/abs/2506.07962)) — LLMのエラーは*相関しているため、重要な変数はレンズの多様性であり、単純な数ではありません。
|
|
41
41
|
|
|
42
42
|
## 実際に機能するのでしょうか?(証拠)
|
|
43
43
|
|
|
44
|
-
テストとして、このプロトコルを自分の引用に対して実行しました。2
|
|
44
|
+
テストとして、このプロトコルを自分の引用に対して実行しました。2つの非類似のモデルファミリー(**Mistral** (`mistral-small:24b`)と**IBM Granite** (`granite4.1:30b`))を使用して、推論機能を削除した状態で、2つの意図的な罠を含む引用セットを確認しました。
|
|
45
45
|
|
|
46
|
-
|
|
|
46
|
+
| 仕掛けられた罠 | Mistral | IBM Granite | 真実 |
|
|
47
47
|
|---|---|---|---|
|
|
48
|
-
| 「Nakamura & Olsen
|
|
49
|
-
| 「98
|
|
48
|
+
| 「Nakamura & Olsen」に帰属された連鎖思考プロンプト | 見逃した | **検出**(誤った帰属→実際にはWei et al. 2022、arXiv:2201.11903) | 誤って帰属された |
|
|
49
|
+
| 「98%のエラーが除去され、オラクルは不要」という捏造された論文 | **caught** (fabricated) | **caught** (fabricated) | 捏造された |
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
どちらのモデルも単独では両方の罠を検出できませんでしたが、**組み合わせることで2/2を検出しました**。単一の評価者であれば、誤った帰属をそのまま採用してしまいます。また、検索オラクルは、当社の設計ドキュメントにある2つの*実際の*誤った帰属(間違った最初の著者に引用された論文)を検出し、どのパラメトリックLLMも検出できなかったことに加え、両方のLLMがトレーニングデータ以降に発表されたため、捏造されたと誤って判断した実際の2026年の論文を正しく確認しました。最後の点が、ステップ4の存在チェックが**検索オラクルでなければならない理由であり、LLMであってはならない理由です。**
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
この単一の実行は、ミニチュア版の論文です。**相関性の低いレンズと、存在を確認するための検索オラクルを組み合わせることで、いかに優れた評価者よりも優れた結果が得られるかを示しています。**
|
|
54
54
|
|
|
55
55
|
## その仕組み
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
手動でプロトコルを実行できます。異なるモデルと、ご自身でarXiv/DOIを解決することで、ステップ4を満たします。2つの関連ツールが連携して、1つのコマンドとして実行されます。
|
|
58
58
|
|
|
59
|
-
- **[prism-verify](https://github.com/mcp-tool-shop-org/prism-verify)** —
|
|
60
|
-
- **[role-os](https://github.com/mcp-tool-shop-org/role-os)** — `roleos verify-citations <dispatch
|
|
59
|
+
- **[prism-verify](https://github.com/mcp-tool-shop-org/prism-verify)** — 実行時の検証ツール:異なるモデル間のルーティング、推論の簡略化、多角的な判断、決定的な検索による存在確認(arXiv → Crossref)、署名されたレシート。
|
|
60
|
+
- **[role-os](https://github.com/mcp-tool-shop-org/role-os)** — `roleos verify-citations <dispatch>`を提供します。これは、ディスパッチの引用を抽出し、prismを通じて検証する実行ツールです。
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
ハンドオフは、ディスパッチ形式そのものです。「N. **finding.** 著者 年 (arXiv|DOI). 含意。」という形式で記述された調査結果(**各調査結果に対して解決可能な識別子を1つだけ使用**)が、`roleos verify-citations`によって抽出され、検証されます。 `lint`によるチェックに合格したディスパッチは問題なく処理されます。形式が正しくない引用は、実行ツールによって解析不能としてフラグが立てられます。この契約内容は、`study-swarm lint`によってローカルでチェックされるため、ステップ3とステップ4では、引用の定義について合意が得られます。
|
|
63
|
+
|
|
64
|
+
## CLI(コマンドラインインターフェース)
|
|
63
65
|
|
|
64
66
|
```bash
|
|
65
67
|
npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-swarm <command>
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
| コマンド |
|
|
70
|
+
| コマンド | 実行内容 |
|
|
69
71
|
|---|---|
|
|
70
|
-
| `study-swarm protocol` | 完全なプロトコル(5
|
|
71
|
-
| `study-swarm new <slug>` | 5
|
|
72
|
-
| `study-swarm lint <
|
|
72
|
+
| `study-swarm protocol` | 完全なプロトコル(5つのステップ、停止テーブル、情報源の標準)を表示します。 |
|
|
73
|
+
| `study-swarm new <slug>` | 5つのステップで構成されたスケルトンを含む`<slug>.dispatch.md`を作成し、情報を入力できるようにします。 |
|
|
74
|
+
| `study-swarm lint [--json] <path…>` | ディスパッチの「研究根拠」を情報源の標準と比較してチェックします。すべての調査結果には、著者、年、および解決可能な識別子(arXiv / DOI / URL)が必要です。「研究によると…」という曖昧な表現は拒否されます。違反があった場合、終了コード`1`を返し、CI(継続的インテグレーション)のゲートとして機能します。`<path>`はファイル、ディレクトリ(`.dispatch.md`ファイルを再帰的にチェック)、または`-`(標準入力)を指定できます。`--json`オプションを使用すると、機械可読形式のレポートが出力されます。 |
|
|
75
|
+
|
|
76
|
+
`lint`は決定的な処理であり、モデルへの呼び出しは行われません。そのため、CI環境で安全に使用できます。ローカルで**ステップ3の情報源標準**を適用します。モデルベースの**ステップ4**の検証は、引き続き[`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prismによって行われます。
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
典型的なループ:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
study-swarm new my-decision # creates my-decision.dispatch.md
|
|
82
|
+
# …fill in the questions, run the research dispatch, write the findings…
|
|
83
|
+
study-swarm lint my-decision.dispatch.md # enforce the sourcing standard (Step 3)
|
|
84
|
+
roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
完全で`lint`によるチェックに合格したディスパッチ(study-swarmを自身の設計に適用したもの)は、[`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md)として、参考資料として提供されます。
|
|
88
|
+
|
|
89
|
+
### CI環境でゲートとして使用する
|
|
90
|
+
|
|
91
|
+
`lint`は、ファイル、ディレクトリ(`.dispatch.md`ファイルを再帰的にチェック)、または`-`(標準入力)を受け取り、`--json`オプションを使用すると、機械可読形式のレポートが出力されます。これをリポジトリに追加して、すべてのディスパッチの情報源を各PR(プルリクエスト)で検証します(コピー&ペーストできるサンプルは[`examples/study-swarm-ci.yml`](examples/study-swarm-ci.yml)にもあります)。
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
# .github/workflows/dispatches.yml
|
|
95
|
+
name: study-swarm lint
|
|
96
|
+
on:
|
|
97
|
+
pull_request:
|
|
98
|
+
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
99
|
+
workflow_dispatch:
|
|
100
|
+
concurrency:
|
|
101
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
102
|
+
cancel-in-progress: true
|
|
103
|
+
jobs:
|
|
104
|
+
lint:
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
- uses: actions/setup-node@v4
|
|
109
|
+
with: { node-version: '20' }
|
|
110
|
+
- run: npx @dogfood-lab/study-swarm@latest lint dispatches/
|
|
111
|
+
```
|
|
75
112
|
|
|
76
|
-
##
|
|
113
|
+
## その仕組み:
|
|
77
114
|
|
|
78
|
-
**現状** —
|
|
115
|
+
**現状** — この分野は急速に進化しており、特定の研究と年を指定することで、設計が18か月遅れて公開されるのを防ぎます。**機能性** — 証拠は、何が「有効」であるかだけでなく、何が「無効」であるかを示します(説明を加えることで、*誤った*AIへの過度な依存が増加する可能性があります—Bansal et al. 2021、[arXiv:2006.14779](https://arxiv.org/abs/2006.14779))。**安全性** — 検証ツールによって保護された範囲は、証拠が裏付けるアーキテクチャであり、プロトコルはその出力を強制します。情報源の明示は、学術的な儀式ではなく、証拠の追跡です。
|
|
79
116
|
|
|
80
117
|
## セキュリティ
|
|
81
118
|
|
|
82
|
-
`study-swarm`
|
|
119
|
+
`study-swarm`は、**軽量で依存関係のないCLI(コマンドラインインターフェース)** (`study-swarm`)と、その方法論を一緒に提供します。**ネットワークへの接続やモデルへの呼び出しを行わず**、**テレメトリも収集しません**。ソースコードには秘密情報や認証情報は含まれていません。実行時に、`lint`に渡されたファイルを読み取り、現在のディレクトリに単一の`<slug>.dispatch.md`ファイルを作成するだけです(上書きはせず、作業ディレクトリ外に出力することはありません)。方法論で説明されているモデルベースの検証(ステップ4)は、このパッケージではなく、関連ツールによって実行されます。詳細は[SECURITY.md](SECURITY.md)を参照してください。
|
|
83
120
|
|
|
84
121
|
## ステータス
|
|
85
122
|
|
|
86
|
-
|
|
123
|
+
動作するプロトコルであり、自身のメカニズムによって外部から検証されています(異なるモデルファミリーがその引用をチェックします。上記の証拠を参照)。このリポジトリは公開されている参考資料です。[PROTOCOL.md](PROTOCOL.md)は、実行可能な形式です。これは、[dogfood-lab](https://github.com/dogfood-lab)ファミリーの一部であり、AI時代における構築のための方法と事例を紹介します。
|
|
87
124
|
|
|
88
125
|
MITライセンス。
|
|
89
126
|
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ As a test, the protocol was run against its own citations. Two decorrelated non-
|
|
|
45
45
|
|
|
46
46
|
| Planted trap | Mistral | IBM Granite | Ground truth |
|
|
47
47
|
|---|---|---|---|
|
|
48
|
-
| Chain-of-thought prompting attributed to "Nakamura & Olsen" | missed | **caught** (misattributed → really Wei et al. 2022) | misattributed |
|
|
48
|
+
| Chain-of-thought prompting attributed to "Nakamura & Olsen" | missed | **caught** (misattributed → really Wei et al. 2022, arXiv:2201.11903) | misattributed |
|
|
49
49
|
| a fabricated "98% of errors removed, no oracle needed" paper | **caught** (fabricated) | **caught** (fabricated) | fabricated |
|
|
50
50
|
|
|
51
51
|
Neither family caught both traps alone — but their **union caught 2/2**. A single judge would have shipped the misattribution. Separately, the retrieval oracle caught two *real* misattributions in our own design docs (papers cited under the wrong first author) that no parametric LLM could have flagged — and it correctly confirmed genuine 2026 papers that both LLMs false-flagged as fabricated simply because the papers postdate their training. That last point is the whole reason Step 4's existence check **must** be a retrieval oracle, never an LLM.
|
|
@@ -59,6 +59,8 @@ You can run the protocol by hand — any different-family model plus resolving t
|
|
|
59
59
|
- **[prism-verify](https://github.com/mcp-tool-shop-org/prism-verify)** — the runtime verifier: family-different routing, reasoning-stripped, multi-lens adjudication, a deterministic retrieval existence floor (arXiv → Crossref), and signed receipts.
|
|
60
60
|
- **[role-os](https://github.com/mcp-tool-shop-org/role-os)** — provides `roleos verify-citations <dispatch>`, the runner that extracts a dispatch's citations and gates them through prism.
|
|
61
61
|
|
|
62
|
+
The handoff is the dispatch format itself: a finding written as `N. **finding.** Authors year (arXiv|DOI). implication.` — with **one resolvable identifier per finding** — is exactly what `roleos verify-citations` lifts and gates. A `lint`-clean dispatch hands off cleanly; a malformed citation is what the runner flags as unparsed. That contract is what `study-swarm lint` checks locally, so Step 3 and Step 4 agree on what a citation is.
|
|
63
|
+
|
|
62
64
|
## CLI
|
|
63
65
|
|
|
64
66
|
```bash
|
|
@@ -69,17 +71,52 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
69
71
|
|---|---|
|
|
70
72
|
| `study-swarm protocol` | Print the full protocol — the five steps, the halt table, the sourcing standard. |
|
|
71
73
|
| `study-swarm new <slug>` | Scaffold a `<slug>.dispatch.md` with the five-step skeleton to fill in. |
|
|
72
|
-
| `study-swarm lint <
|
|
74
|
+
| `study-swarm lint [--json] <path…>` | Check a dispatch's *Research grounding* against the sourcing standard — every finding needs an author, a year, and a resolvable identifier (arXiv / DOI / URL); "studies show…" hand-waving is rejected. Exit `1` on violations, so it gates CI. A `<path>` may be a file, a directory (linted recursively for `*.dispatch.md`), or `-` for stdin; `--json` emits a machine-readable report. |
|
|
73
75
|
|
|
74
76
|
`lint` is deterministic — zero model calls — so it's safe in CI. It enforces **Step 3's sourcing standard** locally; the model-based **Step 4** verification still defers to [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prism.
|
|
75
77
|
|
|
78
|
+
A typical loop:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
study-swarm new my-decision # creates my-decision.dispatch.md
|
|
82
|
+
# …fill in the questions, run the research dispatch, write the findings…
|
|
83
|
+
study-swarm lint my-decision.dispatch.md # enforce the sourcing standard (Step 3)
|
|
84
|
+
roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
A complete, lint-clean dispatch — study-swarm applied to its own design — ships in [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) as a worked reference.
|
|
88
|
+
|
|
89
|
+
### Gate it in CI
|
|
90
|
+
|
|
91
|
+
`lint` takes a file, a directory (linted recursively for `*.dispatch.md`), or `-` for stdin, and `--json` emits a machine-readable report. Drop this into your repo to gate every dispatch's sourcing on each PR (a copy-paste sample also lives in [`examples/study-swarm-ci.yml`](examples/study-swarm-ci.yml)):
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
# .github/workflows/dispatches.yml
|
|
95
|
+
name: study-swarm lint
|
|
96
|
+
on:
|
|
97
|
+
pull_request:
|
|
98
|
+
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
99
|
+
workflow_dispatch:
|
|
100
|
+
concurrency:
|
|
101
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
102
|
+
cancel-in-progress: true
|
|
103
|
+
jobs:
|
|
104
|
+
lint:
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
- uses: actions/setup-node@v4
|
|
109
|
+
with: { node-version: '20' }
|
|
110
|
+
- run: npx @dogfood-lab/study-swarm@latest lint dispatches/
|
|
111
|
+
```
|
|
112
|
+
|
|
76
113
|
## Why it works, in one breath
|
|
77
114
|
|
|
78
|
-
**Current** — the field moves fast; demanding specific studies-with-years keeps designs from shipping 18 months behind. **Functional** — evidence shows what *fails*, not just what works (explanations can increase over-reliance on *wrong* AI — Bansal et al. 2021). **Safe** — the verifier-protected envelope is the architecture the evidence supports, and the protocol enforces it on its own output. Sourcing isn't academic theater; it's the evidence trail.
|
|
115
|
+
**Current** — the field moves fast; demanding specific studies-with-years keeps designs from shipping 18 months behind. **Functional** — evidence shows what *fails*, not just what works (explanations can increase over-reliance on *wrong* AI — Bansal et al. 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779)). **Safe** — the verifier-protected envelope is the architecture the evidence supports, and the protocol enforces it on its own output. Sourcing isn't academic theater; it's the evidence trail.
|
|
79
116
|
|
|
80
117
|
## Security
|
|
81
118
|
|
|
82
|
-
`study-swarm`
|
|
119
|
+
`study-swarm` ships a **thin, zero-dependency CLI** (`study-swarm`) alongside the methodology. It makes **no network or model calls** and collects **no telemetry**; there are no secrets or credentials in the source. At runtime it only reads the file you pass to `lint` and writes a single `<slug>.dispatch.md` in the current directory for `new` (refusing to overwrite, and never outside the working directory). The model-based verification the methodology describes (Step 4) is run by the sibling tools, not by this package. See [SECURITY.md](SECURITY.md).
|
|
83
120
|
|
|
84
121
|
## Status
|
|
85
122
|
|
package/README.pt-BR.md
CHANGED
|
@@ -13,51 +13,53 @@
|
|
|
13
13
|
<img src="https://img.shields.io/badge/cited%20research-verified-1f6feb" alt="Cited research, verified">
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
**Baseie as decisões de design em
|
|
16
|
+
**Baseie as decisões de design em pesquisa citada — e depois verifique as citações com uma família de modelos *diferente* antes que qualquer parte disso se torne canônica.**
|
|
17
17
|
|
|
18
|
-
`study-swarm` é um protocolo, não uma ferramenta.
|
|
18
|
+
`study-swarm` é um protocolo, não uma ferramenta. Quando você está tomando uma decisão de design substancial com um LLM — uma nova camada de produto, uma escolha de arquitetura, uma decisão de "devemos confiar no modelo aqui" — improvisar a partir de primeiros princípios entrega designs que estão desatualizados, e citar artigos de memória entrega designs que se baseiam em fontes que não existem ou não dizem o que você pensa. study-swarm substitui ambos: despache agentes de pesquisa paralelos, exija descobertas citadas específicas e submeta cada citação a um **verificador externo de uma família de modelos diferente** antes que ela informe o design.
|
|
19
19
|
|
|
20
|
-
Ele aplica
|
|
20
|
+
Ele aplica seu próprio remédio. O protocolo prescreve envelopes protegidos por verificador para os sistemas que ajuda a projetar — então ele executa um em si mesmo. **Nenhum modelo corrige sua própria tarefa, incluindo aquele que executa o protocolo.**
|
|
21
21
|
|
|
22
|
-
## O protocolo em cinco
|
|
22
|
+
## O protocolo em cinco passos
|
|
23
23
|
|
|
24
|
-
1. **Identifique** 3
|
|
25
|
-
2. **
|
|
26
|
-
3. **Sintetize** as descobertas em uma seção de *
|
|
27
|
-
4. **Verifique externamente** — uma *família de modelos diferente*, sem raciocínio, verifica cada citação em duas etapas: um **oráculo de recuperação** confirma que o artigo existe (nunca a memória do modelo) e
|
|
28
|
-
5. **Conecte** cada escolha arquitetônica a uma descoberta
|
|
24
|
+
1. **Identifique** 3–5 questões de design cruciais onde evidências empíricas mudariam a resposta.
|
|
25
|
+
2. **Despache** um agente de pesquisa por questão, em paralelo. Cada um deve retornar títulos de artigos + autores + anos + URLs + uma descoberta em uma frase — especificidade em vez de amplitude ("6–8 descobertas bem fundamentadas valem mais que 20 gestos vagos").
|
|
26
|
+
3. **Sintetize** as descobertas em uma seção de *Base de pesquisa*: `N. **<descoberta>.** <Autores> <ano> (<arXiv/DOI>). <implicação de design>.`
|
|
27
|
+
4. **Verifique externamente** — uma *família de modelos diferente*, sem raciocínio, verifica cada citação em duas etapas: um **oráculo de recuperação** confirma que o artigo existe (nunca a memória do modelo), e então uma **lente de fundamentação** confirma que a descoberta corresponde à fonte. **Pare** em caso de fabricação/má atribuição; **pare e escale** se o verificador ou o oráculo de recuperação estiver indisponível (nunca interprete a ausência como "citações estão ok").
|
|
28
|
+
5. **Conecte** cada escolha arquitetônica a uma descoberta pelo número. Citações sem uma implicação de design são ruído.
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
O detalhe executável completo — a tabela de paradas, o padrão de fontes, a regra de conjunto — está em **[PROTOCOL.md](PROTOCOL.md)**.
|
|
31
31
|
|
|
32
|
-
## Por que uma
|
|
32
|
+
## Por que uma família *diferente*, sem raciocínio?
|
|
33
33
|
|
|
34
34
|
Porque os modos de falha são documentados, não hipotéticos:
|
|
35
35
|
|
|
36
|
-
- **Os LLMs não conseguem verificar de forma confiável
|
|
37
|
-
- **Juízes da mesma família
|
|
38
|
-
- **
|
|
39
|
-
- **Oculte o raciocínio do gerador.** Khalifa et al. 2026 ([arXiv:2601.14691](https://arxiv.org/abs/2601.14691), "Gaming the Judge") —
|
|
40
|
-
- **Diversidade supera
|
|
36
|
+
- **Os LLMs não conseguem verificar de forma confiável suas próprias saídas.** Huang et al. 2023 ([arXiv:2310.01798](https://arxiv.org/abs/2310.01798)); Kambhampati et al. 2024 ([arXiv:2402.01817](https://arxiv.org/abs/2402.01817), LLM-Modulo); Stechly et al. 2024 ([arXiv:2402.08115](https://arxiv.org/abs/2402.08115)) — o verificador externo é responsável pelos ganhos; o conteúdo de autocrítica é inerte.
|
|
37
|
+
- **Juízes da mesma família preferem a si mesmos.** Panickssery, Bowman & Feng 2024 ([arXiv:2404.13076](https://arxiv.org/abs/2404.13076)) — o autorreconhecimento correlaciona-se *linearmente* com a autopreferência, portanto, o cegamento parcial não ajuda. Verga et al. 2024 ([arXiv:2404.18796](https://arxiv.org/abs/2404.18796), PoLL) — um painel entre famílias distintas é menos tendencioso a um custo ~7× menor.
|
|
38
|
+
- **Citações são onde os LLMs mentem.** Walters & Wilder 2023 ([doi:10.1038/s41598-023-41032-5](https://doi.org/10.1038/s41598-023-41032-5)) — 55% das citações do GPT-3.5 / 18% das citações do GPT-4 são fabricadas. Onweller et al. 2026 ([arXiv:2605.06635](https://arxiv.org/abs/2605.06635)) — os links resolvem >94% das vezes, mas apenas 39–77% do conteúdo citado realmente apoia a afirmação. Portanto, a existência deve ser verificada por **recuperação, não por recordação**.
|
|
39
|
+
- **Oculte o raciocínio do gerador.** Khalifa et al. 2026 ([arXiv:2601.14691](https://arxiv.org/abs/2601.14691), "Gaming the Judge") — o raciocínio em cadeia (chain-of-thought) manipulado por si só infla os falsos positivos de um juiz em até 90% com as ações mantidas fixas. Turpin et al. 2023 ([arXiv:2305.04388](https://arxiv.org/abs/2305.04388)) — CoT é uma racionalização a posteriori. O verificador vê a afirmação da citação em si, nunca o 'por que incluí isto'.
|
|
40
|
+
- **Diversidade supera quantidade.** Rajan 2025 ([arXiv:2511.16708](https://arxiv.org/abs/2511.16708)) — quatro verificadores com correlação par a par ρ ∈ [0.05, 0.25] superam qualquer um individualmente através de cobertura submodular. Kim et al. 2025 ([arXiv:2506.07962](https://arxiv.org/abs/2506.07962)) — os erros dos LLMs são *correlacionados*, portanto, a variável crucial é a diversidade das lentes, não a quantidade bruta.
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Funciona de verdade? (prova)
|
|
43
43
|
|
|
44
|
-
Como teste, o protocolo foi executado
|
|
44
|
+
Como teste, o protocolo foi executado contra suas próprias citações. Duas famílias não Claude e decorrelacionadas — **Mistral** (`mistral-small:24b`) e **IBM Granite** (`granite4.1:30b`) — verificaram um conjunto de citações, sem o raciocínio, plantadas com duas armadilhas cegas:
|
|
45
45
|
|
|
46
|
-
| Armadilha plantada | Mistral | IBM Granite | Verdade |
|
|
46
|
+
| Armadilha plantada | Mistral | IBM Granite | Verdade fundamental |
|
|
47
47
|
|---|---|---|---|
|
|
48
|
-
|
|
|
49
|
-
| um artigo fabricado
|
|
48
|
+
| Prompt de raciocínio em cadeia atribuído a "Nakamura & Olsen" | perdida | **apanhada** (atribuída incorretamente → na verdade Wei et al. 2022, arXiv:2201.11903) | atribuída incorretamente |
|
|
49
|
+
| um artigo fabricado "98% dos erros removidos, sem necessidade de oráculo" | **caught** (fabricated) | **caught** (fabricated) | fabricado |
|
|
50
50
|
|
|
51
|
-
Nenhuma das famílias
|
|
51
|
+
Nenhuma das famílias apanhou ambas as armadilhas sozinha — mas a sua **união apanhou 2/2**. Um único juiz teria deixado passar a atribuição incorreta. Separadamente, o oráculo de recuperação apanhou duas atribuições incorretas *reais* nos nossos próprios documentos de projeto (artigos citados com o primeiro autor incorreto) que nenhum LLM paramétrico poderia ter sinalizado — e confirmou corretamente artigos genuínos de 2026 que ambos os LLMs sinalizaram falsamente como fabricados simplesmente porque os artigos são posteriores ao seu treinamento. Esse último ponto é a razão pela qual a verificação de existência da Etapa 4 **deve** ser um oráculo de recuperação, nunca um LLM.
|
|
52
52
|
|
|
53
|
-
Essa única execução é a tese em miniatura: **lentes
|
|
53
|
+
Essa única execução é a tese em miniatura: **lentes decorrelacionadas + um oráculo de recuperação para existência superam qualquer juiz inteligente.**
|
|
54
54
|
|
|
55
|
-
## Como
|
|
55
|
+
## Como funciona
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Pode executar o protocolo manualmente — qualquer modelo de família diferente, além de resolver o arXiv/DOI você mesmo, satisfaz a Etapa 4. Duas ferramentas irmãs tornam isso um único comando:
|
|
58
58
|
|
|
59
|
-
- **[prism-verify](https://github.com/mcp-tool-shop-org/prism-verify)** — o verificador em tempo de execução: roteamento diferenciado por família, sem
|
|
60
|
-
- **[role-os](https://github.com/mcp-tool-shop-org/role-os)** — fornece `roleos verify-citations <dispatch>`, o executor que extrai as citações de um
|
|
59
|
+
- **[prism-verify](https://github.com/mcp-tool-shop-org/prism-verify)** — o verificador em tempo de execução: roteamento diferenciado por família, sem raciocínio, adjudicação multilente, um piso determinístico de existência de recuperação (arXiv → Crossref) e recibos assinados.
|
|
60
|
+
- **[role-os](https://github.com/mcp-tool-shop-org/role-os)** — fornece `roleos verify-citations <dispatch>`, o executor que extrai as citações de um despacho e as encaminha através do prism.
|
|
61
|
+
|
|
62
|
+
A transferência é o próprio formato do despacho: uma descoberta escrita como `N. **descoberta.** Autores ano (arXiv|DOI). implicação.` — com **um identificador resolvível por descoberta** — é exatamente o que `roleos verify-citations` extrai e encaminha. Um despacho limpo pelo `lint` é transferido sem problemas; uma citação malformada é o que o executor sinaliza como não analisada. Esse contrato é o que `study-swarm lint` verifica localmente, para que o Passo 3 e o Passo 4 concordem sobre o que é uma citação.
|
|
61
63
|
|
|
62
64
|
## CLI
|
|
63
65
|
|
|
@@ -67,25 +69,60 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
67
69
|
|
|
68
70
|
| Comando | O que faz |
|
|
69
71
|
|---|---|
|
|
70
|
-
| `study-swarm protocol` | Imprime o protocolo completo —
|
|
71
|
-
| `study-swarm new <slug>` |
|
|
72
|
-
| `study-swarm lint <
|
|
72
|
+
| `study-swarm protocol` | Imprime o protocolo completo — os cinco passos, a tabela de parada, o padrão de fontes. |
|
|
73
|
+
| `study-swarm new <slug>` | Gera o esqueleto de um `<slug>.dispatch.md` com a estrutura de cinco passos para preencher. |
|
|
74
|
+
| `study-swarm lint [--json] <path…>` | Verifica a *Base de pesquisa* de um despacho em relação ao padrão de fontes — cada descoberta precisa de um autor, um ano e um identificador resolvível (arXiv / DOI / URL); o discurso vago de "estudos mostram..." é rejeitado. Sai com `1` em caso de violações, para que bloqueie a CI. Um `<path>` pode ser um arquivo, um diretório (verificado recursivamente para `*.dispatch.md`), ou `-` para stdin; `--json` emite um relatório legível por máquina. |
|
|
75
|
+
|
|
76
|
+
`lint` é determinístico — zero chamadas ao modelo — portanto, é seguro na CI. Ele impõe o **padrão de fontes do Passo 3** localmente; a verificação baseada em modelo do **Passo 4** ainda depende de [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prism.
|
|
73
77
|
|
|
74
|
-
|
|
78
|
+
Um ciclo típico:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
study-swarm new my-decision # creates my-decision.dispatch.md
|
|
82
|
+
# …fill in the questions, run the research dispatch, write the findings…
|
|
83
|
+
study-swarm lint my-decision.dispatch.md # enforce the sourcing standard (Step 3)
|
|
84
|
+
roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Um despacho completo e limpo pelo `lint` — study-swarm aplicado ao seu próprio design — está disponível em [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) como uma referência prática.
|
|
88
|
+
|
|
89
|
+
### Bloqueie na CI
|
|
90
|
+
|
|
91
|
+
`lint` aceita um arquivo, um diretório (verificado recursivamente para `*.dispatch.md`), ou `-` para stdin, e `--json` emite um relatório legível por máquina. Adicione isto ao seu repositório para bloquear as fontes de cada despacho em cada PR (um exemplo para copiar e colar também está em [`examples/study-swarm-ci.yml`](examples/study-swarm-ci.yml)):
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
# .github/workflows/dispatches.yml
|
|
95
|
+
name: study-swarm lint
|
|
96
|
+
on:
|
|
97
|
+
pull_request:
|
|
98
|
+
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
99
|
+
workflow_dispatch:
|
|
100
|
+
concurrency:
|
|
101
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
102
|
+
cancel-in-progress: true
|
|
103
|
+
jobs:
|
|
104
|
+
lint:
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
- uses: actions/setup-node@v4
|
|
109
|
+
with: { node-version: '20' }
|
|
110
|
+
- run: npx @dogfood-lab/study-swarm@latest lint dispatches/
|
|
111
|
+
```
|
|
75
112
|
|
|
76
|
-
## Por que funciona, em
|
|
113
|
+
## Por que funciona, em uma só frase
|
|
77
114
|
|
|
78
|
-
**Atual** — o campo
|
|
115
|
+
**Atual** — o campo avança rapidamente; exigir estudos específicos com anos impede que os designs fiquem 18 meses atrasados. **Funcional** — as evidências mostram o que *falha*, não apenas o que funciona (explicações podem aumentar a confiança excessiva em IA *errada* — Bansal et al. 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779)). **Seguro** — o envelope protegido pelo verificador é a arquitetura que as evidências suportam, e o protocolo a impõe em sua própria saída. A citação de fontes não é teatro acadêmico; é o rastro de evidências.
|
|
79
116
|
|
|
80
117
|
## Segurança
|
|
81
118
|
|
|
82
|
-
`study-swarm` é
|
|
119
|
+
`study-swarm` é fornecido com uma **CLI leve e sem dependências** (`study-swarm`) juntamente com a metodologia. Ele não faz **nenhuma chamada de rede ou de modelo** e não coleta **telemetria**; não há segredos ou credenciais no código-fonte. Em tempo de execução, ele apenas lê o arquivo que você passa para `lint` e escreve um único `<slug>.dispatch.md` no diretório atual para `new` (recusando sobrescrever e nunca fora do diretório de trabalho). A verificação baseada em modelo que a metodologia descreve (Passo 4) é executada pelas ferramentas irmãs, não por este pacote. Consulte [SECURITY.md](SECURITY.md).
|
|
83
120
|
|
|
84
121
|
## Status
|
|
85
122
|
|
|
86
|
-
Um protocolo funcional, verificado externamente por sua própria
|
|
123
|
+
Um protocolo funcional, verificado externamente por sua própria maquinaria — uma família de modelos diferente verifica suas citações (veja a prova acima). Este repositório é a referência pública; [PROTOCOL.md](PROTOCOL.md) é a forma executável. Parte da família [dogfood-lab](https://github.com/dogfood-lab) — métodos e vitrines para construir na era da IA.
|
|
87
124
|
|
|
88
|
-
Licenciado
|
|
125
|
+
Licenciado pelo MIT.
|
|
89
126
|
|
|
90
127
|
---
|
|
91
128
|
|