Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

protocol-review

/protocol-review

Przegląda zmiany w protokołach i narzędziach względem zasad organizacji przed pull requestem, na przykład nagłówków licencji i wersjonowania formatów.

Repozytorium
skills ↗
Licencja
LGPL
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
49
Skrypty
4
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

LGPL, otwarta.

Co sprawdzić przed instalacją
  • 4 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: evals/ci-wire/place-files.sh, evals/clean-script-judgement/place-files.sh, evals/core-rand-include/graders/05.sh, evals/core-rand-include/place-files.sh

Co robi i kiedy

Przegląda zmiany w protokołach i narzędziach względem zasad organizacji przed pull requestem, na przykład nagłówków licencji i wersjonowania formatów.

Oryginalny opis (EN)

Review a swarm-routing protocol or tool change against the org's golden rules before a pull request or during review: licence headers per directory, the core/ include boundary, versioned wire formats, no module named core, determinism, paired comparisons, bounded structures, pinned CI, nothing shipped depending on .claude/, plus the repository's own rules. Use whenever a diff touches core/, ns3/, model/, a wire format, a CMakeLists, a workflow or a benchmark claim in any org repository (ARA, BeeAdHoc, Termite, HOPNET, ns3-swarm-core, ns3-tools), when asked to review a PR there, or before pushi

Jak działa

  1. 1. Run the mechanical checks
  2. 2. Judge what the script cannot
  3. 3. Report
Sekcje z nagłówków SKILL.md, w oryginale · 119 linii, 1 127 słów
Podgląd SKILL.md
---
name: protocol-review
description: "Review a swarm-routing protocol or tool change against the org's golden rules before a pull request or during review: licence headers per directory, the core/ include boundary, versioned wire formats, no module named core, determinism, paired comparisons, bounded structures, pinned CI, nothing shipped depending on .claude/, plus the repository's own rules. Use whenever a diff touches core/, ns3/, model/, a wire format, a CMakeLists, a workflow or a benchmark claim in any org repository (ARA, BeeAdHoc, Termite, HOPNET, ns3-swarm-core, ns3-tools), when asked to review a PR there, or before pushing one. Script first: check_invariants.py does the mechanical rules; you judge the rest."
license: MIT OR GPL-2.0-only
compatibility: Needs git, python3 and network access to github.com (scripts/check-invariants clones swarm-routing/.github tools/protocol-review).
metadata:
  author: swarm-routing
  repository: https://github.com/swarm-routing/skills
---

# protocol-review

Every org repository carries the same nine golden rules (AGENTS.md, rules 1–9)
plus its own (10 onwards). The cheap ones are checked by a script; the ones
that need judgement are yours. Run the script first, so your attention goes
to what it cannot see.

```bash
SKILL="${CLAUDE_PLUGIN_ROOT}/skills/protocol-review"   # as the Claude Code plugin
# installed with skills.sh (npx skills add): SKILL=<the directory this SKILL.md is in>
"$SKILL"/scripts/check-invariants . --base origin/main   # in the repo under review
"$SKILL"/scripts/check-invariants . --base origin/main --pr-body PR.md   # once the PR text exists, saved as PR.md
```

`--pr-body` takes a file that exists (the script stops otherwise): leave it
out until the PR text is written.

Inside a `swarm-routing/.github` checkout, `python3 -I
tools/protocol-review/check_invariants.py <repo>` is the same;
`ORG_TOOLS_DIR=<checkout>` points the wrapper at a local one.

## 1. Run the mechanical checks

The script prints one line per rule it could check, `PASS`, `WARN` or
`FAIL`, with the files or lines under it, and exits 1 only on a FAIL:

| Rule | Checked | Level |
|---|---|---|
| 1 licensing | each changed source file's SPDX against its directory (`dual` in `.github/org-sync.toml`); a new top-level directory without a `LICENSING.md` row | FAIL; WARN |
| 2 licence boundary | `core/` includes only the standard library and `core/` headers | FAIL |
| 3 wire formats | a wire file changed without the version constant in the diff | WARN |
| 4 module name | a contrib module named `core` | FAIL |
| 5 determinism | libc `rand`, `time(nullptr)` or a wall clock (FAIL in `core/`, WARN elsewhere); an unordered container in `core/` (WARN) | FAIL / WARN |
| 8 CI hygiene | an action not pinned by full SHA with `# vX.Y.Z`; `retention-days` over 7 | FAIL |
| 9 `.claude/` | a shipped file calling a `.claude/` script | FAIL |
| tests | `core/` logic changed, no core test changed | WARN |
| 6 comparisons | a changed Markdown line or the `--pr-body` text claiming a comparison with fewer than 20 seeds, or none | HINT |
| 7 bounded | a container added under `core/` or a simulator directory that grows in the diff with nothing bounding it in sight | HINT |

A repository sets its paths in a `[review]` table of `.github/org-sync.toml`
(`core`, `core_tests`, `wire`, `wire_version`, `sim_dirs`). If the wire rule
says `set review.wire_version`, the repo has a wire format and no config yet:
say so in the review rather than guessing the file names.

**A FAIL is fixed in the code, never by weakening the script or the config.**
A WARN is confirmed or explained in the PR body, one line each.

## 2. Judge what the script cannot

Start from the HINT lines: each names a file and line where rule 6 or 7 may
be broken. A HINT never fails the run and is not a finding by itself. Judge
every item under it, not the group: confirm each (a blocking finding) or
dismiss it with a reason in one line. The text output lists 12 items per rule
and ends with `… and N more` when there are others; then run again with
`--json`, which lists them all. Then read the
rest of the diff for these; each needs a sentence in the review, even when the
answer is "not touched":

- **Rule 3, the rest of it.** A new or changed control header is a POD with a
  leading version byte, little-endian bounds-checked readers and writers, and a
  roundtrip *and* a fuzz test in the same PR. A changed field or unit bumps the
  version even if the size is the same.
- **Rule 5, the rest of it.** Randomness reaches `core/` only through the
  injected RNG port, time through the clock port. Ordering that reaches an
  output (a trace, a marker line, a decision) never depends on an unordered
  container or a pointer value.
- **Rule 6, comparisons.** Any number in the PR (body, docs, a commit
  message) that compares protocols comes from per-seed paired deltas over at
  least 20 seeds, from the canonical marker lines, with the run linked. A
  comparator arm's number counts only after its three gates (fidelity sheet,
  delivery smoke, anchor). Five seeds, unpaired means or a claim without a run
  is a blocking finding.
- **Rule 7, bounded structures.** Every new container that grows with traffic
  (histories, visited paths, dedup sets, queues, pheromone tables) has a
  configured cap, and the cap has a test or a Parameters row. `push_back` in a
  receive path with no eviction is the usual miss.
- **Rule 2, the other direction.** A dual-licensed script imports no GPL-only
  code; code taken from AntHocNet keeps its licence and records its
  provenance; nothing is copied from ns-3's `src/aodv` or `src/olsr`.
- **Sources.** `docs/references.bib` is the repository's one bibliography.
  A source added to or dropped from `docs/fidelity.md` as the one the
  protocol implements is also added to or dropped from the bib (role
  `implemented`; the entry is the output of `fidelity.py bib entry <DOI>
  --key K --role implemented`, never typed, and a work with no DOI gives its
  publisher's or institution's `url`), and the same PR regenerates what is
  rendered from it: `fidelity.py bib sources .` (the sheet's Sources table)
  and, where `.github/org-sync.toml` has `citation = true`, `org_sync.py
  apply` (the README's citing list) and the CITATION.cff update
  (`org_sync.py reseed CITATION.cff`, unless `org_sync.py seeds` shows
  hand-added fields). Without `citation = true` org-sync renders neither:
  expect only CITATION.cff's `references:` block to change (the
  `references` skill has that case), not the README. `fidelity.py bib check .` (in `swarm-routing/.github`
  `tools/fidelity/`) is the mechanical part: every `[KEY]` the sheet cites
  is an entry, each entry has a `doi` or `url` and a role, and the Sources
  table is the bib's; a finding there is blocking. Whether the entries are
  the works the code really follows is yours to judge. The `references`
  skill is the whole procedure.
- **The repository's own rules (10 onwards).** Read them in its AGENTS.md:
  protocol repos require the fidelity sheet before `core/`, pre-registered
  interpretations, written-fresh `core/` code; ns3-tools requires
  non-intrusive probes and append-only marker lines.

## 3. Report

One short block, in the PR body or as the review:

```
check_invariants: <last line, e.g. "WARN  review the warnings above">
- rule 3: <WARN explained, or "wire header v2 → v3, roundtrip + fuzz in test/">
- rule 6: <the claim, its seeds and run, or "no comparison claimed">
- rule 7: <each new growing container and its cap, or "none added">
- repo rules: <which ones applied and how they hold>
blocking: <each finding that must be fixed, or "none">
```

Name a finding by file and line. Do not approve or merge: the review states
findings; the maintainer decides.
Pliki w paczce (49)
  • SKILL.md 8 KB
  • evals/ci-wire/case.yaml 1 KB
  • evals/ci-wire/place-files.sh 1 KB
  • evals/ci-wire/prompt.md 1 KB
  • evals/ci-wire/files/base/AGENTS.md 1 KB
  • evals/ci-wire/files/base/LICENSING.md 1 KB
  • evals/ci-wire/files/base/.github/org-sync.toml 1 KB
  • evals/ci-wire/files/base/core/wire.h 1 KB
  • evals/ci-wire/files/base/core/tests/test_wire.cc 1 KB
  • evals/ci-wire/files/change/.github/workflows/ci.yml 1 KB
  • evals/ci-wire/files/change/core/wire.h 1 KB
  • evals/ci-wire/graders/01.md 1 KB
  • evals/ci-wire/graders/02.md 1 KB
  • evals/ci-wire/graders/03.md 1 KB
  • evals/ci-wire/graders/04.md 1 KB
  • evals/clean-script-judgement/case.yaml 1 KB
  • evals/clean-script-judgement/place-files.sh 1 KB
  • evals/clean-script-judgement/prompt.md 1 KB
  • evals/clean-script-judgement/files/base/AGENTS.md 1 KB
  • evals/clean-script-judgement/files/base/LICENSING.md 1 KB
  • evals/clean-script-judgement/files/base/.github/org-sync.toml 1 KB
  • evals/clean-script-judgement/files/base/core/forager.cc 1 KB
  • evals/clean-script-judgement/files/base/core/forager.h 1 KB
  • evals/clean-script-judgement/files/base/core/tests/test_forager.cc 1 KB
  • evals/clean-script-judgement/files/change/PR.md 1 KB
  • evals/clean-script-judgement/files/change/core/forager.cc 1 KB
  • evals/clean-script-judgement/files/change/core/forager.h 1 KB
  • evals/clean-script-judgement/files/change/core/tests/test_forager.cc 1 KB
  • evals/clean-script-judgement/graders/01.md 1 KB
  • evals/clean-script-judgement/graders/02.md 1 KB
  • evals/clean-script-judgement/graders/03.md 1 KB
  • evals/clean-script-judgement/graders/04.md 1 KB
  • evals/clean-script-judgement/graders/05.md 1 KB
  • evals/core-rand-include/case.yaml 1 KB
  • evals/core-rand-include/place-files.sh 1 KB
  • evals/core-rand-include/prompt.md 1 KB
  • evals/core-rand-include/files/base/AGENTS.md 1 KB
  • evals/core-rand-include/files/base/LICENSING.md 1 KB
  • evals/core-rand-include/files/base/.github/org-sync.toml 1 KB
  • evals/core-rand-include/files/base/core/router.cc 1 KB
  • evals/core-rand-include/files/base/core/router.h 1 KB
  • evals/core-rand-include/files/base/core/tests/test_router.cc 1 KB
  • evals/core-rand-include/files/change/core/router.cc 1 KB
  • evals/core-rand-include/graders/01.md 1 KB
  • evals/core-rand-include/graders/02.md 1 KB
  • evals/core-rand-include/graders/03.md 1 KB
  • evals/core-rand-include/graders/04.md 1 KB
  • evals/core-rand-include/graders/05.sh 1 KB
  • scripts/check-invariants 4 KB

Wersje

W bazie nie ma innych skilli o nazwie protocol-review.

Migawka bazy z 13.11.2026 · wersja paczki a7b05b07bc7b (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100fidelity-sheet
    Pisze arkusz wierności protokołu w docs/fidelity.md, mapując mechanizmy i parametry na sekcje artykułu i sprawdza go skryptem.
  • 90review
    Przegląda pull request lub diff w tym repozytorium według standardów projektu i przygotowuje uwagi do przeglądu.
  • 100docs-review
    Doprowadza README, pliki AGENTS.md, CLAUDE.md i CONTEXT.md oraz docs repozytorium z routingiem roju do standardu AntHocNet.
  • 100review-changes
    Sprawdza bieżący diff przed commitem, pushem lub pull requestem względem instrukcji projektu, ADR-ów i istniejącego CI.
  • 100review
    Przegląda zmiany z wykorzystaniem indeksowanego wyszukiwania Baz i wytycznych organizacji, sprawdzając je względem innych repozytoriów firmy.
  • 100review-change
    Robi niezależny przegląd zmiany względem zadania, od kontekstu biznesowego po ślad reguł w kodzie i testach, z werdyktem przed pull requestem.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.