bench-sync — команда для Claude Code и Codex
Команда bench-sync для Claude Code и Codex, которая запекает ячейки бенчмарка и измеряет текущую версию spec-kit и расширения Companion. Нужна, чтобы отследить, как меняется производительность инструмента при обновлениях.
MIT ★ 110 обновлён 2026-10-19
.claude/commands/bench-sync.mdЧто делает bench-sync
bench-sync готовит набор тестовых ячеек разного размера (easy, medium, hard, oversized) и прогоняет их через spec-kit с расширением Companion. Работает в Claude Code и Codex. Перед запуском нужно собрать расширение командой npm run compile, потом запустить сам скрипт, который загружает последние версии spec-kit из GitHub и Companion из релизов.
Скрипт клонирует приложение conduit для каждой ячейки (рефлинки делают это мгновенным), инициализирует spec-kit через specify init, подготавливает среду для измерения и записывает версии в cells.json. Если клон приложения ещё не на диске, скрипт выведет команду для его создания — это нужно запустить один раз.
Результаты включают версии spec-kit CLI, spec-kit расширения и Companion, так что видно, какие версии измеряли каждый результат. Результаты ячеек хранятся отдельно от основного репозитория.
Какие задачи решает
- запустить бенчмарк для нескольких размеров задач
- отследить версии инструментов в результатах измерений
- измерить производительность при обновлении spec-kit или расширения
- подготовить окружение для тестирования spec-kit на реальном приложении
Примеры запросов агенту
- Запеки ячейки размерами easy, medium, hard с последней версией spec-kit:
node "$SANDBOXES_REPO"/bench/sync-templates.mjs --sizes easy,medium,hard,oversized - Собери расширение перед первым запуском:
npm run compile - Проверь версии инструментов и количество ячеек в результатах
Как установить bench-sync
Вручную: положить файлы
.claude/commands/bench-sync.mdВызов — /bench-sync. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/bench-sync.mdВызов — /prompts:bench-sync. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/bench-sync.prompt.mdВручную: положить файлы
.gemini/commands/bench-sync.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Вопросы о bench-sync
Как установить bench-sync в Claude Code?
Поместите файл команды в .claude/commands/bench-sync.md в корне проекта. В Claude Code команда будет доступна как bench-sync.
Что делает bench-sync?
Команда компилирует расширение Companion, загружает последние версии spec-kit и расширения, затем запускает ячейки бенчмарка разных размеров и записывает версии инструментов в cells.json. Результаты хранятся отдельно от основного репозитория.
Нужно ли мне что-то устанавливать перед запуском?
Перед первым запуском запустите npm run compile для сборки расширения. Если клон приложения conduit отсутствует, скрипт выведет команду для его создания — запустите её один раз на рабочей станции.
Исходный текст
bench-sync.md · MIT
--- allowed-tools: Bash(. .claude/sandboxes-env.sh:*), Bash(node "$SANDBOXES_REPO"/bench/sync-templates.mjs:*), Bash(node "$SANDBOXES_REPO"/bench/run-all.mjs:*), Bash(specify:*), Bash(uv tool:*), Bash(npm run compile:*) description: Install the latest spec-kit + Companion extension and bake the bench cells --- ## Your task Bake the bench cells so a round measures **current** tooling. The harness lives in the `bench/` folder of the sibling [`speckit-sandboxes`](https://github.com/alfredoperez/speckit-sandboxes) repo; the app it measures lives in [`conduit`](https://github.com/alfredoperez/conduit). Nothing it writes lands in this repo. ### Paths Shell state does not persist between Bash calls, so start each one with `. .claude/sandboxes-env.sh`. It sets `$SANDBOXES_REPO`, the sibling `speckit-sandboxes` checkout, whose `bench/` folder is the harness. ### 1. Compile the extension first The driver dispatches the same per-step preamble the GUI does, imported from `dist/ai-providers/promptPreamble.js`. Build it: ```bash npm run compile ``` ### 2. Bake ```bash node "$SANDBOXES_REPO"/bench/sync-templates.mjs --sizes easy,medium,hard,oversized ``` Defaults are `--speckit latest --ext latest`, which is what a measured round wants: - `--speckit latest` installs the spec-kit CLI from GitHub source (`uv tool install specify-cli --from git+https://github.com/github/spec-kit.git --force`) — the only build that carries `specify extension`. `--speckit keep` leaves whatever is installed. - `--ext latest` installs the Companion spec-kit extension from the rolling `companion-latest` release asset. `--ext code` installs from this checkout's `apps/speckit-extension/` with `--dev` (use it to measure unreleased work). `--ext <tag>` pins an archived release. The bake reflinks the app clone per cell (instant, `node_modules` included — no dependency install), runs `specify init`, arms each cell for its arm, tags a git baseline, and **fails loudly if any cell file mentions the bench**. It records the spec-kit CLI version, the spec-kit extension version and the Companion version into `cells.json`, and every result row carries all three. If the app clone is missing, the script prints the one-time clone command. Run it once per laptop. ### 3. Report Print the three versions the bake recorded and confirm the cell count. Say which arm each letter carries only if the user asks — the letters are opaque on purpose, and `node "$SANDBOXES_REPO"/bench/run-all.mjs --dry-run` prints the table when it is wanted.
© alfredoperez · MIT · alfredoperez/speckit-companion