@dogfood-lab/study-swarm 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/PROTOCOL.md +3 -3
- package/README.es.md +12 -11
- package/README.fr.md +12 -11
- package/README.hi.md +13 -12
- package/README.it.md +13 -12
- package/README.ja.md +12 -11
- package/README.md +8 -7
- package/README.pt-BR.md +12 -11
- package/README.zh.md +13 -12
- package/SECURITY.md +4 -3
- package/bin/study-swarm.mjs +383 -69
- package/examples/study-swarm-canon-rollback.dispatch.md +8 -9
- package/examples/study-swarm-canon-rollback.lock.json +4 -4
- package/examples/study-swarm-ci.yml +3 -2
- package/examples/study-swarm-lock.dispatch.md +10 -10
- package/examples/study-swarm-lock.lock.json +4 -4
- package/examples/study-swarm-v1_1.dispatch.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [2.1.0] — 2026-09-24
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `study-swarm return <dispatch>` writes `<stem>.results.md`, the sheet you hand someone, and `<stem>.results.json`, the same facts kept beside the dispatch. `return --check` fails if either copy has drifted. The command row is in every README.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- The two shipped example locks were regenerated so `lock --verify` passes on this version. The lock hash includes the CLI version.
|
|
14
|
+
- `lint` keeps every identifier on a finding. A URL earlier in the sentence no longer hides a later arXiv, DOI, or RFC from `withdraw` and from `requalify --resolve --mode removed`.
|
|
15
|
+
- An unclosed code fence in Research grounding fails the lint. The lines after it are not treated as clean.
|
|
16
|
+
- Finding numbers are the integers written on the markdown items, not the position in the list.
|
|
17
|
+
- The author check allows one comma before the year (`Smith, 2024`, `Huang et al., 2023`) and rejects a bare function word (`The 2024`).
|
|
18
|
+
- A directory walk that cannot list a directory, or that skips a symlink or junction which might hide a dispatch or a tombstone, fails `lint`, `withdraw`, and `requalify --check` instead of reporting a clean corpus.
|
|
19
|
+
- `lock` requires `resolved_model` and `prompt` to be strings. A caller-supplied `output_sha256` must be 32 bytes. When the step also includes `output`, the digest must match those bytes.
|
|
20
|
+
- `withdraw` and `requalify --resolve` rewrite a sidecar to schema `dispatch.withdrawn/v2` before hashing it, so a resolved v1 sidecar does not stay permanently red.
|
|
21
|
+
- Help, the lock template, the README, and PROTOCOL.md call the prompt digest text-normalized (BOM stripped, newlines folded to LF, NFC), which is what the hasher does.
|
|
22
|
+
- The canon-rollback example no longer states Hsiao & Schneider 2021 as a finding. The pinned run recorded `retrieved: false`. The paper is real; it is not canon in a dispatch whose own evidence did not retrieve it.
|
|
23
|
+
- The lock example's shape sample shows schema v2. The sample CI workflow pins `@dogfood-lab/study-swarm@2.1.0` instead of `@latest`. The release workflow installs `npm@11.5.1` exactly.
|
|
24
|
+
- SECURITY.md reports issues on GitHub and lists the lock, tombstone, and receipt writes. The handbook halt table and three broken handbook links match the protocol. SHIP_GATE's exit code 1 includes lock drift and `requalify --check`.
|
|
25
|
+
- The landing page, the handbook, and the README CI recipe use the same prompt-hash wording and the same `@2.1.0` pin as the shipped sample. Translated security sections name the lock, tombstone, and receipt writes. SECURITY.md lists 2.x as the supported line.
|
|
26
|
+
- A markdown-wrapped DOI or URL is the same identifier as the bare form, so `withdraw` and `requalify --resolve --mode removed` still see it. A function-word year is rejected in any case, and a real author later in the same finding still counts. An unclosed fence fails those compensator commands instead of looking like the citation is gone. A non-string `output_sha256` is rejected.
|
|
27
|
+
- The five-step list drops a fabricated finding and corrects a misattribution once. Halt-and-escalate is only when the verifier or the oracle is unavailable. Spanish, Portuguese, and Hindi `--reason` values are the English tokens the CLI accepts, with a gloss beside them. Translated lock rows call the prompt digest text-normalized.
|
|
28
|
+
- The sample CI workflow, and the copies in the README and handbook, also run `requalify --check` when a pull request only touches a `.withdrawn.json`. The lock example states the digest preimage as the `study-swarm/v2/text` tag plus the normalized text. `tool_schema` must be a JSON object. The symlink smoke check fails if the link cannot be created, instead of passing.
|
|
29
|
+
- Translated READMEs keep the heading `Research grounding`. That English phrase is what `lint` and `withdraw` match. A gloss sits beside it.
|
|
30
|
+
- The lock example's `dispatch_sha256` and `prompt_sha256` lines name the same preimage as `protocol_sha256`: the tag `study-swarm/v2/text`, a newline, then the normalized text.
|
|
31
|
+
- `withdraw` refuses a hand-edited tombstone instead of re-hashing it, and an identical re-withdraw leaves the file untouched. An `arxiv.org/html/` URL is the same identifier as `arXiv:NNNN.NNNNN`. A Step 5 heading is one that starts with "Step 5", or whose text is exactly "Architecture".
|
|
32
|
+
- After `withdraw`, the next step names `--mode removed` and `--mode regrounded`. There is no `--mode override`. The worked examples' lint lines use the `examples/` path that passes from the repo root.
|
|
33
|
+
- The Spanish, Portuguese, and Italian withdraw rows name the scanned section `Research grounding`, the heading `lint` and `withdraw` open.
|
|
34
|
+
- A failed lint repeats the command that failed, including `--strict` and the paths. `requalify --check` prints the dispatch path `--resolve` can open, and it does not call a sidecar problem an evidence-withdrawn flag. A lock digest mismatch names the text-normalized or canonical-JSON preimage. `new` tells the reader to drop a fabricated citation and correct a misattribution once.
|
|
35
|
+
- `withdraw` and `requalify --check` print a full `requalify --resolve <dispatch> <identifier>` command for each flag, for both `--mode removed` and `--mode regrounded`. A resolve line that omits those two operands exits 2.
|
|
36
|
+
- The landing protocol card shows `<dispatch>` in the verify command. The handbook home says the pin is a text-normalized prompt hash.
|
|
37
|
+
- A subheading inside Research grounding does not end the section. A trailing slash on a DOI URL is the same identifier as the bare DOI. `question_id`, `schema_dialect`, `params`, and `verification` are rejected when the type is wrong, not coerced or dropped. `requalify --resolve` refuses a hand-edited sidecar. A null withdrawal entry is a named problem, not a crash. The release workflow does not cancel an in-progress npm publish.
|
|
38
|
+
|
|
5
39
|
## [2.0.0] — 2026-07-05
|
|
6
40
|
|
|
7
41
|
A full dogfood-swarm pass — health hardening, a feature pass making more of the protocol executable, and a security hardening of the lock's content-addressing. **The breaking change** (hence the major bump): the `dispatch.lock.json` / tombstone / receipt hash format is now domain-separated (artifact schema **v2**), so a lock written by an earlier version (≤ 1.3) no longer verifies until it is regenerated (`study-swarm lock <dispatch> --from <orchestration.json>`) — `lock --verify` now says exactly that, instead of reporting a confusing hash mismatch. The CLI's command surface is otherwise fully backward-compatible and additive.
|
package/PROTOCOL.md
CHANGED
|
@@ -144,9 +144,9 @@ Designs that touch model-facing behavior default to this shape unless evidence j
|
|
|
144
144
|
|
|
145
145
|
## Replayability — pinning a dispatch (`dispatch.lock.json`)
|
|
146
146
|
|
|
147
|
-
A grounded, verified dispatch is only auditable if you can say *what produced it*. `study-swarm lock <dispatch> --from <orchestration.json>` writes a companion `dispatch.lock.json` that pins, per Step-2 research agent, the **resolved model id** (never an alias), the **SHA-256 of the
|
|
147
|
+
A grounded, verified dispatch is only auditable if you can say *what produced it*. `study-swarm lock <dispatch> --from <orchestration.json>` writes a companion `dispatch.lock.json` that pins, per Step-2 research agent, the **resolved model id** (never an alias), the **SHA-256 of the text-normalized prompt** (a leading BOM stripped, CR/CRLF folded to LF, Unicode NFC), and the **SHA-256 of the tool schema** the agent was given, plus the Step-4 **verifier receipt** — rolled into one `lock_sha256` content-address. `study-swarm lock --verify` re-derives those hashes and exits non-zero on any drift, so a changed prompt, model, or tool surface is caught — it gates CI exactly like a package lockfile. This is the PIN_PER_STEP standard made executable: the harness emits the record, and the CLI (zero-dependency, network-free) only canonicalizes, hashes, and validates it.
|
|
148
148
|
|
|
149
|
-
**Honest ceiling:** pinning model + prompt + temperature does **not** make an LLM's *output* bit-identical — batch-invariance, floating-point non-associativity, mixture-of-experts routing, and silent provider drift all sit outside any offline tool's control. So the lock pins **inputs
|
|
149
|
+
**Honest ceiling:** pinning model + prompt + temperature does **not** make an LLM's *output* bit-identical — batch-invariance, floating-point non-associativity, mixture-of-experts routing, and silent provider drift all sit outside any offline tool's control. So the lock pins **those normalized inputs and records output hashes for drift detection** — *replayable inputs + drift-detectable outputs*, never "deterministic replay." The design and its evidence are the worked dispatch [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) — itself the first dispatch to ship its own lock.
|
|
150
150
|
|
|
151
151
|
## Compensating a withdrawn finding (canon-rollback)
|
|
152
152
|
|
|
@@ -156,6 +156,6 @@ A verified finding still becomes **canon** — it informs a downstream design de
|
|
|
156
156
|
- **`study-swarm requalify --check <corpus-dir>`** — **fails closed (exit 1)** for any dispatch carrying an unresolved `evidence-withdrawn` flag. This is the andon: a withdrawn finding **HALTS** its dependents until the finding is removed or **re-grounded**. Fail-closed (not a soft alert) is the evidence-driven choice — the RetractoBot RCT (DeVito et al. 2024) found that *notifying* citing authors did **not** reduce continued citation of retracted work, and unexplained drops drive over-reliance (Bansal et al. 2021), so the gate refuses to treat a missing re-verification as "fine" (the Must-Staple rule, RFC 7633).
|
|
157
157
|
- **`study-swarm requalify --resolve <dispatch> <identifier> --mode removed|regrounded [--note <text>]`** — clears a flag once the finding is **removed** (deterministic: the citation is gone from the dispatch) or **re-grounded** (re-verified clean by the sibling runner; the CLI records the attestation, it does not itself re-verify). **Idempotent** — re-running on an already-cleared finding is a no-op — and it **appends** a transition to the sidecar's audit trail rather than editing in place (the event-sourcing / CRL-`removeFromCRL` rule: un-withdrawal is an explicit, recorded transition, never a silent edit).
|
|
158
158
|
|
|
159
|
-
The withdrawal is surfaced **contrastively**, never as a silent drop — *"finding N withdrawn because X; you may have relied on it; dispatches A, B are flagged —
|
|
159
|
+
The withdrawal is surfaced **contrastively**, never as a silent drop — *"finding N withdrawn because X; you may have relied on it; dispatches A, B are flagged — requalify --resolve --mode removed, or --mode regrounded --note"* (Buçinca et al. 2024) — pairing with Step 4's `CANNOT_CONFIRM` checkpoint.
|
|
160
160
|
|
|
161
161
|
**Honest ceiling:** the CLI **flags, gates, and receipts deterministically** (file reads, JSON I/O, SHA-256 — zero-dependency, network-free, like the lock). The actual **re-verification** of a re-grounded finding is the **sibling runner's** job (`roleos verify-citations` → `prism`), not this package; `requalify --resolve --mode regrounded` records that it happened, it does not perform it. The tombstone is the **volatile evidence layer** (per-dispatch) and never touches the **stable** `PROTOCOL.md`/lock shape — `lock --verify` is unaffected by a withdraw/resolve, by design. The design and its evidence are the worked dispatch [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md).
|
package/README.es.md
CHANGED
|
@@ -23,8 +23,8 @@ Aplica su propia medicina. El protocolo prescribe envoltorios protegidos por ver
|
|
|
23
23
|
|
|
24
24
|
1. **Identifique** de 3 a 5 preguntas de diseño clave donde la evidencia empírica cambiaría la respuesta.
|
|
25
25
|
2. **Despliegue** un agente de investigación por pregunta, en paralelo. Cada uno debe devolver títulos de artículos + autores + años + URL + un hallazgo de una sola oración; priorice la especificidad sobre la amplitud ("6 a 8 hallazgos bien documentados superan a 20 observaciones vagas").
|
|
26
|
-
3. **Sintetice** los hallazgos en una sección de *fundamentación basada en investigaciones
|
|
27
|
-
4. **Verifique externamente**: una *familia de modelos diferente*, sin razonamiento, verifica cada cita en dos etapas: un **oráculo de recuperación** confirma que el artículo existe (nunca la memoria del modelo), y luego una lente de **fundamentación** confirma que el hallazgo coincide con la fuente. **
|
|
26
|
+
3. **Sintetice** los hallazgos en una sección de *Research grounding* (fundamentación basada en investigaciones): `N. **<hallazgo>.** <Autores> <año> (<arXiv/DOI>). <implicación para el diseño>.`
|
|
27
|
+
4. **Verifique externamente**: una *familia de modelos diferente*, sin razonamiento, verifica cada cita en dos etapas: un **oráculo de recuperación** confirma que el artículo existe (nunca la memoria del modelo), y luego una lente de **fundamentación** confirma que el hallazgo coincide con la fuente. **Descarte** un hallazgo fabricado; **corrija una atribución incorrecta una vez** y vuelva a verificar (un segundo veredicto no limpio lo descarta). **Deténgase y escale** solo cuando el verificador o el oráculo de recuperación no estén disponibles (nunca interprete la ausencia como "las citas son correctas").
|
|
28
28
|
5. **Conecte** cada elección arquitectónica con un hallazgo mediante un número. Las citas sin una implicación para el diseño son ruido.
|
|
29
29
|
|
|
30
30
|
Los detalles completos y ejecutables: la tabla de detención, el estándar de fuentes y la regla del conjunto se encuentran en **[PROTOCOL.md](PROTOCOL.md)**.
|
|
@@ -75,14 +75,15 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
75
75
|
|---|---|
|
|
76
76
|
| `study-swarm protocol` | Imprime el protocolo completo: los cinco pasos, la tabla de detención y el estándar de fuentes. |
|
|
77
77
|
| `study-swarm new <slug>` | Crea un archivo `<slug>.dispatch.md` con el esqueleto de los cinco pasos para completarlo. |
|
|
78
|
-
| `study-swarm lint [--json] [--strict] <path…>` | Verifique la *base de investigación
|
|
78
|
+
| `study-swarm lint [--json] [--strict] <path…>` | Verifique la *Research grounding* (base de investigación) de un informe con respecto al estándar de fuentes: cada hallazgo debe tener un autor, un año y un identificador que se pueda resolver (arXiv / DOI / URL / RFC); las afirmaciones vagas como "los estudios demuestran..." no son aceptables. Si se detectan infracciones, salga con el código `1`, lo que impide la ejecución de CI. Un `<path>` puede ser un archivo, un directorio (cuyo contenido se analiza recursivamente en busca de archivos `*.dispatch.md`) o `-` para la entrada estándar; `--json` genera un informe legible por máquina. Con `--strict`, también se señalan las **citaciones huérfanas**, es decir, los hallazgos que no están referenciados por ninguna opción del Paso 5, ya que "las citaciones sin conexión son ruido" (opcional, por lo que la configuración predeterminada de CI permanece sin cambios). |
|
|
79
|
+
| `study-swarm return <dispatch> [--check]` | Escribe los resultados: `<stem>.results.md` es la hoja que se entrega, y `<stem>.results.json` guarda los mismos datos junto al dispatch para la próxima ejecución. `--check` falla si alguna de las dos copias se desvió del dispatch. |
|
|
79
80
|
| `study-swarm lock --init <dispatch>` | Cree el archivo `<dispatch>.orchestration.json`: un registro de plantilla para completar con los datos necesarios (un paso por cada agente del Paso 2) y que se utilizará como entrada para `lock … --from`. |
|
|
80
|
-
| `study-swarm lock <dispatch> --from <orchestration.json>` | Fija un envío para su reproducción: escribe el contenido con direccionamiento por contenido en `<dispatch>.lock.json`, según el agente del paso 2, que incluye el **ID de modelo resuelto** + el **SHA-256 del
|
|
81
|
+
| `study-swarm lock <dispatch> --from <orchestration.json>` | Fija un envío para su reproducción: escribe el contenido con direccionamiento por contenido en `<dispatch>.lock.json`, según el agente del paso 2, que incluye el **ID de modelo resuelto** + el **SHA-256 del prompt normalizado (BOM eliminado, saltos de línea a LF, NFC)** + el **SHA-256 del esquema de la herramienta**, más el **comprobante del verificador** del paso 4, todo integrado en un único `lock_sha256`. |
|
|
81
82
|
| `study-swarm lock --verify <dispatch> [--from …]` | Vuelve a generar esos hashes y verifica que coincidan con el bloqueo; cualquier desviación provoca una salida con código `1`, por lo que actúa como un archivo de bloqueo de paquetes para la integración continua. Sin `--from`, comprueba la integridad del propio bloqueo. |
|
|
82
|
-
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **Compensador de anulación del canon.** Marcar cada envío en el corpus
|
|
83
|
+
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **Compensador de anulación del canon.** Marcar cada envío en el corpus cuya sección *Research grounding* (fundamento de la investigación) cite `<id>` como `evidencia retirada` (un archivo adjunto tipo "lápida" `<slug>.withdrawn.json`: marcar, nunca eliminar) y emitir un recibo de retirada identificado por su contenido. `--reason` ∈ `fabricated · misattributed · retracted · verifier-flipped · other` (fabricado, atribuido incorrectamente, retractado, verificador revertido, otro). |
|
|
83
84
|
| `study-swarm requalify --check <corpus-dir>` | Si falla, se cierra el proceso (salir con código `1`) para cualquier envío que contenga una marca `evidencia retirada` no resuelta; este es el mecanismo que **detiene** los elementos dependientes de un hallazgo retirado hasta que se elimine o se vuelva a fundamentar. Activa CI. |
|
|
84
85
|
| `study-swarm requalify --status <corpus-dir> [--json]` | Vista de solo lectura del estado de la evidencia de un corpus: recuento de elementos retirados frente a elementos resueltos, desglose por motivo y modo de resolución, líneas por informe. Informativa (salida con el código `0`), a diferencia de la opción `--check`. |
|
|
85
|
-
| `study-swarm requalify --resolve <envío> <id> --mode removed
|
|
86
|
+
| `study-swarm requalify --resolve <envío> <id> --mode removed\|regrounded [--note …]` | Eliminar una marca una vez que se haya eliminado el hallazgo (la cita ya no existe) o se haya vuelto a fundamentar (el ejecutor hermano lo vuelve a verificar y confirma su validez; `--note` registra la confirmación). Es idempotente; agrega información al registro de auditoría del archivo adjunto. |
|
|
86
87
|
|
|
87
88
|
`lint` es determinista: no realiza llamadas al modelo, por lo que es seguro en la integración continua. Aplica el **estándar de fuentes del paso 3** localmente; la verificación basada en modelos del **paso 4** sigue utilizando [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prism.
|
|
88
89
|
|
|
@@ -106,7 +107,7 @@ Cuatro envíos completos y limpios sirven como referencia: [`examples/study-swar
|
|
|
106
107
|
name: study-swarm lint
|
|
107
108
|
on:
|
|
108
109
|
pull_request:
|
|
109
|
-
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
110
|
+
paths: ['**/*.dispatch.md', '**/*.withdrawn.json', '.github/workflows/dispatches.yml']
|
|
110
111
|
workflow_dispatch:
|
|
111
112
|
concurrency:
|
|
112
113
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
@@ -119,15 +120,15 @@ jobs:
|
|
|
119
120
|
- uses: actions/checkout@v4
|
|
120
121
|
- uses: actions/setup-node@v4
|
|
121
122
|
with: { node-version: '20' }
|
|
122
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
123
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 lint dispatches/
|
|
123
124
|
# Halt the build while any finding that became canon is withdrawn and not yet
|
|
124
125
|
# removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
|
|
125
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
126
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 requalify --check dispatches/
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### Fija un envío para su reproducción (`dispatch.lock.json`)
|
|
129
130
|
|
|
130
|
-
Un envío verificado y con base sólida solo es auditable si se puede indicar *qué lo produjo*. `study-swarm lock` escribe un archivo de bloqueo complementario que, según el agente de investigación, utiliza el direccionamiento por contenido para incluir el **ID de modelo resuelto** (nunca un alias dinámico), el **SHA-256 del
|
|
131
|
+
Un envío verificado y con base sólida solo es auditable si se puede indicar *qué lo produjo*. `study-swarm lock` escribe un archivo de bloqueo complementario que, según el agente de investigación, utiliza el direccionamiento por contenido para incluir el **ID de modelo resuelto** (nunca un alias dinámico), el **SHA-256 del prompt normalizado (BOM eliminado, saltos de línea a LF, NFC)** y el **SHA-256 del esquema de la herramienta** que se le proporcionó, más el **comprobante externo del verificador**, todo integrado en un único `lock_sha256`. `study-swarm lock --verify` vuelve a generar esos hashes y falla si detecta alguna desviación, por lo que cualquier cambio en el mensaje, un modelo diferente o una modificación en la herramienta se detectan. Este es el estándar de reproducibilidad [PIN_PER_STEP](https://github.com/dogfood-lab/study-swarm) implementado. El sistema emite el registro; la CLI permanece sin dependencias y sin conexión a la red, solo normaliza (RFC 8785), calcula hashes y lo valida.
|
|
131
132
|
|
|
132
133
|
**Fija las entradas, no las salidas.** Fijar el modelo + el mensaje + la temperatura *no* hace que la salida de un LLM sea idéntica en bits; la invariancia por lotes, la no asociatividad de punto flotante, el enrutamiento de mezcla de expertos y la desviación silenciosa del proveedor están fuera del control de una herramienta offline. Por lo tanto, el bloqueo le proporciona **entradas reproducibles y salidas con detección de desviaciones**, nunca una "reproducción determinista". El diseño se basa, cita por cita, en [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md): el primer envío que incluye su propio bloqueo ([`examples/study-swarm-lock.lock.json`](examples/study-swarm-lock.lock.json)).
|
|
133
134
|
|
|
@@ -151,7 +152,7 @@ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed
|
|
|
151
152
|
|
|
152
153
|
## Seguridad
|
|
153
154
|
|
|
154
|
-
`study-swarm` incluye una **CLI delgada, con cero dependencias** (`study-swarm`) junto con la metodología. No realiza **ninguna llamada a la red ni al modelo** y no recopila **ningún dato de telemetría**; no hay secretos ni credenciales en el código fuente. En tiempo de ejecución
|
|
155
|
+
`study-swarm` incluye una **CLI delgada, con cero dependencias** (`study-swarm`) junto con la metodología. No realiza **ninguna llamada a la red ni al modelo** y no recopila **ningún dato de telemetría**; no hay secretos ni credenciales en el código fuente. En tiempo de ejecución lee los archivos que nombras. `new` escribe un único `<slug>.dispatch.md` en el directorio de trabajo (sin sobrescribir y sin salir de él). `lock`, `withdraw` y `requalify` también escriben un lock, un sidecar de lápida y, si pasas `--receipt`, un recibo en la ruta que indicas. La verificación basada en modelos que describe la metodología (paso 4) la realizan las herramientas complementarias, no este paquete. Consulte [SECURITY.md](SECURITY.md).
|
|
155
156
|
|
|
156
157
|
## Estado
|
|
157
158
|
|
package/README.fr.md
CHANGED
|
@@ -23,8 +23,8 @@ Il applique sa propre méthode. Le protocole prescrit l’utilisation d’envelo
|
|
|
23
23
|
|
|
24
24
|
1. **Identifiez** 3 à 5 questions de conception essentielles auxquelles des preuves empiriques permettraient de modifier la réponse.
|
|
25
25
|
2. **Déployez** un agent de recherche par question, en parallèle. Chacun doit renvoyer les titres d’articles + les auteurs + les années + les URL + une conclusion en une phrase (la spécificité prime sur l’étendue : « 6 à 8 conclusions bien étayées sont plus efficaces que 20 observations vagues »).
|
|
26
|
-
3. **Synthétisez** les conclusions dans une section intitulée *
|
|
27
|
-
4. **Vérifiez de manière externe** — une *famille de modèles différente*, sans raisonnement, vérifie chaque citation en deux étapes : un **oracle de récupération** confirme que l’article existe (jamais la mémoire du modèle), puis une **lentille d’exactitude** confirme que la conclusion correspond à la source. **
|
|
26
|
+
3. **Synthétisez** les conclusions dans une section intitulée *Research grounding* (justification par la recherche) : `N. <conclusion>. <Auteurs> <année> (<arXiv/DOI>). <implication pour la conception>.`
|
|
27
|
+
4. **Vérifiez de manière externe** — une *famille de modèles différente*, sans raisonnement, vérifie chaque citation en deux étapes : un **oracle de récupération** confirme que l’article existe (jamais la mémoire du modèle), puis une **lentille d’exactitude** confirme que la conclusion correspond à la source. **Écartez** une conclusion fabriquée ; **corrigez une mauvaise attribution une fois** et revérifiez (un second verdict non conforme l’écarte). **Arrêtez et escaladez** seulement si le vérificateur ou l’oracle de récupération n’est pas disponible (ne considérez jamais l’absence comme signifiant que les citations sont correctes).
|
|
28
28
|
5. **Reliez** chaque choix architectural à une conclusion en utilisant un numéro. Les citations qui n’ont pas d’implication pour la conception sont du bruit.
|
|
29
29
|
|
|
30
30
|
Les détails complets et exécutables (le tableau d’arrêt, la norme de référencement, la règle d’ensemble) se trouvent dans **[PROTOCOL.md](PROTOCOL.md)**.
|
|
@@ -75,14 +75,15 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
75
75
|
|---|---|
|
|
76
76
|
| `study-swarm protocol` | Affiche le protocole complet : les cinq étapes, la table d’arrêt et la norme de référencement. |
|
|
77
77
|
| `study-swarm new <slug>` | Crée un fichier `<slug>.dispatch.md` avec le squelette des cinq étapes à compléter. |
|
|
78
|
-
| `study-swarm lint [--json] [--strict] <path…>` | Vérifiez la *justification de la recherche
|
|
78
|
+
| `study-swarm lint [--json] [--strict] <path…>` | Vérifiez la *Research grounding* (justification de la recherche) d’un document par rapport à la norme de référencement : chaque résultat doit comporter un auteur, une année et un identifiant résolvable (arXiv / DOI / URL / RFC) ; les affirmations du type « des études montrent que… » ne sont pas acceptées. En cas de violation, quittez avec le code `1`, ce qui bloque l’exécution continue. Un `<chemin>` peut être un fichier, un répertoire (vérifié récursivement pour les fichiers `*.dispatch.md`) ou `-` pour l’entrée standard ; `--json` génère un rapport lisible par machine. L’option `--strict` signale également les **citations orphelines** (un résultat qui ne fait pas référence à une option de l’étape 5), car « les citations sans lien sont du bruit » (cette option est activable, de sorte que la validation par défaut n’est pas modifiée). |
|
|
79
|
+
| `study-swarm return <dispatch> [--check]` | Écrit les résultats : `<stem>.results.md` est la feuille à remettre, et `<stem>.results.json` conserve les mêmes faits à côté du dispatch pour la prochaine exécution. `--check` échoue si l'une des deux copies a dérivé. |
|
|
79
80
|
| `study-swarm lock --init <dispatch>` | Créez le fichier `<dispatch>.orchestration.json`, un modèle à remplir pour créer un enregistrement d’ensemble (une étape par agent de l’étape 2) qui sera utilisé avec `lock … --from`. |
|
|
80
|
-
| `study-swarm lock <dispatch> --from <orchestration.json>` | Enregistre une analyse pour la relecture : écrit le contenu de `<dispatch>.lock.json`, qui, par agent, adresse le **modèle résolu** (jamais un alias flottant), le **SHA-256 de l’invite
|
|
81
|
+
| `study-swarm lock <dispatch> --from <orchestration.json>` | Enregistre une analyse pour la relecture : écrit le contenu de `<dispatch>.lock.json`, qui, par agent, adresse le **modèle résolu** (jamais un alias flottant), le **SHA-256 de l’invite normalisée (BOM retiré, sauts de ligne en LF, NFC)**, et le **SHA-256 du schéma d’outil** qui lui a été fourni, ainsi que le **reçu du vérificateur** de l’étape 4, dans un seul `lock_sha256`. |
|
|
81
82
|
| `study-swarm lock --verify <dispatch> [--from …]` | Recalcule ces hachages et vérifie qu’ils correspondent à ceux enregistrés ; en cas d’écart, le programme se termine avec le code `1`, ce qui permet de contrôler l’intégration continue (CI), comme un fichier de verrouillage des dépendances. Sans l’option `--from`, il vérifie l’intégrité du propre fichier de verrouillage. |
|
|
82
|
-
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **Mécanisme de compensation en cas de rétractation.** Signalez chaque document du corpus dont la *justification de la recherche
|
|
83
|
+
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **Mécanisme de compensation en cas de rétractation.** Signalez chaque document du corpus dont la *Research grounding* (justification de la recherche) cite `<id>` comme étant `evidence-withdrawn` (un fichier annexe indiquant une suppression, `<slug>.withdrawn.json` : signale, mais ne supprime pas) et générez un reçu de retrait identifié par son contenu. L’option `--reason` peut être `fabricated · misattributed · retracted · verifier-flipped · other`. |
|
|
83
84
|
| `study-swarm requalify --check <corpus-dir>` | En cas d’échec (quittez avec le code `1`) pour tout document contenant un indicateur `evidence-withdrawn` non résolu, cela déclenche l’andon qui **interrompt** les dépendances d’un résultat retiré jusqu’à ce qu’il soit supprimé ou réintégré. Cela bloque l’exécution continue. |
|
|
84
85
|
| `study-swarm requalify --status <corpus-dir> [--json]` | Affiche une vue en lecture seule de l’état des preuves d’un corpus : nombre de documents retirés par rapport au nombre de documents résolus, répartition par raison et mode de résolution, informations par document. C’est une information (quittez avec le code `0`), contrairement à la validation `--check`. |
|
|
85
|
-
| `study-swarm requalify --resolve <dispatch> <id> --mode removed
|
|
86
|
+
| `study-swarm requalify --resolve <dispatch> <id> --mode removed\|regrounded [--note …]` | Supprimez un indicateur une fois que le résultat est supprimé (la citation n’existe plus) ou réintégré (revérifié par l’exécuteur associé ; `--note` enregistre l’attestation). C’est idempotent ; cela ajoute des informations à l’historique d’audit du fichier annexe. |
|
|
86
87
|
|
|
87
88
|
`lint` est déterministe : il n’effectue aucun appel au modèle, ce qui le rend sûr pour l’intégration continue (CI). Il applique localement la **norme de référencement de l’étape 3** ; la vérification basée sur un modèle à l’**étape 4** s’appuie toujours sur [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prism.
|
|
88
89
|
|
|
@@ -106,7 +107,7 @@ Quatre documents complets et validés sont fournis en tant que références : [
|
|
|
106
107
|
name: study-swarm lint
|
|
107
108
|
on:
|
|
108
109
|
pull_request:
|
|
109
|
-
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
110
|
+
paths: ['**/*.dispatch.md', '**/*.withdrawn.json', '.github/workflows/dispatches.yml']
|
|
110
111
|
workflow_dispatch:
|
|
111
112
|
concurrency:
|
|
112
113
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
@@ -119,15 +120,15 @@ jobs:
|
|
|
119
120
|
- uses: actions/checkout@v4
|
|
120
121
|
- uses: actions/setup-node@v4
|
|
121
122
|
with: { node-version: '20' }
|
|
122
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
123
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 lint dispatches/
|
|
123
124
|
# Halt the build while any finding that became canon is withdrawn and not yet
|
|
124
125
|
# removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
|
|
125
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
126
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 requalify --check dispatches/
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### Enregistre une analyse pour la relecture (`dispatch.lock.json`)
|
|
129
130
|
|
|
130
|
-
Une analyse validée et vérifiée n’est auditable que si vous pouvez indiquer *ce qui l’a produite*. `study-swarm lock` écrit un fichier de verrouillage associé qui, par agent de recherche, adresse le **modèle résolu** (jamais un alias flottant), le **SHA-256 de l’invite
|
|
131
|
+
Une analyse validée et vérifiée n’est auditable que si vous pouvez indiquer *ce qui l’a produite*. `study-swarm lock` écrit un fichier de verrouillage associé qui, par agent de recherche, adresse le **modèle résolu** (jamais un alias flottant), le **SHA-256 de l’invite normalisée (BOM retiré, sauts de ligne en LF, NFC)**, et le **SHA-256 du schéma d’outil** qui lui a été fourni, ainsi que le **reçu du vérificateur externe** dans un seul `lock_sha256`. `study-swarm lock --verify` recalcule ces hachages et échoue si l’un d’eux diffère, de sorte qu’une invite modifiée, un modèle remplacé ou une surface d’outil décalée sont détectés : la norme de reproductibilité [PIN_PER_STEP](https://github.com/dogfood-lab/study-swarm), rendue exécutable. L’ensemble des outils émet le rapport ; l’interface en ligne de commande reste sans dépendance et sans connexion réseau, se contentant de normaliser (RFC 8785), de hacher et de valider les données.
|
|
131
132
|
|
|
132
133
|
**Il fixe les entrées, pas les sorties.** Le fait de fixer le modèle + l’invite + la température ne permet *pas* d’obtenir une sortie d’un LLM qui soit exactement identique à chaque fois — l’invariance par lots, la non-associativité des nombres à virgule flottante, le routage du mélange d’experts et la dérive silencieuse du fournisseur sont autant de facteurs qui échappent au contrôle d’un outil hors ligne. Ainsi, le verrouillage vous donne des **entrées reproductibles et des sorties dont la dérive peut être détectée**, mais jamais une « reproduction déterministe ». La conception est basée sur des données probantes, citation par citation, dans [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) — le premier outil à intégrer son propre verrouillage ([`examples/study-swarm-lock.lock.json`](examples/study-swarm-lock.lock.json)).
|
|
133
134
|
|
|
@@ -151,7 +152,7 @@ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed
|
|
|
151
152
|
|
|
152
153
|
## Sécurité
|
|
153
154
|
|
|
154
|
-
`study-swarm` fournit une **CLI légère et sans dépendances** (`study-swarm`) en plus de la méthodologie. Il n’effectue **aucune requête réseau ou vers le modèle** et ne collecte **aucune télémétrie** ; il n’y a pas de secrets ni d’identifiants dans le code source.
|
|
155
|
+
`study-swarm` fournit une **CLI légère et sans dépendances** (`study-swarm`) en plus de la méthodologie. Il n’effectue **aucune requête réseau ou vers le modèle** et ne collecte **aucune télémétrie** ; il n’y a pas de secrets ni d’identifiants dans le code source. À l’exécution, il lit les fichiers que vous nommez. `new` écrit un seul `<slug>.dispatch.md` dans le répertoire de travail (sans écraser, et sans en sortir). `lock`, `withdraw` et `requalify` écrivent aussi un lock, un sidecar tombstone et, avec `--receipt`, un reçu au chemin indiqué. La vérification basée sur le modèle décrite par la méthodologie (étape 4) est effectuée par les outils associés, et non par ce paquet. Voir [SECURITY.md](SECURITY.md).
|
|
155
156
|
|
|
156
157
|
## État actuel
|
|
157
158
|
|
package/README.hi.md
CHANGED
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
|
|
24
24
|
1. **पहचानें** 3–5 ऐसे डिज़ाइन संबंधी प्रश्न जिनमें भार वहन करने की क्षमता हो, और जिनके उत्तर अनुभवजन्य साक्ष्य के आधार पर बदले जा सकते हैं।
|
|
25
25
|
2. **प्रत्येक प्रश्न के लिए एक-एक शोधकर्ता को नियुक्त करें**, ताकि वे समानांतर रूप से काम कर सकें। प्रत्येक शोधकर्ता को निम्नलिखित जानकारी प्रदान करनी होगी: लेख का शीर्षक + लेखक + वर्ष + यूआरएल + एक वाक्य में निष्कर्ष – व्यापकता की तुलना में विशिष्टता पर ध्यान दें ("6–8 अच्छी तरह से संदर्भित निष्कर्ष, 20 अस्पष्ट विचारों से बेहतर हैं")।
|
|
26
|
-
3. **निष्कर्षों को संश्लेषित करें** और उन्हें
|
|
27
|
-
4. **बाह्य रूप से सत्यापित करें** – एक *अलग मॉडल परिवार*, जिसमें तर्क को हटा दिया गया है, दो चरणों में प्रत्येक उद्धरण की जाँच करता है: एक **पुनर्प्राप्ति ओरेकल** पुष्टि करता है कि लेख मौजूद है (यह कभी भी मॉडल की स्मृति पर निर्भर नहीं करेगा), फिर एक **आधारभूतता लेंस** यह पुष्टि करता है कि निष्कर्ष स्रोत से मेल खाता है।
|
|
26
|
+
3. **निष्कर्षों को संश्लेषित करें** और उन्हें *Research grounding* (अनुसंधान आधार) नामक अनुभाग में प्रस्तुत करें: `N. <निष्कर्ष>. <लेखक> <वर्ष> (<arXiv/DOI>). <डिज़ाइन निहितार्थ>।`
|
|
27
|
+
4. **बाह्य रूप से सत्यापित करें** – एक *अलग मॉडल परिवार*, जिसमें तर्क को हटा दिया गया है, दो चरणों में प्रत्येक उद्धरण की जाँच करता है: एक **पुनर्प्राप्ति ओरेकल** पुष्टि करता है कि लेख मौजूद है (यह कभी भी मॉडल की स्मृति पर निर्भर नहीं करेगा), फिर एक **आधारभूतता लेंस** यह पुष्टि करता है कि निष्कर्ष स्रोत से मेल खाता है। मनगढ़ंत निष्कर्ष को **हटाएँ**; गलत श्रेय को **एक बार सुधारें** और फिर से जाँचें (दूसरा अशुद्ध निर्णय उसे हटा देता है)। **रोकें और आगे बढ़ाएँ** केवल तब जब सत्यापनकर्ता या पुनर्प्राप्ति ओरेकल अनुपलब्ध हो (अनुपस्थिति को "उद्धरण ठीक हैं" न मानें)।
|
|
28
28
|
5. **प्रत्येक वास्तुशिल्प विकल्प को संख्या के आधार पर किसी निष्कर्ष से जोड़ें।** बिना डिज़ाइन निहितार्थ वाले उद्धरण अनावश्यक हैं।
|
|
29
29
|
|
|
30
|
-
पूर्ण निष्पादन योग्य विवरण – जिसमें रोक तालिका, स्रोत मानक और समग्र नियम शामिल हैं – यह **[PROTOCOL.md]** में उपलब्ध है।
|
|
30
|
+
पूर्ण निष्पादन योग्य विवरण – जिसमें रोक तालिका, स्रोत मानक और समग्र नियम शामिल हैं – यह **[PROTOCOL.md](PROTOCOL.md)** में उपलब्ध है।
|
|
31
31
|
|
|
32
32
|
## एक *अलग* परिवार क्यों, और उसमें तर्क की कमी क्यों है?
|
|
33
33
|
|
|
@@ -75,14 +75,15 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
75
75
|
|---|---|
|
|
76
76
|
| `study-swarm protocol` | पूरे प्रोटोकॉल को प्रिंट करें - पांच चरण, रोक तालिका, सोर्सिंग मानक। |
|
|
77
77
|
| `study-swarm new <slug>` | पांच-चरणीय ढांचे के साथ `<slug>.dispatch.md` बनाएं ताकि इसे भरा जा सके। |
|
|
78
|
-
| `study-swarm lint [--json] [--strict] <path…>` | किसी प्रेषण की
|
|
78
|
+
| `study-swarm lint [--json] [--strict] <path…>` | किसी प्रेषण की *Research grounding* (अनुसंधान नींव) को स्रोत मानक के विरुद्ध जांचें – प्रत्येक निष्कर्ष में एक लेखक, वर्ष और एक पहचानने योग्य पहचानकर्ता (arXiv / DOI / URL / RFC) होना चाहिए; "अध्ययनों से पता चलता है…" जैसे अस्पष्ट दावे अस्वीकार किए जाते हैं। उल्लंघन होने पर `1` कोड लौटाएं, ताकि यह CI प्रक्रिया को रोक सके। `<path>` एक फ़ाइल, एक निर्देशिका (जिसमें `*.dispatch.md` के लिए पुनरावर्ती रूप से जांच की जाती है), या stdin के लिए `-` हो सकता है; `--json` एक मशीन-पठनीय रिपोर्ट उत्पन्न करता है। `--strict` अतिरिक्त रूप से **अकेले उद्धरणों** को चिह्नित करता है – कोई भी निष्कर्ष जो चरण-5 विकल्प का संदर्भ नहीं देता है – क्योंकि "बिना किसी संबंध के उद्धरण बेकार हैं" (यह वैकल्पिक है, इसलिए डिफ़ॉल्ट CI प्रक्रिया अपरिवर्तित रहती है)। |
|
|
79
|
+
| `study-swarm return <dispatch> [--check]` | परिणाम लिखता है: `<stem>.results.md` वह शीट है जो किसी को दी जाती है, और `<stem>.results.json` वही तथ्य dispatch के पास अगली बार के लिए रखता है। `--check` तब विफल होता है जब कोई प्रति dispatch से हट जाए। |
|
|
79
80
|
| `study-swarm lock --init <dispatch>` | `<dispatch>.orchestration.json` बनाएं – एक रिक्त स्थान भरने वाला ढांचा रिकॉर्ड (प्रत्येक चरण-2 एजेंट के लिए एक चरण) जिसे `lock … --from` में फीड किया जाता है। |
|
|
80
|
-
| `study-swarm lock <dispatch> --from <orchestration.json>` | किसी प्रेषण को फिर से चलाने के लिए पिन करें – `<dispatch>.lock.json` सामग्री-आधारित, चरण-2 एजेंट के अनुसार लिखें, **समाधान मॉडल आईडी** +
|
|
81
|
+
| `study-swarm lock <dispatch> --from <orchestration.json>` | किसी प्रेषण को फिर से चलाने के लिए पिन करें – `<dispatch>.lock.json` सामग्री-आधारित, चरण-2 एजेंट के अनुसार लिखें, **समाधान मॉडल आईडी** + **पाठ-सामान्यीकृत प्रॉम्प्ट का SHA-256 (BOM हटा, नई पंक्ति LF, NFC)** + **टूल स्कीमा का SHA-256**, साथ ही चरण-4 **सत्यापन रसीद**, एक `lock_sha256` में समेकित करें। |
|
|
81
82
|
| `study-swarm lock --verify <dispatch> [--from …]` | उन हैश को फिर से प्राप्त करें और पुष्टि करें कि वे लॉक से मेल खाते हैं; यदि कोई विचलन होता है, तो यह `1` पर समाप्त हो जाएगा, इसलिए यह पैकेज लॉकफ़ाइल की तरह CI को नियंत्रित करता है। `--from` के बिना, यह लॉक की अपनी अखंडता की जांच करता है। |
|
|
82
|
-
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **कैनन-रोलबैक क्षतिपूर्ति।** कॉर्पस में प्रत्येक प्रेषण को चिह्नित करें, जिसमें
|
|
83
|
+
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **कैनन-रोलबैक क्षतिपूर्ति।** कॉर्पस में प्रत्येक प्रेषण को चिह्नित करें, जिसमें *Research grounding* (अनुसंधान आधार) `<id>` को `सबूत-वापस लिया गया` के रूप में उद्धृत किया गया है (एक मकबरे की साइडकार `<slug>.withdrawn.json` — चिह्नित करें, कभी भी हटाएं नहीं) और सामग्री-आधारित वापसी रसीद जारी करें। `--reason` ∈ `fabricated · misattributed · retracted · verifier-flipped · other` (गढ़ा हुआ, गलत श्रेय, वापस लिया गया, सत्यापनकर्ता-उलट, अन्य)। |
|
|
83
84
|
| `study-swarm requalify --check <corpus-dir>` | किसी भी ऐसे प्रेषण के लिए विफल बंद (निकास `1`) जिसमें एक अनसुलझा `सबूत-वापस लिया गया` ध्वज हो — वह उपकरण जो किसी वापस लिए गए निष्कर्ष की निर्भरताओं को तब तक रोकता है जब तक कि उसे हटाया या पुन: स्थापित नहीं किया जाता। गेट्स सीआई। |
|
|
84
85
|
| `study-swarm requalify --status <corpus-dir> [--json]` | एक कॉर्पस का केवल पढ़ने योग्य प्रमाण-स्वास्थ्य **दृश्य** – वापस लिए गए बनाम हल किए गए निष्कर्षों की संख्या, कारण और समाधान मोड द्वारा वर्गीकरण, प्रति प्रेषण पंक्तियाँ। सूचनात्मक (कोड `0` लौटाएं), `--check` प्रक्रिया से अलग। |
|
|
85
|
-
| `study-swarm requalify --resolve <dispatch> <id> --mode removed
|
|
86
|
+
| `study-swarm requalify --resolve <dispatch> <id> --mode removed\|regrounded [--note …]` | एक बार जब निष्कर्ष हटा दिया जाता है (उद्धरण गायब हो जाता है) या पुन: स्थापित किया जाता है, तो एक ध्वज साफ़ करें (भाई रनर द्वारा पुन: सत्यापित स्वच्छ; `--note` सत्यापन को रिकॉर्ड करता है)। आइडेंपोटेंट; साइडकार के ऑडिट ट्रेल में जोड़ता है। |
|
|
86
87
|
|
|
87
88
|
`lint` नियतात्मक है - शून्य मॉडल कॉल - इसलिए यह CI में सुरक्षित है। यह स्थानीय रूप से **चरण 3 के सोर्सिंग मानक** को लागू करता है; मॉडल-आधारित **चरण 4** सत्यापन अभी भी [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → प्रिज्म पर निर्भर करता है।
|
|
88
89
|
|
|
@@ -106,7 +107,7 @@ roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different
|
|
|
106
107
|
name: study-swarm lint
|
|
107
108
|
on:
|
|
108
109
|
pull_request:
|
|
109
|
-
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
110
|
+
paths: ['**/*.dispatch.md', '**/*.withdrawn.json', '.github/workflows/dispatches.yml']
|
|
110
111
|
workflow_dispatch:
|
|
111
112
|
concurrency:
|
|
112
113
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
@@ -119,15 +120,15 @@ jobs:
|
|
|
119
120
|
- uses: actions/checkout@v4
|
|
120
121
|
- uses: actions/setup-node@v4
|
|
121
122
|
with: { node-version: '20' }
|
|
122
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
123
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 lint dispatches/
|
|
123
124
|
# Halt the build while any finding that became canon is withdrawn and not yet
|
|
124
125
|
# removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
|
|
125
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
126
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 requalify --check dispatches/
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### किसी प्रेषण को फिर से चलाने के लिए पिन करें (`dispatch.lock.json`)
|
|
129
130
|
|
|
130
|
-
एक सत्यापित प्रेषण केवल तभी ऑडिट करने योग्य होता है जब आप बता सकें कि *इसे क्या उत्पन्न किया*। `study-swarm lock` एक सहायक लॉकफ़ाइल लिखता है जो सामग्री-आधारित है, अनुसंधान एजेंट के अनुसार, **समाधान मॉडल आईडी** (कभी भी अस्थायी उपनाम नहीं),
|
|
131
|
+
एक सत्यापित प्रेषण केवल तभी ऑडिट करने योग्य होता है जब आप बता सकें कि *इसे क्या उत्पन्न किया*। `study-swarm lock` एक सहायक लॉकफ़ाइल लिखता है जो सामग्री-आधारित है, अनुसंधान एजेंट के अनुसार, **समाधान मॉडल आईडी** (कभी भी अस्थायी उपनाम नहीं), **पाठ-सामान्यीकृत प्रॉम्प्ट का SHA-256 (BOM हटा, नई पंक्ति LF, NFC)**, और **टूल स्कीमा का SHA-256** जिसे दिया गया था, साथ ही बाहरी **सत्यापन रसीद** – एक `lock_sha256` में समेकित। `study-swarm lock --verify` उन हैश को फिर से प्राप्त करता है और किसी भी विचलन पर विफल हो जाता है, इसलिए बदले हुए प्रॉम्प्ट, बदले गए मॉडल या परिवर्तित टूल सतह का पता लगाया जा सकता है – [PIN_PER_STEP](https://github.com/dogfood-lab/study-swarm) पुनरुत्पादनीयता मानक, जिसे निष्पादन योग्य बनाया गया है। हार्नेस रिकॉर्ड उत्सर्जित करता है; CLI शून्य-निर्भर और नेटवर्क-मुक्त रहता है, केवल मानकीकरण (RFC 8785), हैशिंग और मान्य करता है।
|
|
131
132
|
|
|
132
133
|
**यह इनपुट को पिन करता है, आउटपुट को नहीं।** मॉडल + प्रॉम्प्ट + तापमान को पिन करने से LLM का आउटपुट बिट-समान नहीं होगा – बैच-अपरिवर्तनशीलता, फ़्लोटिंग-पॉइंट गैर-सहयोगिता, विशेषज्ञ मिश्रण रूटिंग और मौन प्रदाता विचलन सभी एक ऑफ़लाइन टूल के नियंत्रण से बाहर हैं। इसलिए लॉक आपको **पुन: चलाने योग्य इनपुट और विचलन-पता लगाने योग्य आउटपुट** देता है, कभी भी "निर्धारित पुन: चलाना" नहीं। डिज़ाइन [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) में उद्धरण द्वारा उद्धरण के आधार पर है – पहला प्रेषण जो अपना स्वयं का लॉक भेजता है ([`examples/study-swarm-lock.lock.json`](examples/study-swarm-lock.lock.json))।
|
|
133
134
|
|
|
@@ -151,7 +152,7 @@ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed
|
|
|
151
152
|
|
|
152
153
|
## सुरक्षा
|
|
153
154
|
|
|
154
|
-
`study-swarm` एक **पतली, शून्य-निर्भरता CLI** (`study-swarm`) को पद्धति के साथ भेजता है। यह **कोई नेटवर्क या मॉडल कॉल नहीं करता है** और **कोई टेलीमेट्री एकत्र नहीं करता है**; स्रोत में कोई गुप्त जानकारी या क्रेडेंशियल नहीं हैं। रनटाइम पर यह
|
|
155
|
+
`study-swarm` एक **पतली, शून्य-निर्भरता CLI** (`study-swarm`) को पद्धति के साथ भेजता है। यह **कोई नेटवर्क या मॉडल कॉल नहीं करता है** और **कोई टेलीमेट्री एकत्र नहीं करता है**; स्रोत में कोई गुप्त जानकारी या क्रेडेंशियल नहीं हैं। रनटाइम पर यह उन फ़ाइलों को पढ़ता है जिन्हें आप नाम देते हैं। `new` कार्य निर्देशिका में एक `<slug>.dispatch.md` लिखता है (ओवरराइट नहीं, और निर्देशिका के बाहर नहीं)। `lock`, `withdraw`, और `requalify` एक lock फ़ाइल, एक टूम्बस्टोन sidecar, और `--receipt` देने पर उस पथ पर एक रसीद भी लिखते हैं। पद्धति द्वारा वर्णित मॉडल-आधारित सत्यापन (चरण 4) इस पैकेज द्वारा नहीं, बल्कि संबंधित उपकरणों द्वारा किया जाता है। [SECURITY.md](SECURITY.md) देखें।
|
|
155
156
|
|
|
156
157
|
## स्थिति
|
|
157
158
|
|
package/README.it.md
CHANGED
|
@@ -23,18 +23,18 @@ Applica la propria "medicina". Il protocollo prevede l'utilizzo di verificatori
|
|
|
23
23
|
|
|
24
24
|
1. **Identificare** 3-5 domande progettuali fondamentali su cui le prove empiriche potrebbero cambiare la risposta.
|
|
25
25
|
2. **Attivare** un agente di ricerca per ogni domanda, in parallelo. Ognuno deve restituire titoli degli articoli + autori + anni + URL + una breve sintesi (una frase) — dare priorità alla specificità rispetto all'ampiezza ("6-8 risultati ben documentati sono meglio di 20 affermazioni vaghe").
|
|
26
|
-
3. **Sintetizzare** i risultati in una sezione "
|
|
27
|
-
4. **Verificare esternamente** — una *famiglia di modelli diversa*,
|
|
26
|
+
3. **Sintetizzare** i risultati in una sezione "Research grounding" (fondamento della ricerca): `N. **<risultato>.** <Autori> <anno> (<arXiv/DOI>). <implicazione progettuale>.`
|
|
27
|
+
4. **Verificare esternamente** — una *famiglia di modelli diversa*, con il ragionamento del generatore nascosto, controlla ogni citazione in due fasi: un **oracolo di recupero** conferma che l'articolo esiste (non si basa mai sulla memoria del modello), quindi una "lente di fondatezza" verifica che il risultato corrisponda alla fonte. **Scartare** un risultato fabbricato; **correggere un'attribuzione errata una volta** e riverificare (un secondo verdetto non pulito lo scarta). **Interrompere e segnalare** solo se il verificatore o l'oracolo di recupero non sono disponibili (non interpretare mai l'assenza come "le citazioni sono corrette").
|
|
28
28
|
5. **Collegare** ogni scelta architettonica a un risultato specifico, tramite numero. Le citazioni prive di implicazioni progettuali sono rumore.
|
|
29
29
|
|
|
30
30
|
I dettagli completi e eseguibili — la tabella di interruzione, lo standard per le fonti, la regola dell'insieme — si trovano in **[PROTOCOL.md](PROTOCOL.md)**.
|
|
31
31
|
|
|
32
|
-
## Perché una *famiglia diversa*,
|
|
32
|
+
## Perché una *famiglia diversa*, con il ragionamento del generatore nascosto?
|
|
33
33
|
|
|
34
34
|
Perché i modi di errore sono documentati, non ipotetici:
|
|
35
35
|
|
|
36
36
|
- **Gli LLM non possono verificare in modo affidabile i propri risultati.** 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)) — il verificatore esterno offre i vantaggi; l'autovalutazione è inerte.
|
|
37
|
-
- **I giudici della stessa famiglia tendono a favorire se stessi.** Panickssery, Bowman & Feng 2024 ([arXiv:2404.13076](https://arxiv.org/abs/2404.13076)) — l'autoriconoscimento è correlato *linearmente* all'autopreferenza, quindi un'occlusione parziale non aiuta. Verga et al. 2024 ([arXiv:2404.18796](https://arxiv.org/abs/2404.18796), PoLL) — un gruppo di esperti provenienti da famiglie diverse è meno influenzato,
|
|
37
|
+
- **I giudici della stessa famiglia tendono a favorire se stessi.** Panickssery, Bowman & Feng 2024 ([arXiv:2404.13076](https://arxiv.org/abs/2404.13076)) — l'autoriconoscimento è correlato *linearmente* all'autopreferenza, quindi un'occlusione parziale non aiuta. Verga et al. 2024 ([arXiv:2404.18796](https://arxiv.org/abs/2404.18796), PoLL) — un gruppo di esperti provenienti da famiglie diverse è meno influenzato, a un costo circa 7 volte inferiore.
|
|
38
38
|
- **Le citazioni sono dove gli LLM mentono.** Walters & Wilder 2023 ([doi:10.1038/s41598-023-41032-5](https://doi.org/10.1038/s41598-023-41032-5)) — il 55% delle citazioni di GPT-3.5 / il 18% di GPT-4 sono fabbricate. Onweller et al. 2026 ([arXiv:2605.06635](https://arxiv.org/abs/2605.06635)) — i collegamenti risolvono oltre il 94% delle volte, ma solo il 39-77% del contenuto citato supporta effettivamente l'affermazione. Pertanto, l'esistenza deve essere verificata tramite **recupero, non richiamo**.
|
|
39
39
|
- **Nascondere il ragionamento del generatore.** Khalifa et al. 2026 ([arXiv:2601.14691](https://arxiv.org/abs/2601.14691), "Gaming the Judge") — la sola manipolazione della catena di pensiero aumenta i falsi positivi del giudice fino al 90%, mantenendo le azioni fisse. Turpin et al. 2023 ([arXiv:2305.04388](https://arxiv.org/abs/2305.04388)) — la catena di pensiero è una razionalizzazione post-hoc. Il verificatore vede solo l'affermazione della citazione, mai il "perché ho incluso questo".
|
|
40
40
|
- **La diversità supera la quantità.** Rajan 2025 ([arXiv:2511.16708](https://arxiv.org/abs/2511.16708)) — quattro verificatori con una correlazione a coppie ρ ∈ [0,05, 0,25] superano qualsiasi singolo verificatore tramite copertura submodulare. Kim et al. 2025 ([arXiv:2506.07962](https://arxiv.org/abs/2506.07962)) — gli errori degli LLM sono *correlati*, quindi la variabile più importante è la diversità delle "lenti", non la quantità assoluta.
|
|
@@ -76,13 +76,14 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
76
76
|
| `study-swarm protocol` | Stampa l'intero protocollo: i cinque passaggi, la tabella di arresto e lo standard di riferimento. |
|
|
77
77
|
| `study-swarm new <slug>` | Crea uno scheletro `<slug>.dispatch.md` con i cinque passaggi da completare. |
|
|
78
78
|
| `study-swarm lint [--json] [--strict] <path…>` | Verifica l'attendibilità delle *fonti* di un documento rispetto agli standard di riferimento: ogni affermazione deve avere un autore, un anno e un identificatore univoco (arXiv / DOI / URL / RFC); le affermazioni generiche del tipo "gli studi dimostrano..." non sono accettate. In caso di violazioni, il processo termina con codice `1`, interrompendo così l'esecuzione continua (CI). Un `<path>` può essere un file, una directory (analizzata ricorsivamente per i file `*.dispatch.md`) o `-` per l'input standard; `--json` genera un report leggibile da macchina. L'opzione `--strict` contrassegna inoltre le **citazioni orfane** (un'affermazione che non è citata in nessuno dei passaggi), poiché "le citazioni senza una connessione sono irrilevanti" (questa opzione è facoltativa, quindi l'impostazione predefinita per il processo CI rimane invariata). |
|
|
79
|
+
| `study-swarm return <dispatch> [--check]` | Scrive i risultati: `<stem>.results.md` è il foglio da consegnare, e `<stem>.results.json` conserva gli stessi fatti accanto al dispatch per l'esecuzione successiva. `--check` fallisce se una delle due copie non corrisponde più al dispatch. |
|
|
79
80
|
| `study-swarm lock --init <dispatch>` | Crea il file `<dispatch>.orchestration.json`: un modello di configurazione da completare con i dati necessari (un passaggio per ogni agente del Passo 2) e che verrà utilizzato con il comando `lock … --from`. |
|
|
80
|
-
| `study-swarm lock <dispatch> --from <orchestration.json>` | Blocca un sistema per la riproduzione: scrive il contenuto di `<dispatch>.lock.json`, che, per ogni agente del passaggio 2, include l'**ID del modello risolto**, l'**SHA-256 del prompt
|
|
81
|
+
| `study-swarm lock <dispatch> --from <orchestration.json>` | Blocca un sistema per la riproduzione: scrive il contenuto di `<dispatch>.lock.json`, che, per ogni agente del passaggio 2, include l'**ID del modello risolto**, l'**SHA-256 del prompt normalizzato (BOM rimosso, a capo in LF, NFC)** e l'**SHA-256 dello schema dello strumento**, oltre alla **ricevuta del verificatore** del passaggio 4, tutto racchiuso in un unico `lock_sha256`. |
|
|
81
82
|
| `study-swarm lock --verify <dispatch> [--from …]` | Ricalcola questi hash e verifica che corrispondano al blocco; qualsiasi discrepanza fa terminare il programma con codice `1`, in modo da bloccare l'integrazione continua (CI) come farebbe un file di blocco dei pacchetti. Senza `--from`, controlla l'integrità del blocco stesso. |
|
|
82
|
-
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **Meccanismo di compensazione per il rollback.** Contrassegna ogni documento nel corpus in cui
|
|
83
|
+
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **Meccanismo di compensazione per il rollback.** Contrassegna ogni documento nel corpus in cui la sezione *Research grounding* (attendibilità delle fonti) cita `<id>` come `evidence-withdrawn` (un file "tombstone" aggiuntivo `<slug>.withdrawn.json": contrassegna, ma non elimina) e genera una ricevuta di rimozione basata sul contenuto. `--reason` ∈ `fabricated · misattributed · retracted · verifier-flipped · other`. |
|
|
83
84
|
| `study-swarm requalify --check <corpus-dir>` | In caso di errori, il processo termina con codice `1` per qualsiasi documento che contenga un flag `evidence-withdrawn` non risolto: questo è l'indicatore (andon) che **interrompe** i processi dipendenti da un'affermazione rimossa fino a quando questa non viene eliminata o rielaborata. Interrompe il processo CI. |
|
|
84
85
|
| `study-swarm requalify --status <corpus-dir> [--json]` | Visualizza in sola lettura lo stato di attendibilità delle fonti del corpus: numero di documenti rimossi rispetto a quelli risolti, suddivisione per motivo e modalità di risoluzione, informazioni per ogni documento. Informazioni generali (il processo termina con codice `0`), a differenza dell'opzione `--check`. |
|
|
85
|
-
| `study-swarm requalify --resolve <dispatch> <id> --mode removed
|
|
86
|
+
| `study-swarm requalify --resolve <dispatch> <id> --mode removed\|regrounded [--note …]` | Rimuove il flag una volta che l'affermazione è stata eliminata (la citazione non esiste più) o rielaborata (verificata nuovamente dal processo parallelo; `--note` registra la conferma). L'operazione può essere eseguita più volte; aggiunge informazioni al registro di controllo del file aggiuntivo. |
|
|
86
87
|
|
|
87
88
|
`lint` è deterministico: non effettua chiamate al modello, quindi è sicuro da utilizzare nell'integrazione continua (CI). Applica **lo standard di riferimento del passaggio 3** a livello locale; la verifica basata sul modello del **passaggio 4** si basa ancora su [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prism.
|
|
88
89
|
|
|
@@ -106,7 +107,7 @@ Quattro documenti completi e validati vengono utilizzati come riferimento: [`exa
|
|
|
106
107
|
name: study-swarm lint
|
|
107
108
|
on:
|
|
108
109
|
pull_request:
|
|
109
|
-
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
110
|
+
paths: ['**/*.dispatch.md', '**/*.withdrawn.json', '.github/workflows/dispatches.yml']
|
|
110
111
|
workflow_dispatch:
|
|
111
112
|
concurrency:
|
|
112
113
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
@@ -119,15 +120,15 @@ jobs:
|
|
|
119
120
|
- uses: actions/checkout@v4
|
|
120
121
|
- uses: actions/setup-node@v4
|
|
121
122
|
with: { node-version: '20' }
|
|
122
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
123
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 lint dispatches/
|
|
123
124
|
# Halt the build while any finding that became canon is withdrawn and not yet
|
|
124
125
|
# removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
|
|
125
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
126
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 requalify --check dispatches/
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### Blocca un sistema per la riproduzione (`dispatch.lock.json`)
|
|
129
130
|
|
|
130
|
-
Un sistema fondato e verificato è auditabile solo se si può dire *cosa lo ha prodotto*. `study-swarm lock` scrive un file di blocco complementare che, per ogni agente di ricerca, include l'**ID del modello risolto** (mai un alias fluttuante), l'**SHA-256 del prompt
|
|
131
|
+
Un sistema fondato e verificato è auditabile solo se si può dire *cosa lo ha prodotto*. `study-swarm lock` scrive un file di blocco complementare che, per ogni agente di ricerca, include l'**ID del modello risolto** (mai un alias fluttuante), l'**SHA-256 del prompt normalizzato (BOM rimosso, a capo in LF, NFC)** e l'**SHA-256 dello schema dello strumento** fornito, oltre alla **ricevuta del verificatore esterno**, tutto racchiuso in un unico `lock_sha256`. `study-swarm lock --verify` ricalcola questi hash e fallisce se rileva discrepanze, quindi una modifica al prompt, uno scambio di modello o una variazione della superficie dello strumento vengono rilevati: lo standard di riproducibilità [PIN_PER_STEP](https://github.com/dogfood-lab/study-swarm), reso eseguibile. Il sistema emette il record; l'interfaccia a riga di comando rimane senza dipendenze e indipendente dalla rete, limitandosi alla normalizzazione (RFC 8785), all'hashing e alla convalida.
|
|
131
132
|
|
|
132
133
|
**Blocca gli input, non gli output.** Bloccare il modello + prompt + temperatura *non* rende l'output di un LLM identico bit per bit: l'invarianza del batch, la non associatività dei numeri in virgola mobile, il routing a esperti multipli e la deriva silenziosa del provider sono tutti elementi al di fuori del controllo di uno strumento offline. Pertanto, il blocco fornisce **input riproducibili e output con rilevamento della deriva**, mai una "riproduzione deterministica". Il progetto è basato su evidenze, citazione per citazione, in [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) — la prima implementazione che include il proprio blocco ([`examples/study-swarm-lock.lock.json`](examples/study-swarm-lock.lock.json)).
|
|
133
134
|
|
|
@@ -151,7 +152,7 @@ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed
|
|
|
151
152
|
|
|
152
153
|
## Sicurezza
|
|
153
154
|
|
|
154
|
-
`study-swarm` include una **CLI leggera, senza dipendenze** (`study-swarm`) insieme alla metodologia. Non effettua **nessuna chiamata di rete o al modello** e non raccoglie **dati di telemetria**; non ci sono segreti o credenziali nel codice sorgente. In fase di esecuzione legge
|
|
155
|
+
`study-swarm` include una **CLI leggera, senza dipendenze** (`study-swarm`) insieme alla metodologia. Non effettua **nessuna chiamata di rete o al modello** e non raccoglie **dati di telemetria**; non ci sono segreti o credenziali nel codice sorgente. In fase di esecuzione legge i file che nomini. `new` scrive un solo `<slug>.dispatch.md` nella directory di lavoro (senza sovrascrivere e senza uscirne). `lock`, `withdraw` e `requalify` scrivono anche un lock, un sidecar tombstone e, con `--receipt`, una ricevuta nel percorso indicato. La verifica basata sul modello descritta dalla metodologia (Passaggio 4) viene eseguita dagli strumenti correlati, non da questo pacchetto. Vedere [SECURITY.md](SECURITY.md).
|
|
155
156
|
|
|
156
157
|
## Stato
|
|
157
158
|
|
package/README.ja.md
CHANGED
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
1. **特定する:** 実証的な証拠によって回答が変わる可能性のある、3〜5個の重要な設計上の質問を特定する。
|
|
25
25
|
2. **派遣する:** 各質問に対して、並行して1つの研究エージェントを派遣する。各エージェントは、論文タイトル+著者+年+URL+一文の調査結果を返す必要がある(広範囲よりも具体性重視。「6〜8件の信頼できる調査結果が、20件の曖昧な情報よりも優れている」)。
|
|
26
|
-
3. **統合する:**
|
|
27
|
-
4. **外部で検証する:** *別のモデルファミリー*(推論機能を削除したもの)を使用して、すべての引用を2
|
|
26
|
+
3. **統合する:** 調査結果を「Research grounding」(研究による根拠)セクションに統合する:「N.**<調査結果>。<著者><年>(<arXiv/DOI>)。<設計への影響>。」
|
|
27
|
+
4. **外部で検証する:** *別のモデルファミリー*(推論機能を削除したもの)を使用して、すべての引用を2つの段階でチェックする。まず、**検索オラクル**が論文が存在することを確認する(モデルの記憶ではなく)。次に、「根拠」レンズが、調査結果が情報源と一致することを確認する。捏造された知見は**捨てる**。誤帰属は**一度だけ直し**、再検証する(二度目の不合格で捨てる)。検証者または検索オラクルが使えないときだけ**停止してエスカレーションする**(不在を「引用は問題ない」と解釈しない)。
|
|
28
28
|
5. **関連付ける:** 各アーキテクチャの選択を、番号を使って調査結果に関連付ける。設計への影響がない引用はノイズである。
|
|
29
29
|
|
|
30
30
|
完全な実行可能な詳細(停止テーブル、情報源に関する標準、アンサンブルルール)は、**[PROTOCOL.md](PROTOCOL.md)**に記載されている。
|
|
@@ -75,14 +75,15 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
|
|
|
75
75
|
|---|---|
|
|
76
76
|
| `study-swarm protocol` | 完全なプロトコル(5つのステップ、停止テーブル、ソース標準)を出力します。 |
|
|
77
77
|
| `study-swarm new <slug>` | 5つのステップのスケルトンを含む`<slug>.dispatch.md`を作成し、それを埋めるためのテンプレートを提供します。 |
|
|
78
|
-
| `study-swarm lint [--json] [--strict] <path…>` |
|
|
78
|
+
| `study-swarm lint [--json] [--strict] <path…>` | ディスパッチの「Research grounding」(研究根拠)を、ソースの標準と比較して確認します。すべての調査結果には、著者、年、および解決可能な識別子(arXiv / DOI / URL / RFC)が必要です。「研究では~と示されています…」という曖昧な表現は認められません。違反があった場合は `1` を返して処理を停止し、CI のゲートとして機能します。`<path>` は、ファイル、ディレクトリ(`*.dispatch.md` に対して再帰的にチェックされます)、または標準入力 (`-`) にすることができます。`--json` オプションを使用すると、機械可読のレポートが出力されます。`--strict` オプションを追加すると、**孤立した引用**(Step 5 のいずれかの選択肢で参照されていない調査結果)がフラグ付けされます。「関連性のない引用はノイズである」ためです(オプションであり、デフォルトの CI ゲートは変更されません)。 |
|
|
79
|
+
| `study-swarm return <dispatch> [--check]` | 結果を書き出します。`<stem>.results.md` は渡すシート、`<stem>.results.json` は同じ内容を dispatch の横に残す記録です。`--check` はどちらかが dispatch からずれると失敗します。 |
|
|
79
80
|
| `study-swarm lock --init <dispatch>` | `<dispatch>.orchestration.json` を作成します。これは、`lock … --from` に渡すための、穴埋め形式のハーネスレコードです(Step-2 のエージェントごとに1つのステップ)。 |
|
|
80
|
-
| `study-swarm lock <dispatch> --from <orchestration.json>` | ディスパッチをリプレイ用に固定します。`<dispatch>.lock.json`ファイルに、ステップ2のエージェントごとに、**解決されたモデルID** +
|
|
81
|
+
| `study-swarm lock <dispatch> --from <orchestration.json>` | ディスパッチをリプレイ用に固定します。`<dispatch>.lock.json`ファイルに、ステップ2のエージェントごとに、**解決されたモデルID** + **テキスト正規化したプロンプトのSHA-256(BOM除去、改行をLF、NFC)** + **ツールスキーマのSHA-256ハッシュ**、およびステップ4の**検証レシート**をまとめて書き込みます。これらを1つの`lock_sha256`にまとめます。 |
|
|
81
82
|
| `study-swarm lock --verify <dispatch> [--from …]` | これらのハッシュを再計算し、ロックファイルと一致することを確認します。いずれかのハッシュが異なる場合、終了コード`1`を返し、CIでゲートとして機能します(パッケージのロックファイルと同様)。`--from`オプションがない場合は、ロックファイルの整合性をチェックします。 |
|
|
82
|
-
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` |
|
|
83
|
+
| `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **カノンロールバック補正器**。コーパス内のすべてのディスパッチについて、「Research grounding」(研究根拠)で `<id>` を引用しているものを `evidence-withdrawn` としてフラグ付けします(墓石のようなサイドカーファイル `<slug>.withdrawn.json` で、フラグを立てますが削除はしません)。また、コンテンツアドレス指定された取り下げレシートを出力します。`--reason` は `fabricated · misattributed · retracted · verifier-flipped · other` のいずれかです。 |
|
|
83
84
|
| `study-swarm requalify --check <corpus-dir>` | 未解決の `evidence-withdrawn` フラグを持つディスパッチがある場合、処理を停止してエラー (`1`) を返します。これは、取り下げられた調査結果に依存するものを、削除または再検証されるまで停止させるための「アンドン」です。CI のゲートとしても機能します。 |
|
|
84
85
|
| `study-swarm requalify --status <corpus-dir> [--json]` | コーパスの読み取り専用の証拠健全性**ビュー**を提供します。取り下げられたものと解決されたものの数、理由および解決モードごとの内訳、ディスパッチごとの行を表示します。これは情報提供のみを目的としており(`0` を返します)、`--check` ゲートとは異なります。 |
|
|
85
|
-
| `study-swarm requalify --resolve <dispatch> <id> --mode removed
|
|
86
|
+
| `study-swarm requalify --resolve <dispatch> <id> --mode removed\|regrounded [--note …]` | 調査結果が削除されたとき(引用がなくなったとき)または再検証されたときに、フラグをクリアします(兄弟ランナーによって再度検証され、問題がないことが確認されます。`--note` には証拠が記録されます)。べき等であり、サイドカーの監査ログに追加されます。 |
|
|
86
87
|
|
|
87
88
|
`lint`は決定論的であり、モデル呼び出しはゼロであるため、CIでの使用に安全です。ローカルで**ステップ3のソース標準**を適用し、モデルベースの**ステップ4**検証は引き続き[`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prismに委ねます。
|
|
88
89
|
|
|
@@ -106,7 +107,7 @@ roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different
|
|
|
106
107
|
name: study-swarm lint
|
|
107
108
|
on:
|
|
108
109
|
pull_request:
|
|
109
|
-
paths: ['**/*.dispatch.md', '.github/workflows/dispatches.yml']
|
|
110
|
+
paths: ['**/*.dispatch.md', '**/*.withdrawn.json', '.github/workflows/dispatches.yml']
|
|
110
111
|
workflow_dispatch:
|
|
111
112
|
concurrency:
|
|
112
113
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
@@ -119,15 +120,15 @@ jobs:
|
|
|
119
120
|
- uses: actions/checkout@v4
|
|
120
121
|
- uses: actions/setup-node@v4
|
|
121
122
|
with: { node-version: '20' }
|
|
122
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
123
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 lint dispatches/
|
|
123
124
|
# Halt the build while any finding that became canon is withdrawn and not yet
|
|
124
125
|
# removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
|
|
125
|
-
- run: npx @dogfood-lab/study-swarm@
|
|
126
|
+
- run: npx --yes @dogfood-lab/study-swarm@2.1.0 requalify --check dispatches/
|
|
126
127
|
```
|
|
127
128
|
|
|
128
129
|
### ディスパッチをリプレイ用に固定する(`dispatch.lock.json`)
|
|
129
130
|
|
|
130
|
-
根拠があり、検証されたディスパッチは、それがどのように生成されたかを説明できれば、監査可能になります。`study-swarm lock`は、コンパニオンのロックファイルを書き込みます。このファイルには、研究エージェントごとに、**解決されたモデルID
|
|
131
|
+
根拠があり、検証されたディスパッチは、それがどのように生成されたかを説明できれば、監査可能になります。`study-swarm lock`は、コンパニオンのロックファイルを書き込みます。このファイルには、研究エージェントごとに、**解決されたモデルID**(浮動するエイリアスではありません)、**テキスト正規化したプロンプトのSHA-256(BOM除去、改行をLF、NFC)**、および与えられた**ツールスキーマのSHA-256ハッシュ**、さらに外部の**検証レシート**が記録されます。これらはすべて1つの`lock_sha256`にまとめられます。`study-swarm lock --verify`は、これらのハッシュを再計算し、いずれかのハッシュが異なる場合、エラーを表示します。したがって、プロンプトが変更されたり、モデルが切り替えられたり、ツールのバージョンが変更されたりすると、検知されます。[PIN_PER_STEP](https://github.com/dogfood-lab/study-swarm)再現性標準を実際に実行できます。この処理は、レコードを出力し、CLIはゼロ依存でネットワークにアクセスする必要がなく、単に正規化(RFC 8785)、ハッシュ化、および検証を行います。
|
|
131
132
|
|
|
132
133
|
**入力は固定し、出力は固定しません。** モデル、プロンプト、温度を固定しても、LLMの出力が完全に同一になるわけではありません。バッチ不変性、浮動小数点演算の非結合性、混合エキスパートルーティング、およびサイレントプロバイダドリフトなど、オフラインツールで制御できない要素が存在するためです。したがって、この仕組みは、**再現可能な入力とドリフトを検出可能な出力を提供し、「決定的な再現」を実現するものではありません。** この設計は、[`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) に記載されているように、個々の要素に基づいて構築されており、独自のロック機能を備えた最初のバージョン ([`examples/study-swarm-lock.lock.json`](examples/study-swarm-lock.lock.json)) として提供されます。
|
|
133
134
|
|
|
@@ -151,7 +152,7 @@ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed
|
|
|
151
152
|
|
|
152
153
|
## セキュリティ
|
|
153
154
|
|
|
154
|
-
`study-swarm` は、この手法とともに、**軽量で依存関係のないCLI(コマンドラインインターフェース)** (`study-swarm`) を提供します。**ネットワーク接続やモデルへのアクセスは行わず、テレメトリデータも収集しません。**
|
|
155
|
+
`study-swarm` は、この手法とともに、**軽量で依存関係のないCLI(コマンドラインインターフェース)** (`study-swarm`) を提供します。**ネットワーク接続やモデルへのアクセスは行わず、テレメトリデータも収集しません。** ソースコードには、秘密情報や認証情報は含まれていません。実行時には、指定したファイルを読み取ります。`new` は作業ディレクトリに `<slug>.dispatch.md` を1つだけ書き込みます(上書きせず、ディレクトリの外にも書きません)。`lock`、`withdraw`、`requalify` は lock ファイルと墓標 sidecar も書き、`--receipt` を渡すとそのパスにレシートを書きます。この手法で説明されているモデルベースの検証(ステップ4)は、このパッケージではなく、関連するツールによって実行されます。詳細は [SECURITY.md](SECURITY.md) を参照してください。
|
|
155
156
|
|
|
156
157
|
## ステータス
|
|
157
158
|
|