@dogfood-lab/study-swarm 1.2.0 → 2.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 CHANGED
@@ -2,6 +2,51 @@
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.0.0] — 2026-07-05
6
+
7
+ 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.
8
+
9
+ ### Added
10
+
11
+ - **`study-swarm lint --strict`** — makes the protocol's one otherwise-unexecutable failure mode deterministic: an **orphan citation** (a Step-3 finding no Step-5 choice references, by number or author) is flagged, because "citations without a connection are noise." Opt-in, so the default CI gate is unchanged. New `orphan-citation` / `no-step5` rule ids. (All four shipped example dispatches were made `--strict`-clean.)
12
+ - **`study-swarm lock --init <dispatch>`** — scaffolds a fill-in-the-blanks `<dispatch>.orchestration.json` (the harness record `lock … --from` consumes), mirroring what `new` does for a dispatch.
13
+ - **`study-swarm requalify --status <corpus-dir> [--json]`** — a read-only evidence-health view of a corpus: withdrawn vs resolved counts, a breakdown by reason and resolution mode, and per-dispatch lines. Informational (exit 0), distinct from the `--check` gate.
14
+ - `lint --json` now carries a versioned `schema` + `study_swarm_version` envelope, matching the lock/sidecar/receipt objects, so a CI/roleos consumer can detect a shape change.
15
+ - `lint` now accepts a bare **RFC number** (e.g. `RFC 5280`) as a resolvable identifier — the sourcing standard already blessed it and the canon-rollback normalizer already recognized it; the linter now agrees.
16
+
17
+ ### Changed
18
+
19
+ - **Security — domain-separated content-addressing (lock schema v1 → v2).** Every digest now carries a domain tag, so a prompt whose literal text equals a tool schema's canonical JSON can no longer collide with that schema's hash. `lock`, the tombstone sidecar, and the withdrawal receipt bump to schema `v2`; a `v1` artifact read by this version is reported as **"regenerate"**, not a hash mismatch. A caller-supplied `output_sha256` is validated to the `sha256-<base64>` shape where it enters. The two shipped example locks are regenerated.
20
+ - **Robustness.** Fixed a **catastrophic-backtracking (ReDoS)** in the author-citation regex that could hang the CI-gating `lint` on a long author run with no trailing year; the rewrite is linear-time and semantically identical on real citations. Corpus walks (`lint`/`withdraw`/`requalify` over a directory) now skip an unreadable subdirectory with a warning instead of aborting the whole run, don't follow symlinks, and break directory-junction cycles. A non-object (`null`) sidecar is now a reported problem, not a crash. A URL path segment like `/2024/` no longer satisfies the year requirement.
21
+ - **Humanization.** A failed `lint` now prints a "fix and re-run" trailer; the `requalify --resolve --mode removed` block message presents its two recovery paths as a legible fork; `withdraw` on an uncited id points you at `lint` and `--from`; the withdrawal-receipt line reads plainly instead of `(stdout: pass --json)`.
22
+ - **Docs.** The README + handbook CI recipe now include the `requalify --check` andon step (it was documented in the example workflow only); the handbook halt table gains the `PARTIALLY_SUPPORTED` verdict; `SECURITY.md` + `SHIP_GATE.md` now enumerate the `lock`/`withdraw`/`requalify` write surface; the landing page now surfaces the CLI (it previously showed none of the six commands).
23
+
24
+ ### Release CI
25
+
26
+ - The release workflow now verifies the **packed tarball** is runnable from its shipped files only — catching a `files`-allowlist regression a working-tree smoke test can't — and pins `npm@^11.5.1` for OIDC trusted publishing instead of floating `@latest`.
27
+
28
+ Smoke coverage: 57 → 92 checks.
29
+
30
+ ## [1.3.0] — 2026-06-30
31
+
32
+ Makes the **canon-rollback** executable. A verified finding becomes canon — it informs a downstream design decision — so when it is later **withdrawn** (a citation turns out fabricated/misattributed on a re-run, a cited paper is retracted, or the gate flips it) a `git revert` is not enough: the finding already propagated. This release ships the protocol's named `requalify_dependent_slices` compensator as three deterministic, network-free verbs. The design was grounded by running study-swarm on this feature itself — five load-bearing questions (revocation propagation, machine-readable status states, scholarly retraction, sound compensators, build-system staleness/tombstones/contrastive surfacing) dispatched to parallel retrieval-grounded agents; all 27 findings were gated through Step 4 (`roleos verify-citations` → prism, a different model family, reasoning-stripped) with a public-key-verified Ed25519 receipt before any informed the design.
33
+
34
+ ### Added
35
+
36
+ - **`study-swarm withdraw <identifier> --reason <reason> [--detail <text>] [--from <dir>] [--receipt <path>]`** — scans the corpus for every dispatch whose *Research grounding* cites `<identifier>` (identifier-normalized across arXiv / DOI / RFC / URL forms), flags each as `evidence-withdrawn` in a co-located tombstone sidecar `<slug>.withdrawn.json` (**flag, never delete**) with a closed machine-readable `--reason` (`fabricated` / `misattributed` / `retracted` / `verifier-flipped` / `other`), and emits a content-addressed withdrawal receipt (the withdrawn id + reason + every dependent flagged + a `receipt_sha256` + the post-rollback state).
37
+ - **`study-swarm requalify --check <corpus-dir>`** — fails closed (exit `1`) for any dispatch carrying an unresolved `evidence-withdrawn` flag — the andon that **halts** a withdrawn finding's dependents until it is removed or re-grounded. Also catches a hand-edited sidecar via self-integrity. Gates CI.
38
+ - **`study-swarm requalify --resolve <dispatch> <identifier> --mode removed|regrounded [--note <text>]`** — clears a flag once the finding is removed (deterministically checked) or re-grounded (`--note` records the sibling-runner re-verification attestation; the CLI does not itself re-verify). **Idempotent**, and **appends** to the sidecar's append-only audit trail rather than editing in place.
39
+ - A worked, runner-verified reference dispatch — `examples/study-swarm-canon-rollback.dispatch.md` (27 cited findings) — with its harness record (`examples/study-swarm-canon-rollback.orchestration.json`) and lock (`examples/study-swarm-canon-rollback.lock.json`); the first dispatch to ship a lock **and** be withdrawn-then-requalified.
40
+ - Smoke coverage proving the rollback round-trips: a meta-test seeds two dispatches citing one identifier, withdraws it (both go `evidence-withdrawn`, `requalify --check` goes **RED**), re-grounds one (it goes **GREEN** while the other stays **RED**), plus determinism, idempotency, self-integrity tamper, line-ending invariance, and a DECOMPOSE boundary test proving `lock --verify` is unaffected by a withdraw/resolve.
41
+
42
+ ### Changed
43
+
44
+ - `PROTOCOL.md` adds a **"Compensating a withdrawn finding (canon-rollback)"** section — the executable shape of `requalify_dependent_slices` and its honest ceiling.
45
+
46
+ ### Honest ceiling
47
+
48
+ The CLI **flags, gates, and receipts deterministically** (file reads, JSON I/O, SHA-256 — zero-dependency, network-free). 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 and never touches the stable `PROTOCOL.md`/lock shape. Grounded in Garcia-Molina & Salem 1987 (Sagas, DOI:10.1145/38713.38742), RFC 5280 / RFC 6066 / RFC 7633, OpenVEX & CSAF 2.0 & CycloneDX 1.6, NISO CREC RP-45-2024, the RetractoBot RCT (DeVito et al. 2024), Mokhov, Mitchell & Peyton Jones 2018 (DOI:10.1145/3236774), Buçinca et al. 2024 (arXiv:2410.04253), and Bansal et al. 2021 (arXiv:2006.14779).
49
+
5
50
  ## [1.2.0] — 2026-06-30
6
51
 
7
52
  Makes a study-swarm dispatch **byte-replayable**. The design was grounded by running study-swarm on this feature itself — five load-bearing questions (replay-manifest structure, cross-platform canonicalization, step-level provenance, LLM replay-determinism reality, tool-schema drift) dispatched to parallel retrieval-grounded agents; all 39 findings were gated through Step 4 (`roleos verify-citations` → prism, a different model family, reasoning-stripped) with a public-key-verified Ed25519 receipt before any informed the design.
@@ -95,6 +140,8 @@ First stable release. A dogfood-swarm health + feature pass hardened the CLI and
95
140
  - `SECURITY.md`, MIT `LICENSE`, project logo.
96
141
  - Landing page + Starlight handbook at <https://dogfood-lab.github.io/study-swarm/>.
97
142
 
143
+ [2.0.0]: https://github.com/dogfood-lab/study-swarm/releases/tag/v2.0.0
144
+ [1.3.0]: https://github.com/dogfood-lab/study-swarm/releases/tag/v1.3.0
98
145
  [1.2.0]: https://github.com/dogfood-lab/study-swarm/releases/tag/v1.2.0
99
146
  [1.1.0]: https://github.com/dogfood-lab/study-swarm/releases/tag/v1.1.0
100
147
  [1.0.0]: https://github.com/dogfood-lab/study-swarm/releases/tag/v1.0.0
package/PROTOCOL.md CHANGED
@@ -103,7 +103,7 @@ Example: *"Retry uses a fresh prompt without the previous output. (sycophancy mi
103
103
 
104
104
  **A citation includes ALL of:** (1) author(s) — first author + "et al." inline is fine; (2) year; (3) a **resolvable identifier or direct URL** — an arXiv id (arXiv:NNNN.NNNNN), a DOI, an RFC number, or a direct link to the source (not a summary or a social-media thread); a paper title is welcome but optional; (4) a one-sentence key finding in your own words.
105
105
 
106
- > `study-swarm lint` enforces exactly this FORM locally — author + year + a resolvable arXiv/DOI/URL, and no "studies show…" gestures. arXiv ids and DOIs are preferred over a bare URL because Step 4's retrieval oracle resolves them deterministically.
106
+ > `study-swarm lint` enforces exactly this FORM locally — author + year + a resolvable arXiv/DOI/URL/RFC, and no "studies show…" gestures. arXiv ids and DOIs are preferred over a bare URL because Step 4's retrieval oracle resolves them deterministically.
107
107
 
108
108
  **Not allowed:** "studies show…" / "research suggests…" / "it's well-established…" without naming the source; an identifier-less citation; citations the research step did not actually surface.
109
109
 
@@ -119,7 +119,7 @@ The patterns this protocol exists to catch — each with the step that catches i
119
119
  | **Self-grading** | the synthesizing model also "verifies" | Step 4 different-family rule |
120
120
  | **Postdated-paper false-flag** | an LLM calls a real 2026 paper fabricated | why existence MUST be retrieval, not recall |
121
121
  | **Question padding** | five thin questions, two actually evidence-changing | Step 1 ("don't manufacture to hit a count") |
122
- | **Orphan citation** | a finding never referenced by a Step-5 choice | Step 5 (citations without a connection are noise) |
122
+ | **Orphan citation** | a finding never referenced by a Step-5 choice | Step 5 — and made executable by `study-swarm lint --strict` (opt-in) |
123
123
  | **"Studies show…"** | a gesture with no source named | the sourcing standard / `lint` |
124
124
 
125
125
  A fuller version with corrective actions is in the [handbook](https://dogfood-lab.github.io/study-swarm/handbook/failure-modes/).
@@ -147,3 +147,15 @@ Designs that touch model-facing behavior default to this shape unless evidence j
147
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 byte-exact prompt**, 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
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 byte-exact 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
+
151
+ ## Compensating a withdrawn finding (canon-rollback)
152
+
153
+ A verified finding still becomes **canon** — it informs a downstream design decision. So the protocol must answer: what happens when a finding that already propagated is later **withdrawn** — a citation turns out fabricated or misattributed on a re-run, a cited paper is **retracted** upstream, or the gate flips it? A `git revert` of the dispatch commit is **not** sufficient: the finding already informed the dependent design, and a compensator "undoes from a semantic point of view, [it] does not necessarily restore the [prior] state" (Garcia-Molina & Salem 1987, the protocol's saga heritage). The named compensator is **`requalify_dependent_slices`**, made executable as three deterministic, network-free CLI verbs:
154
+
155
+ - **`study-swarm withdraw <identifier> --reason <reason> [--detail <text>] [--from <corpus-dir>] [--receipt <path>]`** — scan the corpus for every dispatch whose *Research grounding* cites `<identifier>` (the same parser `lint` uses, identifier-normalized across arXiv / DOI / RFC / URL forms), and for each dependent write a co-located **tombstone sidecar** `<slug>.withdrawn.json` flagging it `evidence-withdrawn` with a **closed, machine-readable reason** (`fabricated` / `misattributed` / `retracted` / `verifier-flipped` / `other`). It **flags, never deletes** — every mature system retains-and-flags (X.509 CRL keeps the serial with a reason code; `cargo yank` "does not delete any data"; npm recommends `deprecate` over `unpublish` precisely *because* a version has dependents; PyPI's PEP 592 keeps yanked files; Cassandra writes a tombstone rather than removing the value; COPE/Crossref retain the retracted record and mark it). It emits a content-addressed **withdrawal receipt** (the withdrawn id + reason + the dependents flagged + a `receipt_sha256` + the post-rollback state) — the saga log, made auditable.
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
+ - **`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
+
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 — re-ground or override"* (Buçinca et al. 2024) — pairing with Step 4's `CANNOT_CONFIRM` checkpoint.
160
+
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
@@ -75,9 +75,14 @@ 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] <path…>` | Verifica la *fundamentación de la investigación* de una prueba en comparación con el estándar de fuentes: cada hallazgo necesita un autor, un año y un identificador resoluble (arXiv / DOI / URL); se rechaza cualquier afirmación vaga del tipo "los estudios demuestran...". Sale con código `1` si hay infracciones, por lo que valida la integración continua. Un `<path>` puede ser un archivo, un directorio (se analiza recursivamente para archivos `*.dispatch.md`) o `-` para la entrada estándar; `--json` emite un informe legible por máquina. |
78
+ | `study-swarm lint [--json] [--strict] <path…>` | Verifique la *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 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`. |
79
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 mensaje exacto en bytes** + el **SHA-256 del esquema de la herramienta**, más el **comprobante del verificador** del paso 4, todo integrado en un único `lock_sha256`. |
80
81
  | `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 cuyo *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` ∈ `fabricado · atribuido incorrectamente · retractado · verificador revertido · otro`. |
83
+ | `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
+ | `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\ | 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. |
81
86
 
82
87
  `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.
83
88
 
@@ -90,7 +95,7 @@ study-swarm lint my-decision.dispatch.md # enforce the sourcing standard
90
95
  roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
91
96
  ```
92
97
 
93
- Tres envíos completos y revisados se publican como referencias: [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (la decisión central del protocolo, concisa), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (el diseño completo de la versión 1.1: 27 citas, todas verificadas externamente) y [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (el diseño del bloqueo de la versión 1.2: 39 citas, controlado a través del ejecutor, y el primer envío que incluye su propio bloqueo).
98
+ Cuatro envíos completos y limpios sirven como referencia: [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (la decisión central del protocolo, concisa), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (el diseño completo de la versión 1.1: 27 citas, todas verificadas externamente), [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (el diseño de bloqueo de la versión 1.2: 39 citas, controlado a través del ejecutor y el primer envío que incluye su propio bloqueo) y [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md) (el diseño de anulación del canon de la versión 1.3: 27 citas relacionadas con la revocación, la retractación, las sagas y la invalidación de la compilación, y el primer envío que se retira y luego se vuelve a calificar).
94
99
 
95
100
  ### Valídalo en la integración continua
96
101
 
@@ -109,11 +114,15 @@ concurrency:
109
114
  jobs:
110
115
  lint:
111
116
  runs-on: ubuntu-latest
117
+ timeout-minutes: 5
112
118
  steps:
113
119
  - uses: actions/checkout@v4
114
120
  - uses: actions/setup-node@v4
115
121
  with: { node-version: '20' }
116
122
  - run: npx @dogfood-lab/study-swarm@latest lint dispatches/
123
+ # Halt the build while any finding that became canon is withdrawn and not yet
124
+ # removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
125
+ - run: npx @dogfood-lab/study-swarm@latest requalify --check dispatches/
117
126
  ```
118
127
 
119
128
  ### Fija un envío para su reproducción (`dispatch.lock.json`)
@@ -122,6 +131,20 @@ Un envío verificado y con base sólida solo es auditable si se puede indicar *q
122
131
 
123
132
  **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)).
124
133
 
134
+ ### Anular un hallazgo retirado (`withdraw` / `requalify`)
135
+
136
+ Un hallazgo verificado se convierte en **canon**: sirve como base para una decisión posterior. Entonces, ¿qué sucede cuando más adelante se **retira** (una cita resulta ser fabricada o atribuida incorrectamente en una nueva ejecución, un documento citado se retira o el mecanismo de control lo revierte)? Un `git revert` no es suficiente, porque el hallazgo ya se ha propagado. El compensador de anulación del canon hace que la limpieza sea ejecutable:
137
+
138
+ ```bash
139
+ study-swarm withdraw arXiv:2402.15089 --reason misattributed --from dispatches/ --receipt rollback.json
140
+ # → flags every dispatch citing it `evidence-withdrawn` (a tombstone sidecar — flag, never delete)
141
+ # and writes a content-addressed withdrawal receipt naming every dependent.
142
+ study-swarm requalify --check dispatches/ # exit 1 while any flag is unresolved — the andon HALT
143
+ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed # or: --mode regrounded --note "<attestation>"
144
+ ```
145
+
146
+ `requalify --check` **falla y se cierra** hasta que cada hallazgo marcado se elimine o se **vuelva a fundamentar** (el ejecutor hermano lo vuelve a verificar y confirma su validez; la CLI registra la confirmación, pero no lo vuelve a verificar por sí misma). La retirada se presenta de forma **contrastiva**, nunca como una eliminación silenciosa. Todo —la "lápida" y el recibo— está identificado por su contenido y es detectable en caso de cambios, y opera solo en la capa de *evidencia*: `lock --verify` no se ve afectado por una retirada. El diseño se basa en [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md), y el [PROTOCOL.md](PROTOCOL.md) §"Compensación de un hallazgo retirado" es la forma ejecutable. Este es el estándar **NAMED_COMPENSATORS** convertido en ejecutable: una anulación con nombre e idempotente que deja un estado posterior conocido y un recibo.
147
+
125
148
  ## Por qué funciona, en pocas palabras
126
149
 
127
150
  **Actual:** el campo evoluciona rápidamente; exigir estudios específicos con años evita que los diseños se retrasen 18 meses. **Funcional:** la evidencia muestra lo que *falla*, no solo lo que funciona (las explicaciones pueden aumentar la dependencia excesiva de la IA *incorrecta* — Bansal et al. 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779)). **Seguro:** el entorno protegido por el verificador es la arquitectura que respalda la evidencia, y el protocolo lo aplica a su propia salida. La verificación de fuentes no es un ejercicio académico; es el rastro de la evidencia.
@@ -132,7 +155,7 @@ Un envío verificado y con base sólida solo es auditable si se puede indicar *q
132
155
 
133
156
  ## Estado
134
157
 
135
- Un protocolo funcional, verificado externamente por su propia maquinaria: una familia de modelos diferente verifica sus citas (vea la prueba anterior). **v1.1** mejora el verificador donde la primera versión era silenciosa: solidez descompuesta/ternaria, fundamentación en el momento de la generación, una cascada controlada por un oráculo para combinar lentes y abstención calibrada; todo ello se basa en el envío v1.1 verificado. **v1.2** hace que un envío sea reproducible a nivel de bytes: `study-swarm lock` fija el modelo resuelto, el mensaje y el esquema de la herramienta por paso, además del comprobante del verificador, y `lock --verify` falla si detecta alguna desviación. Este repositorio es la referencia pública; [PROTOCOL.md](PROTOCOL.md) es la forma ejecutable. Forma parte de la familia [dogfood-lab](https://github.com/dogfood-lab): métodos y ejemplos para construir en la era de la IA.
158
+ Un protocolo funcional, verificado externamente por su propio mecanismo: una familia de modelos diferente verifica sus citaciones (consulte la prueba anterior). **v1.1** mejora el verificador en los aspectos que no se abordaron en la primera versión: base descompuesta/ternaria, base temporal de generación, una cascada controlada por un oráculo para combinar lentes y abstención calibrada; cada uno de estos elementos está basado en el informe verificado v1.1. **v1.2** permite que un informe se pueda reproducir a partir de sus datos: `study-swarm lock` fija el modelo, la instrucción y el esquema de herramientas resueltos por paso, además del recibo del verificador, y `lock --verify` falla si se detecta alguna desviación. **v1.3** hace que la reversión sea ejecutable: cuando un hallazgo que ya formaba parte del canon se retira, `study-swarm withdraw` señala todos los elementos dependientes y `requalify --check` los detiene hasta que se eliminen o vuelvan a verificar; esto crea un compensador con nombre, recibo e idempotencia. **v2.0** hace que una mayor parte del protocolo sea ejecutable y refuerza el bloqueo: `lint --strict` señala las citaciones huérfanas (el único modo de fallo que la CLI no podía detectar), `lock --init` crea el registro de plantilla, `requalify --status` lee el estado de la evidencia de un corpus y el direccionamiento del contenido del bloqueo se separa por dominio (esquema de artefactos v2: en lugar de marcar incorrectamente como manipulado un bloqueo de una versión anterior, se regenera; la interfaz de comandos de la CLI sigue siendo compatible con versiones anteriores). Este repositorio es la referencia pública; [PROTOCOL.md](PROTOCOL.md) es la forma ejecutable. Forma parte de la familia [dogfood-lab](https://github.com/dogfood-lab): métodos y ejemplos para construir en la era de la IA.
136
159
 
137
160
  Con licencia MIT.
138
161
 
package/README.fr.md CHANGED
@@ -75,9 +75,14 @@ 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] <path…>` | Vérifie la *pertinence de la recherche* d’une analyse par rapport à la norme de référencement : chaque conclusion doit comporter un auteur, une année et un identifiant résolvable (arXiv / DOI / URL) ; les affirmations du type « des études montrent que… » ne sont pas acceptées. En cas de violation, le programme se termine avec le code `1`, ce qui permet de contrôler l’intégration continue (CI). Un `<path>` peut être un fichier, un répertoire (validé récursivement pour les fichiers `*.dispatch.md`) ou `-` pour l’entrée standard ; l’option `--json` génère un rapport lisible par machine. |
78
+ | `study-swarm lint [--json] [--strict] <path…>` | Vérifiez la *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 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`. |
79
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 exacte**, 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`. |
80
81
  | `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* 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
+ | `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
+ | `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\ | 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. |
81
86
 
82
87
  `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.
83
88
 
@@ -90,7 +95,7 @@ study-swarm lint my-decision.dispatch.md # enforce the sourcing standard
90
95
  roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
91
96
  ```
92
97
 
93
- Trois analyses complètes et validées par « lint » sont fournies à titre d’exemple : [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (la décision centrale du protocole, concise), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (l’analyse complète de la version 1.1 : 27 références, chacune d’entre elles ayant été validée en externe) et [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (la conception du verrouillage de la version 1.2 : 39 références, validées par l’outil, et la première analyse à inclure son propre fichier de verrouillage).
98
+ Quatre documents complets et validés sont fournis en tant que références : [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (la décision centrale du protocole, concise), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (l’ensemble complet de la conception v1.1 : 27 citations, chacune vérifiée en externe), [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (la conception du verrouillage v1.2 : 39 citations, validée par l’exécuteur, et le premier document à inclure son propre verrouillage), et [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md) (la conception de la rétractation v1.3 : 27 citations relatives à la révocation, au retrait, aux sagas et à l’invalidation de la construction, et le premier document à être retiré puis réintégré).
94
99
 
95
100
  ### Intégration dans l’intégration continue (CI)
96
101
 
@@ -109,11 +114,15 @@ concurrency:
109
114
  jobs:
110
115
  lint:
111
116
  runs-on: ubuntu-latest
117
+ timeout-minutes: 5
112
118
  steps:
113
119
  - uses: actions/checkout@v4
114
120
  - uses: actions/setup-node@v4
115
121
  with: { node-version: '20' }
116
122
  - run: npx @dogfood-lab/study-swarm@latest lint dispatches/
123
+ # Halt the build while any finding that became canon is withdrawn and not yet
124
+ # removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
125
+ - run: npx @dogfood-lab/study-swarm@latest requalify --check dispatches/
117
126
  ```
118
127
 
119
128
  ### Enregistre une analyse pour la relecture (`dispatch.lock.json`)
@@ -122,6 +131,20 @@ Une analyse validée et vérifiée n’est auditable que si vous pouvez indiquer
122
131
 
123
132
  **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)).
124
133
 
134
+ ### Annulez un résultat retiré (`withdraw` / `requalify`)
135
+
136
+ Un résultat vérifié devient **canonique** : il influence une décision ultérieure. Que se passe-t-il lorsqu’il est ensuite **retiré** (une citation s’avère être fabriquée ou mal attribuée lors d’une nouvelle exécution, un article cité est retiré ou la validation le rejette) ? Un `git revert` ne suffit pas, car le résultat a déjà été propagé. Le mécanisme de compensation en cas de rétractation rend possible cette opération :
137
+
138
+ ```bash
139
+ study-swarm withdraw arXiv:2402.15089 --reason misattributed --from dispatches/ --receipt rollback.json
140
+ # → flags every dispatch citing it `evidence-withdrawn` (a tombstone sidecar — flag, never delete)
141
+ # and writes a content-addressed withdrawal receipt naming every dependent.
142
+ study-swarm requalify --check dispatches/ # exit 1 while any flag is unresolved — the andon HALT
143
+ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed # or: --mode regrounded --note "<attestation>"
144
+ ```
145
+
146
+ `requalify --check` **échoue** jusqu’à ce que chaque résultat signalé soit supprimé ou **réintégré** (revérifié par l’exécuteur associé ; la CLI enregistre l’attestation, mais ne le revérifie pas elle-même). Le retrait est mis en évidence de manière **contrastée**, et non silencieuse. Tout : le fichier annexe et le reçu sont identifiés par leur contenu et peuvent être suivis pour détecter les dérives, et cela n’opère que sur la couche des *preuves* : `lock --verify` n’est pas affecté par un retrait. La conception est basée sur [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md), et le [PROTOCOL.md](PROTOCOL.md) § « Compenser un résultat retiré » représente la forme exécutable. Il s’agit de la norme **NAMED_COMPENSATORS** rendue exécutable : une opération d’annulation nommée et idempotente qui laisse un état final connu et un reçu.
147
+
125
148
  ## Pourquoi cela fonctionne, en un clin d’œil
126
149
 
127
150
  **Efficacité** — le domaine évolue rapidement ; exiger des études spécifiques sur plusieurs années empêcherait la publication de nouvelles versions 18 mois plus tard. **Fonctionnalité** — les données probantes montrent ce qui *ne fonctionne pas*, et pas seulement ce qui fonctionne (les explications peuvent entraîner une dépendance excessive à l’égard d’une IA *erronée* — Bansal et al., 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779)). **Sécurité** — l’enveloppe protégée par le vérificateur est l’architecture que les données probantes soutiennent, et le protocole l’applique à sa propre sortie. La recherche de sources n’est pas un exercice académique ; il s’agit du fil conducteur des données probantes.
@@ -132,7 +155,7 @@ Une analyse validée et vérifiée n’est auditable que si vous pouvez indiquer
132
155
 
133
156
  ## État actuel
134
157
 
135
- Un protocole fonctionnel, vérifié de manière externe par ses propres mécanismes — une famille de modèles différente vérifie ses citations (voir la preuve ci-dessus). La **version 1.1** affine le vérificateur là où la première version était silencieuse : fondement décomposé/ternaire, ancrage au moment de la génération, cascade contrôlée par un oracle pour combiner les objectifs et abstention calibrée — chacun étant basé sur les données probantes de la version 1.1 vérifiée. La **version 1.2** rend une sortie reproductible : `study-swarm lock` fixe le modèle résolu, l’invite et le schéma d’outil pour chaque étape, ainsi que le reçu du vérificateur, et `lock --verify` échoue en cas de dérive. Ce dépôt est la référence publique ; [PROTOCOL.md](PROTOCOL.md) est la forme exécutable. Fait partie de la famille [dogfood-lab](https://github.com/dogfood-lab) — méthodes et exemples pour construire dans l’ère de l’IA.
158
+ Un protocole fonctionnel, vérifié en externe par ses propres mécanismes : une famille de modèles différente vérifie ses citations (voir la preuve ci-dessus). La **version 1.1** affine le validateur, alors que la première version était silencieuse : justification décomposée/ternaire, justification au moment de la génération, cascade à validation par oracle pour combiner les perspectives et abstention calibrée ; chaque élément est basé sur le document vérifié v1.1. La **version 1.2** rend un document rejouable : `study-swarm lock` fixe le modèle résolu, l’invite et le schéma d’outils par étape, ainsi que le reçu du validateur, et `lock --verify` échoue en cas de dérive. La **version 1.3** rend la rétractation exécutable : lorsqu’un résultat qui est déjà devenu canonique est retiré, `study-swarm withdraw` signale toutes les dépendances et `requalify --check` les interrompt jusqu’à ce qu’elles soient supprimées ou réintégrées : un mécanisme de compensation nommé, avec reçu et idempotent. La **version 2.0** rend davantage d’éléments du protocole exécutables et renforce le verrouillage : `lint --strict` signale les citations orphelines (le seul mode d’échec que la CLI ne pouvait pas détecter), `lock --init` crée le modèle d’ensemble, `requalify --status` affiche l’état des preuves d’un corpus et le verrouillage est identifié par son contenu de manière spécifique au domaine (schéma d’artefacts v2 : un verrouillage provenant d’une version antérieure est régénéré plutôt que signalé à tort comme étant altéré ; la surface de commande de la CLI reste compatible avec les versions antérieures). Ce dépôt est la référence publique ; [PROTOCOL.md](PROTOCOL.md) représente la forme exécutable. Il fait partie de la famille [dogfood-lab](https://github.com/dogfood-lab), qui propose des méthodes et des exemples pour construire dans l’ère de l’IA.
136
159
 
137
160
  Licence MIT.
138
161
 
package/README.hi.md CHANGED
@@ -75,9 +75,14 @@ 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] <path…>` | एक प्रेषण की *अनुसंधान आधार* की जांच सोर्सिंग मानक के विरुद्ध करें - प्रत्येक निष्कर्ष में एक लेखक, एक वर्ष और एक हल करने योग्य पहचानकर्ता (arXiv / DOI / URL) होना चाहिए; "अध्ययनों से पता चलता है..." जैसे अस्पष्ट कथन अस्वीकार कर दिए जाते हैं। उल्लंघन होने पर `1` से बाहर निकलें, इसलिए यह CI को संसाधित करता है। `<path>` एक फ़ाइल, एक निर्देशिका (जो `*.dispatch.md` के लिए पुनरावर्ती रूप से जांच की जाती है), या `-` stdin के लिए हो सकता है; `--json` मशीन-पठनीय रिपोर्ट उत्सर्जित करता है। |
78
+ | `study-swarm lint [--json] [--strict] <path…>` | किसी प्रेषण की *अनुसंधान नींव* को स्रोत मानक के विरुद्ध जांचें – प्रत्येक निष्कर्ष में एक लेखक, वर्ष और एक पहचानने योग्य पहचानकर्ता (arXiv / DOI / URL / RFC) होना चाहिए; "अध्ययनों से पता चलता है…" जैसे अस्पष्ट दावे अस्वीकार किए जाते हैं। उल्लंघन होने पर `1` कोड लौटाएं, ताकि यह CI प्रक्रिया को रोक सके। `<path>` एक फ़ाइल, एक निर्देशिका (जिसमें `*.dispatch.md` के लिए पुनरावर्ती रूप से जांच की जाती है), या stdin के लिए `-` हो सकता है; `--json` एक मशीन-पठनीय रिपोर्ट उत्पन्न करता है। `--strict` अतिरिक्त रूप से **अकेले उद्धरणों** को चिह्नित करता है – कोई भी निष्कर्ष जो चरण-5 विकल्प का संदर्भ नहीं देता है – क्योंकि "बिना किसी संबंध के उद्धरण बेकार हैं" (यह वैकल्पिक है, इसलिए डिफ़ॉल्ट CI प्रक्रिया अपरिवर्तित रहती है)। |
79
+ | `study-swarm lock --init <dispatch>` | `<dispatch>.orchestration.json` बनाएं – एक रिक्त स्थान भरने वाला ढांचा रिकॉर्ड (प्रत्येक चरण-2 एजेंट के लिए एक चरण) जिसे `lock … --from` में फीड किया जाता है। |
79
80
  | `study-swarm lock <dispatch> --from <orchestration.json>` | किसी प्रेषण को फिर से चलाने के लिए पिन करें – `<dispatch>.lock.json` सामग्री-आधारित, चरण-2 एजेंट के अनुसार लिखें, **समाधान मॉडल आईडी** + **बाइट-सटीक प्रॉम्प्ट का SHA-256** + **टूल स्कीमा का SHA-256**, साथ ही चरण-4 **सत्यापन रसीद**, एक `lock_sha256` में समेकित करें। |
80
81
  | `study-swarm lock --verify <dispatch> [--from …]` | उन हैश को फिर से प्राप्त करें और पुष्टि करें कि वे लॉक से मेल खाते हैं; यदि कोई विचलन होता है, तो यह `1` पर समाप्त हो जाएगा, इसलिए यह पैकेज लॉकफ़ाइल की तरह CI को नियंत्रित करता है। `--from` के बिना, यह लॉक की अपनी अखंडता की जांच करता है। |
82
+ | `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **कैनन-रोलबैक क्षतिपूर्ति।** कॉर्पस में प्रत्येक प्रेषण को चिह्नित करें, जिसमें *अनुसंधान आधार* `<id>` को `सबूत-वापस लिया गया` के रूप में उद्धृत किया गया है (एक मकबरे की साइडकार `<slug>.withdrawn.json` — चिह्नित करें, कभी भी हटाएं नहीं) और सामग्री-आधारित वापसी रसीद जारी करें। `--reason` ∈ `गढ़ा हुआ · गलत तरीके से श्रेय दिया गया · वापस लिया गया · सत्यापनकर्ता-उलट गया · अन्य`। |
83
+ | `study-swarm requalify --check <corpus-dir>` | किसी भी ऐसे प्रेषण के लिए विफल बंद (निकास `1`) जिसमें एक अनसुलझा `सबूत-वापस लिया गया` ध्वज हो — वह उपकरण जो किसी वापस लिए गए निष्कर्ष की निर्भरताओं को तब तक रोकता है जब तक कि उसे हटाया या पुन: स्थापित नहीं किया जाता। गेट्स सीआई। |
84
+ | `study-swarm requalify --status <corpus-dir> [--json]` | एक कॉर्पस का केवल पढ़ने योग्य प्रमाण-स्वास्थ्य **दृश्य** – वापस लिए गए बनाम हल किए गए निष्कर्षों की संख्या, कारण और समाधान मोड द्वारा वर्गीकरण, प्रति प्रेषण पंक्तियाँ। सूचनात्मक (कोड `0` लौटाएं), `--check` प्रक्रिया से अलग। |
85
+ | `study-swarm requalify --resolve <dispatch> <id> --mode removed\ | regrounded [--note …]` | एक बार जब निष्कर्ष हटा दिया जाता है (उद्धरण गायब हो जाता है) या पुन: स्थापित किया जाता है, तो एक ध्वज साफ़ करें (भाई रनर द्वारा पुन: सत्यापित स्वच्छ; `--note` सत्यापन को रिकॉर्ड करता है)। आइडेंपोटेंट; साइडकार के ऑडिट ट्रेल में जोड़ता है। |
81
86
 
82
87
  `lint` नियतात्मक है - शून्य मॉडल कॉल - इसलिए यह CI में सुरक्षित है। यह स्थानीय रूप से **चरण 3 के सोर्सिंग मानक** को लागू करता है; मॉडल-आधारित **चरण 4** सत्यापन अभी भी [`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → प्रिज्म पर निर्भर करता है।
83
88
 
@@ -90,7 +95,7 @@ study-swarm lint my-decision.dispatch.md # enforce the sourcing standard
90
95
  roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
91
96
  ```
92
97
 
93
- तीन पूर्ण, त्रुटि-मुक्त प्रेषण संदर्भों के रूप में भेजे जाते हैं: [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (प्रोटोकॉल का केंद्रीय निर्णय, संक्षिप्त), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (पूर्ण v1.1 डिज़ाइन पास – 27 उद्धरण, जिनमें से प्रत्येक को बाहरी रूप से सत्यापित किया गया है), और [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (v1.2 लॉक डिज़ाइन – 39 उद्धरण, रनर के माध्यम से नियंत्रित, और पहला प्रेषण जो अपना स्वयं का लॉक भेजता है)।
98
+ चार पूर्ण, लिंट-स्वच्छ प्रेषण संदर्भों के रूप में भेजे जाते हैं: [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (प्रोटोकॉल का केंद्रीय निर्णय, संक्षिप्त), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (पूर्ण v1.1 डिज़ाइन पास — 27 उद्धरण, प्रत्येक बाहरी रूप से सत्यापित), [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (v1.2 लॉक डिज़ाइन — 39 उद्धरण, रनर के माध्यम से गेट किया गया, और पहला प्रेषण जो अपना स्वयं का लॉक भेजता है), और [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md) (v1.3 कैनन-रोलबैक डिज़ाइन — निरसन, वापसी, गाथाओं और बिल्ड-अमान्यता में 27 उद्धरण, और पहला प्रेषण जिसे वापस लिया गया है और फिर से योग्य बनाया गया)।
94
99
 
95
100
  ### इसे CI में संसाधित करें
96
101
 
@@ -109,11 +114,15 @@ concurrency:
109
114
  jobs:
110
115
  lint:
111
116
  runs-on: ubuntu-latest
117
+ timeout-minutes: 5
112
118
  steps:
113
119
  - uses: actions/checkout@v4
114
120
  - uses: actions/setup-node@v4
115
121
  with: { node-version: '20' }
116
122
  - run: npx @dogfood-lab/study-swarm@latest lint dispatches/
123
+ # Halt the build while any finding that became canon is withdrawn and not yet
124
+ # removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
125
+ - run: npx @dogfood-lab/study-swarm@latest requalify --check dispatches/
117
126
  ```
118
127
 
119
128
  ### किसी प्रेषण को फिर से चलाने के लिए पिन करें (`dispatch.lock.json`)
@@ -122,6 +131,20 @@ jobs:
122
131
 
123
132
  **यह इनपुट को पिन करता है, आउटपुट को नहीं।** मॉडल + प्रॉम्प्ट + तापमान को पिन करने से 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))।
124
133
 
134
+ ### एक वापस लिए गए निष्कर्ष को रोल बैक करें (`withdraw` / `requalify`)
135
+
136
+ एक सत्यापित निष्कर्ष **कैनन** बन जाता है — यह एक डाउनस्ट्रीम निर्णय को सूचित करता है। तो क्या होता है जब इसे बाद में **वापस ले लिया जाता है** (एक उद्धरण नकली/गलत तरीके से श्रेय दिया गया पाया जाता है, एक उद्धृत पेपर वापस ले लिया जाता है, या गेट इसे उलट देता है)? `git revert` पर्याप्त नहीं है, क्योंकि निष्कर्ष पहले ही प्रसारित हो चुका है। कैनन-रोलबैक क्षतिपूर्ति सफाई को निष्पादन योग्य बनाता है:
137
+
138
+ ```bash
139
+ study-swarm withdraw arXiv:2402.15089 --reason misattributed --from dispatches/ --receipt rollback.json
140
+ # → flags every dispatch citing it `evidence-withdrawn` (a tombstone sidecar — flag, never delete)
141
+ # and writes a content-addressed withdrawal receipt naming every dependent.
142
+ study-swarm requalify --check dispatches/ # exit 1 while any flag is unresolved — the andon HALT
143
+ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed # or: --mode regrounded --note "<attestation>"
144
+ ```
145
+
146
+ `requalify --check` **विफल बंद** होता है जब तक कि प्रत्येक चिह्नित निष्कर्ष को हटाया या **पुन: स्थापित** नहीं किया जाता (भाई रनर द्वारा पुन: सत्यापित स्वच्छ — सीएलआई सत्यापन रिकॉर्ड करता है, यह स्वयं से पुन: सत्यापित नहीं करता)। वापसी को **तुलनात्मक रूप से** प्रस्तुत किया जाता है, कभी भी चुपचाप नहीं। सब कुछ — मकबरे और रसीद — सामग्री-आधारित और विचलन-पता लगाने योग्य है, और केवल *सबूत* परत पर संचालित होता है: `lock --verify` एक वापसी से अप्रभावित रहता है। डिज़ाइन [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md) में निहित है, और [PROTOCOL.md](PROTOCOL.md) §"एक वापस लिए गए निष्कर्ष की क्षतिपूर्ति" निष्पादन योग्य आकार है। यह **NAMED_COMPENSATORS** मानक है जिसे निष्पादन योग्य बनाया गया है: एक नामित, आइडेंपोटेंट पूर्ववत जो एक ज्ञात पोस्ट-स्थिति और एक रसीद छोड़ता है।
147
+
125
148
  ## यह कैसे काम करता है, एक सांस में
126
149
 
127
150
  **वर्तमान** - क्षेत्र तेजी से आगे बढ़ रहा है; विशिष्ट अध्ययनों के साथ वर्षों की मांग करने से डिज़ाइन 18 महीने पीछे नहीं रहते हैं। **कार्यात्मक** - साक्ष्य दिखाते हैं कि क्या *असफल* होता है, न कि केवल यह कि क्या काम करता है (व्याख्याएँ *गलत* AI पर अत्यधिक निर्भरता बढ़ा सकती हैं - बंसल एट अल. 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779))। **सुरक्षित** - सत्यापनकर्ता-संरक्षित आवरण वह आर्किटेक्चर है जिसे साक्ष्य समर्थन देता है, और प्रोटोकॉल इसे अपने स्वयं के आउटपुट पर लागू करता है। सोर्सिंग अकादमिक नाटक नहीं है; यह साक्ष्य श्रृंखला है।
@@ -132,7 +155,7 @@ jobs:
132
155
 
133
156
  ## स्थिति
134
157
 
135
- एक कार्यशील प्रोटोकॉल, जिसकी अपनी मशीनरी द्वारा बाहरी रूप से पुष्टि की जाती है – एक अलग मॉडल परिवार इसके उद्धरणों की जांच करता है (ऊपर प्रमाण देखें)। **v1.1** सत्यापनकर्ता को तेज करता है जहाँ पहला संस्करण मौन था: विघटित/त्रिक आधार, पीढ़ी-समय आधार, लेंस को संयोजित करने के लिए एक ओरेकल-गेटेड कैस्केड और अंशांकित परित्याग – प्रत्येक सत्यापित v1.1 प्रेषण में आधारित। **v1.2** एक प्रेषण को बाइट-पुन: चलाने योग्य बनाता है: `study-swarm lock` चरण दर चरण समाधान मॉडल, प्रॉम्प्ट और टूल स्कीमा को पिन करता है, साथ ही सत्यापनकर्ता रसीद भी, और `lock --verify` विचलन पर विफल हो जाता है। यह रिपॉजिटरी सार्वजनिक संदर्भ है; [PROTOCOL.md](PROTOCOL.md) निष्पादन योग्य आकार है। [dogfood-lab](https://github.com/dogfood-lab) परिवार का हिस्सा – AI युग में निर्माण के लिए विधियाँ और प्रदर्शन।
158
+ एक कार्यशील प्रोटोकॉल, जिसकी अपनी मशीनरी द्वारा बाहरी रूप से पुष्टि की जाती है – एक अलग मॉडल परिवार इसके उद्धरणों की जांच करता है (ऊपर दिए गए प्रमाण देखें)। **v1.1** उस सत्यापनकर्ता को बेहतर बनाता है जहाँ पहले संस्करण में यह मौन था: विघटित/त्रिक नींव, पीढ़ी-समय नींव, लेंसों को संयोजित करने के लिए एक ओरेकल-गेटेड कैस्केड, और अंशांकित परहेज – प्रत्येक सत्यापित v1.1 प्रेषण में निहित। **v1.2** किसी प्रेषण को बाइट-रीप्लेबल बनाता है: `study-swarm lock` प्रति चरण हल किए गए मॉडल, संकेत और उपकरण स्कीमा को पिन करता है, साथ ही सत्यापनकर्ता रसीद भी, और `lock --verify` विचलन होने पर विफल हो जाता है। **v1.3** रोलबैक को निष्पादन योग्य बनाता है: जब कोई ऐसा निष्कर्ष जो पहले से ही मानक बन चुका है, वापस ले लिया जाता है, तो `study-swarm withdraw` प्रत्येक निर्भरता को चिह्नित करता है और `requalify --check` उन्हें तब तक विफल कर देता है जब तक कि उन्हें हटाया या पुन: स्थापित नहीं किया जाता – एक नामित, रसीद वाला, आइडेंपोटेंट क्षतिपूर्ति। **v2.0** प्रोटोकॉल के अधिक भाग को निष्पादन योग्य बनाता है और लॉक को मजबूत करता है: `lint --strict` अकेले उद्धरणों को चिह्नित करता है – वह एकमात्र ज्ञात विफलता मोड जिसे CLI पकड़ नहीं सका – `lock --init` ढांचा रिकॉर्ड बनाता है, `requalify --status` एक कॉर्पस के प्रमाण-स्वास्थ्य को पढ़ता है, और लॉक की सामग्री-पताकरण डोमेन से अलग होती है (आर्टिफैक्ट स्कीमा v2 – पुराने संस्करण का लॉक पुन: उत्पन्न किया जाता है बजाय इसके कि उसे छेड़छाड़ किए गए रूप में गलत तरीके से चिह्नित किया जाए; CLI की कमांड सतह पिछली संगतता बनाए रखती है)। यह रिपॉजिटरी सार्वजनिक संदर्भ है; [PROTOCOL.md](PROTOCOL.md) निष्पादन योग्य आकार है। [dogfood-lab](https://github.com/dogfood-lab) परिवार का हिस्सा – AI युग में निर्माण के लिए विधियाँ और प्रदर्शन।
136
159
 
137
160
  MIT लाइसेंस प्राप्त।
138
161
 
package/README.it.md CHANGED
@@ -75,9 +75,14 @@ npm i -g @dogfood-lab/study-swarm # or run ad-hoc: npx @dogfood-lab/study-sw
75
75
  |---|---|
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
- | `study-swarm lint [--json] <path…>` | Verifica la *fondatezza della ricerca* di un sistema rispetto allo standard di riferimento: ogni risultato deve avere un autore, un anno e un identificatore risolvibile (arXiv / DOI / URL); le affermazioni generiche del tipo "gli studi dimostrano..." vengono rifiutate. In caso di violazioni, il programma termina con codice `1`, in modo da bloccare l'integrazione continua (CI). Un `<path>` può essere un file, una directory (analizzata ricorsivamente per i file `*.dispatch.md`) o `-` per l'input standard; `--json` emette un report leggibile dalla macchina. |
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 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`. |
79
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 esatto in byte** e l'**SHA-256 dello schema dello strumento**, oltre alla **ricevuta del verificatore** del passaggio 4, tutto racchiuso in un unico `lock_sha256`. |
80
81
  | `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 l'*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
+ | `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
+ | `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\ | 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. |
81
86
 
82
87
  `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.
83
88
 
@@ -90,7 +95,7 @@ study-swarm lint my-decision.dispatch.md # enforce the sourcing standard
90
95
  roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
91
96
  ```
92
97
 
93
- Tre sistemi completi e "puliti" secondo i criteri di linting vengono forniti come riferimento: [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (la decisione centrale del protocollo, in forma compatta), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (l'intero passaggio di progettazione della versione 1.1: 27 citazioni, tutte verificate esternamente) e [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (il progetto del blocco della versione 1.2: 39 citazioni, verificate tramite lo strumento, ed è il primo sistema a fornire il proprio file di blocco).
98
+ Quattro documenti completi e validati vengono utilizzati come riferimento: [`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md) (la decisione centrale del protocollo, in forma compatta), [`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md) (l'implementazione completa della versione 1.1: 27 citazioni, tutte verificate esternamente), [`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md) (il design della versione 1.2 con il meccanismo di blocco: 39 citazioni, gestite tramite il processo parallelo, ed è il primo documento a includere il proprio meccanismo di blocco) e [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md) (il design della versione 1.3 con il meccanismo di rollback: 27 citazioni relative alla revoca, al ritiro, alle sequenze di eventi e all'invalidazione della build, ed è il primo documento ad essere rimosso e poi riqualificato).
94
99
 
95
100
  ### Bloccalo nell'integrazione continua (CI)
96
101
 
@@ -109,11 +114,15 @@ concurrency:
109
114
  jobs:
110
115
  lint:
111
116
  runs-on: ubuntu-latest
117
+ timeout-minutes: 5
112
118
  steps:
113
119
  - uses: actions/checkout@v4
114
120
  - uses: actions/setup-node@v4
115
121
  with: { node-version: '20' }
116
122
  - run: npx @dogfood-lab/study-swarm@latest lint dispatches/
123
+ # Halt the build while any finding that became canon is withdrawn and not yet
124
+ # removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
125
+ - run: npx @dogfood-lab/study-swarm@latest requalify --check dispatches/
117
126
  ```
118
127
 
119
128
  ### Blocca un sistema per la riproduzione (`dispatch.lock.json`)
@@ -122,6 +131,20 @@ Un sistema fondato e verificato è auditabile solo se si può dire *cosa lo ha p
122
131
 
123
132
  **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)).
124
133
 
134
+ ### Esegue il rollback di un'affermazione rimossa (`withdraw` / `requalify`)
135
+
136
+ Un'affermazione verificata diventa **canonica**: fornisce informazioni per una decisione successiva. Quindi, cosa succede quando viene successivamente **rimossa** (una citazione si rivela falsa/errata durante una nuova esecuzione, un articolo citato viene ritirato o il meccanismo di controllo la contrassegna)? Un comando `git revert` non è sufficiente, perché l'affermazione è già stata propagata. Il meccanismo di compensazione per il rollback rende possibile questa operazione:
137
+
138
+ ```bash
139
+ study-swarm withdraw arXiv:2402.15089 --reason misattributed --from dispatches/ --receipt rollback.json
140
+ # → flags every dispatch citing it `evidence-withdrawn` (a tombstone sidecar — flag, never delete)
141
+ # and writes a content-addressed withdrawal receipt naming every dependent.
142
+ study-swarm requalify --check dispatches/ # exit 1 while any flag is unresolved — the andon HALT
143
+ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed # or: --mode regrounded --note "<attestation>"
144
+ ```
145
+
146
+ `requalify --check` **termina con errore** finché ogni affermazione contrassegnata non viene rimossa o **rielaborata** (verificata nuovamente dal processo parallelo; la CLI registra la conferma, ma non esegue essa stessa la verifica). La rimozione viene evidenziata in modo **contraddittorio**, e non semplicemente eliminando l'elemento. Tutto (il file "tombstone" e la ricevuta) è basato sul contenuto ed è rilevabile nel tempo, e opera solo sullo strato delle *fonti*: `lock --verify` non viene influenzato dalla rimozione. Il design si basa su [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md), e il documento [PROTOCOL.md](PROTOCOL.md) §"Compensating a withdrawn finding" rappresenta l'implementazione pratica. Questo è lo standard **NAMED_COMPENSATORS** reso eseguibile: un meccanismo di annullamento denominato e idempotente che lascia uno stato finale noto e una ricevuta.
147
+
125
148
  ## Perché funziona, in sintesi:
126
149
 
127
150
  **Attuale:** il settore è in rapida evoluzione; richiedere studi specifici che durino anni impedisce di rilasciare i progetti con 18 mesi di ritardo. **Funzionale:** le evidenze mostrano cosa *fallisce*, non solo cosa funziona (le spiegazioni possono aumentare l'eccessiva dipendenza da un'IA *errata* — Bansal et al. 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779)). **Sicuro:** l'ambito protetto dal verificatore è l'architettura supportata dalle evidenze e il protocollo la applica ai propri output. L'analisi delle fonti non è un esercizio accademico; è la traccia delle evidenze.
@@ -132,7 +155,7 @@ Un sistema fondato e verificato è auditabile solo se si può dire *cosa lo ha p
132
155
 
133
156
  ## Stato
134
157
 
135
- Un protocollo funzionante, verificato esternamente dai propri meccanismi: una famiglia di modelli diversa verifica le sue citazioni (vedere la prova sopra). **v1.1** affina il verificatore rispetto alla prima versione, che era silenziosa: base dati scomposta/ternaria, ancoraggio al momento della generazione, una cascata controllata da un oracolo per combinare le "lenti" e astensione calibrata — ciascuno basato sulle evidenze verificate di v1.1. **v1.2** rende un output riproducibile byte per byte: `study-swarm lock` blocca il modello, il prompt e lo schema dello strumento risolti per ogni passaggio più la ricevuta del verificatore, e `lock --verify` fallisce in caso di deriva. Questo repository è il riferimento pubblico; [PROTOCOL.md](PROTOCOL.md) è la forma eseguibile. Parte della famiglia [dogfood-lab](https://github.com/dogfood-lab): metodi ed esempi per lo sviluppo nell'era dell'IA.
158
+ Un protocollo funzionante, verificato esternamente dai suoi stessi strumenti: una famiglia diversa di modelli verifica le sue citazioni (vedi la prova sopra). La **versione 1.1** migliora il meccanismo di verifica rispetto alla prima versione, che era silenziosa: attendibilità delle fonti decomposta/ternaria, verifica al momento della generazione, una cascata controllata da un oracolo per combinare le diverse prospettive e astensione calibrata: ogni elemento è basato sull'affermazione verificata nella versione 1.1. La **versione 1.2** rende un documento riproducibile: `study-swarm lock` memorizza il modello, il prompt e lo schema degli strumenti risolti per ogni passaggio, oltre alla ricevuta del meccanismo di verifica, e `lock --verify` termina con errore in caso di modifiche non autorizzate. La **versione 1.3** rende eseguibile il rollback: quando un'affermazione che è già diventata canonica viene rimossa, `study-swarm withdraw` contrassegna tutti gli elementi dipendenti e `requalify --check` li interrompe, terminando con errore finché non vengono rimossi o rielaborati: un meccanismo di compensazione denominato, dotato di ricevuta e idempotente. La **versione 2.0** rende più parti del protocollo eseguibili e rafforza il meccanismo di blocco: `lint --strict` contrassegna le citazioni orfane (l'unico tipo di errore che la CLI non riusciva a rilevare), `lock --init` crea il modello di configurazione, `requalify --status` legge lo stato delle fonti del corpus e l'indirizzamento basato sul contenuto del blocco è separato per dominio (schema degli artefatti versione 2: un blocco da una versione precedente viene rigenerato anziché essere contrassegnato erroneamente come manomesso; la superficie dei comandi della CLI rimane compatibile con le versioni precedenti). Questo repository è il riferimento pubblico; [PROTOCOL.md](PROTOCOL.md) rappresenta l'implementazione pratica. Fa parte della famiglia [dogfood-lab](https://github.com/dogfood-lab): metodi e esempi per lo sviluppo nell'era dell'intelligenza artificiale.
136
159
 
137
160
  Con licenza MIT.
138
161
 
package/README.ja.md CHANGED
@@ -75,9 +75,14 @@ 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] <path…>` | ディスパッチの*研究根拠*をソース標準と比較してチェックします。すべての発見には、著者、年、および解決可能な識別子(arXiv / DOI / URL)が必要です。「研究によると…」という曖昧な表現は拒否されます。違反があった場合、終了コード`1`を返し、CIでゲートとして機能します。`<path>`はファイル、ディレクトリ(`.dispatch.md`ファイルを再帰的にlint)、または`-`(標準入力)のいずれかになります。`--json`オプションを使用すると、機械可読形式のレポートが出力されます。 |
78
+ | `study-swarm lint [--json] [--strict] <path…>` | ディスパッチの「研究根拠」を、ソースの標準と比較して確認します。すべての調査結果には、著者、年、および解決可能な識別子(arXiv / DOI / URL / RFC)が必要です。「研究では~と示されています…」という曖昧な表現は認められません。違反があった場合は `1` を返して処理を停止し、CI のゲートとして機能します。`<path>` は、ファイル、ディレクトリ(`*.dispatch.md` に対して再帰的にチェックされます)、または標準入力 (`-`) にすることができます。`--json` オプションを使用すると、機械可読のレポートが出力されます。`--strict` オプションを追加すると、**孤立した引用**(Step 5 のいずれかの選択肢で参照されていない調査結果)がフラグ付けされます。「関連性のない引用はノイズである」ためです(オプションであり、デフォルトの CI ゲートは変更されません)。 |
79
+ | `study-swarm lock --init <dispatch>` | `<dispatch>.orchestration.json` を作成します。これは、`lock … --from` に渡すための、穴埋め形式のハーネスレコードです(Step-2 のエージェントごとに1つのステップ)。 |
79
80
  | `study-swarm lock <dispatch> --from <orchestration.json>` | ディスパッチをリプレイ用に固定します。`<dispatch>.lock.json`ファイルに、ステップ2のエージェントごとに、**解決されたモデルID** + **正確なバイト単位のプロンプトのSHA-256ハッシュ** + **ツールスキーマのSHA-256ハッシュ**、およびステップ4の**検証レシート**をまとめて書き込みます。これらを1つの`lock_sha256`にまとめます。 |
80
81
  | `study-swarm lock --verify <dispatch> [--from …]` | これらのハッシュを再計算し、ロックファイルと一致することを確認します。いずれかのハッシュが異なる場合、終了コード`1`を返し、CIでゲートとして機能します(パッケージのロックファイルと同様)。`--from`オプションがない場合は、ロックファイルの整合性をチェックします。 |
82
+ | `study-swarm withdraw <id> --reason <reason> [--from <dir>] [--receipt <path>]` | **カノンロールバック補正器**。コーパス内のすべてのディスパッチについて、「研究根拠」で `<id>` を引用しているものを `evidence-withdrawn` としてフラグ付けします(墓石のようなサイドカーファイル `<slug>.withdrawn.json` で、フラグを立てますが削除はしません)。また、コンテンツアドレス指定された取り下げレシートを出力します。`--reason` は `fabricated · misattributed · retracted · verifier-flipped · other` のいずれかです。 |
83
+ | `study-swarm requalify --check <corpus-dir>` | 未解決の `evidence-withdrawn` フラグを持つディスパッチがある場合、処理を停止してエラー (`1`) を返します。これは、取り下げられた調査結果に依存するものを、削除または再検証されるまで停止させるための「アンドン」です。CI のゲートとしても機能します。 |
84
+ | `study-swarm requalify --status <corpus-dir> [--json]` | コーパスの読み取り専用の証拠健全性**ビュー**を提供します。取り下げられたものと解決されたものの数、理由および解決モードごとの内訳、ディスパッチごとの行を表示します。これは情報提供のみを目的としており(`0` を返します)、`--check` ゲートとは異なります。 |
85
+ | `study-swarm requalify --resolve <dispatch> <id> --mode removed\ | regrounded [--note …]` | 調査結果が削除されたとき(引用がなくなったとき)または再検証されたときに、フラグをクリアします(兄弟ランナーによって再度検証され、問題がないことが確認されます。`--note` には証拠が記録されます)。べき等であり、サイドカーの監査ログに追加されます。 |
81
86
 
82
87
  `lint`は決定論的であり、モデル呼び出しはゼロであるため、CIでの使用に安全です。ローカルで**ステップ3のソース標準**を適用し、モデルベースの**ステップ4**検証は引き続き[`roleos verify-citations`](https://github.com/mcp-tool-shop-org/role-os) → prismに委ねます。
83
88
 
@@ -90,7 +95,7 @@ study-swarm lint my-decision.dispatch.md # enforce the sourcing standard
90
95
  roleos verify-citations my-decision.dispatch.md # model-based Step 4 (different family, via prism)
91
96
  ```
92
97
 
93
- 以下に示す3つの完全な、不要な情報を削除して整理されたドキュメントを参考として提供します。[`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md)(プロトコルの主要な決定事項、簡潔にまとめたもの)、[`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md)(完全なv1.1設計、27件の引用があり、すべて外部で検証済み)、および[`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md)(v1.2ロック設計、39件の引用があり、実行環境を通じて管理され、独自のロックを実装した最初のドキュメント)。
98
+ 4つの完全で、lint チェックに合格したディスパッチを参考として提供します:[`examples/study-swarm-self.dispatch.md`](examples/study-swarm-self.dispatch.md)(プロトコルの中心的な決定であり、コンパクト)、[`examples/study-swarm-v1_1.dispatch.md`](examples/study-swarm-v1_1.dispatch.md)(完全な v1.1 の設計パスであり、27件の引用があり、そのすべてが外部で検証されています)、[`examples/study-swarm-lock.dispatch.md`](examples/study-swarm-lock.dispatch.md)(v1.2 のロック設計であり、39件の引用があり、ランナーを通じてゲートされ、独自のロックを最初に提供するディスパッチです)、および [`examples/study-swarm-canon-rollback.取り消し、撤回、サガ、ビルド無効化など、27件の引用が含まれており、最初に取り下げられてから再検証されるディスパッチです)。
94
99
 
95
100
  ### CIでゲートとして使用する
96
101
 
@@ -109,11 +114,15 @@ concurrency:
109
114
  jobs:
110
115
  lint:
111
116
  runs-on: ubuntu-latest
117
+ timeout-minutes: 5
112
118
  steps:
113
119
  - uses: actions/checkout@v4
114
120
  - uses: actions/setup-node@v4
115
121
  with: { node-version: '20' }
116
122
  - run: npx @dogfood-lab/study-swarm@latest lint dispatches/
123
+ # Halt the build while any finding that became canon is withdrawn and not yet
124
+ # removed or re-grounded — the canon-rollback andon (exit 1 on any unresolved flag).
125
+ - run: npx @dogfood-lab/study-swarm@latest requalify --check dispatches/
117
126
  ```
118
127
 
119
128
  ### ディスパッチをリプレイ用に固定する(`dispatch.lock.json`)
@@ -122,6 +131,20 @@ jobs:
122
131
 
123
132
  **入力は固定し、出力は固定しません。** モデル、プロンプト、温度を固定しても、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)) として提供されます。
124
133
 
134
+ ### 取り下げられた調査結果をロールバックします(`withdraw` / `requalify`)
135
+
136
+ 検証された調査結果は**カノン**になります。これは、後続の決定に影響を与えます。では、後で**取り下げられた**場合(再実行時に引用が捏造または誤って帰属されていることが判明した場合、引用された論文が撤回された場合、またはゲートがそれを反転させた場合)はどうなるでしょうか? `git revert` だけでは不十分です。なぜなら、調査結果はすでに伝播しているからです。カノンロールバック補正器を使用すると、クリーンアップを確実に実行できます。
137
+
138
+ ```bash
139
+ study-swarm withdraw arXiv:2402.15089 --reason misattributed --from dispatches/ --receipt rollback.json
140
+ # → flags every dispatch citing it `evidence-withdrawn` (a tombstone sidecar — flag, never delete)
141
+ # and writes a content-addressed withdrawal receipt naming every dependent.
142
+ study-swarm requalify --check dispatches/ # exit 1 while any flag is unresolved — the andon HALT
143
+ study-swarm requalify --resolve d.dispatch.md arXiv:2402.15089 --mode removed # or: --mode regrounded --note "<attestation>"
144
+ ```
145
+
146
+ `requalify --check` は、フラグが立てられたすべての調査結果が削除されるか、**再検証されるまで**(兄弟ランナーによって再度検証され、問題がないことが確認されます。CLI は証拠を記録しますが、それ自体で再検証は行いません)、**処理を停止してエラーを返します**。取り下げは、静かにドロップするのではなく、**対照的に**表示されます。すべて(墓石とレシート)がコンテンツアドレス指定され、ドリフト検出が可能であり、*証拠* レイヤーでのみ動作します:`lock --verify` は取り消しによって影響を受けません。この設計は [`examples/study-swarm-canon-rollback.dispatch.md`](examples/study-swarm-canon-rollback.dispatch.md) に基づいており、[PROTOCOL.md](PROTOCOL.md) の「Compensating a withdrawn finding」セクションが実行可能な形式です。これは、**NAMED_COMPENSATORS** 標準を実行可能にしたものです。名前付きでべき等なアンドゥ操作であり、既知のポスト状態とレシートを残します。
147
+
125
148
  ## その仕組みを簡潔に説明します
126
149
 
127
150
  **最新性** — この分野は急速に進歩しており、特定の研究(数年間の期間が必要)に固執すると、設計が18か月遅れてしまう可能性があります。**機能性** — 証拠は、何が「うまくいく」かだけでなく、何が「うまくいかない」かを示しています(説明を加えることで、誤ったAIへの過度な依存が生じる可能性があります—Bansal et al. 2021, [arXiv:2006.14779](https://arxiv.org/abs/2006.14779))。**安全性** — 検証者によって保護された範囲は、証拠が裏付けるアーキテクチャであり、プロトコルによってその出力に強制されます。情報源の提示は学術的なパフォーマンスではなく、証拠の追跡です。
@@ -132,7 +155,7 @@ jobs:
132
155
 
133
156
  ## ステータス
134
157
 
135
- 動作するプロトコルであり、独自の仕組みによって外部から検証されています—異なるモデルファミリーがその引用をチェックします(上記の証拠を参照)。**v1.1** では、最初のリリースでは明示されていなかった検証機能を強化しています。具体的には、分解/三値の根拠付け、生成時の根拠付け、レンズを組み合わせるためのオラクルゲート付きカスケード、およびキャリブレーションされた棄権などです。これらの要素はすべて、検証済みの v1.1 ディスパッチに基づいて構築されています。**v1.2** では、ディスパッチをバイト単位で再現可能にするために、`study-swarm lock` を使用して、各ステップで使用される解決済みのモデル、プロンプト、およびツールスキーマに加えて、検証者のレシートを固定します。また、`lock --verify` コマンドを使用すると、ドリフトが発生した場合に処理が停止します。このリポジトリは公開参照であり、[PROTOCOL.md](PROTOCOL.md) に実行可能な形式で記述されています。これは、[dogfood-lab](https://github.com/dogfood-lab) ファミリーの一部であり、AI時代における構築のための方法と事例を紹介しています。
158
+ 独自のメカニズムによって外部検証された動作するプロトコルです。別のモデルファミリーがその引用をチェックします(上記の証拠を参照)。**v1.1** では、最初のリリースでは静的だった検証器が強化されています:分解/三値の根拠付け、生成時の根拠付け、レンズを組み合わせるためのオラクルゲート付きカスケード、および調整された棄権。これらはすべて、検証済みの v1.1 ディスパッチに基づいています。**v1.2** では、ディスパッチがバイト単位で再現可能になります:`study-swarm lock` は、ステップごとの解決済みモデル、プロンプト、ツールスキーマと、検証器レシートを固定します。また、`lock --verify` はドリフトが発生すると処理を停止してエラーを返します。**v1.3** では、ロールバックを実行可能にします:すでにカノンになった調査結果が取り下げられた場合、`study-swarm withdraw` はすべての依存関係にフラグを立て、`requalify --check` はそれらを削除または再検証されるまで処理を停止してエラーを返します。これは、名前付きでレシート付きのべき等な補正器です。**v2.0** では、プロトコルのより多くの部分を実行可能にし、ロックを強化します:`lint --strict` は孤立した引用にフラグを立てます(CLI が検出できなかった唯一の失敗モード)、`lock --init` はハーネスレコードを作成し、`requalify --status` はコーパスの証拠健全性を読み取り、ロックのコンテンツアドレス指定はドメインで分離されます(アーティファクトスキーマ v2。以前のバージョンのロックは再生成され、改ざんされたと誤ってフラグが立てられることはありません。CLI のコマンドサーフェスは後方互換性を維持します)。このリポジトリは公開参照であり、[PROTOCOL.md](PROTOCOL.md) が実行可能な形式です。これは、[dogfood-lab](https://github.com/dogfood-lab) ファミリーの一部であり、AI 時代に構築するための方法とデモンストレーションを提供します。
136
159
 
137
160
  MITライセンス。
138
161