cw-gates
БесплатноБез исполняемых скриптовНе проверенUse before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the…
от codewhale-hq★ 41 217 звёзд на GitHubОб этом скилле
cw-gates
Pick the smallest evidence that answers the actual risk, then quote the real output. This repo has been burned twice by the alternative: an exit code mistaken for a pass, and a harness whose scoring line silently reported unevaluated rows as green. Assertions without command output are not evidence.
Stage 3 of the loop: cw-orient → cw-slice → gates → cw-dogfood → cw-land → cw-handoff.
When to use
- Before saying "done", "green", "passing", "fixed", or "ready to land".
- Before a dogfood build — never install an ungated binary.
- When asked to "run the gates" or to prove a change is safe.
For release work, follow docs/RELEASE_CHECKLIST.md; it adds the
version-drift gate and the exhaustive release validation on top of this ladder,
and cw-dogfood owns the manual TUI QA targets.
Workflow
Climb only as far as the risk requires. Say where you stopped and what you skipped.
Native Rust builds go through scripts/dev-test.sh or scripts/dev-cargo.sh,
which take the machine's build slot (scripts/build-lock.py; at most two
native builds per machine). Raw cargo bypasses the lock.
Rung 1 — always, and cheap
cargo fmt --all -- --check
git diff --check
Rung 2 — the area that owns the change
scripts/dev-test.sh maps an area or a source path to the fastest correct
invocation, and applies the isolated build-dir topology
(docs/BUILD_PERFORMANCE.md):
scripts/dev-test.sh --list
scripts/dev-test.sh crates/command-contract/src/elapsed.rs # path → area + filter
scripts/dev-test.sh tui tools:: # area + filter
scripts/dev-test.sh config
It uses cargo nextest run when nextest is on PATH (.config/nextest.toml);
CODEWHALE_DEV_NEXTEST=0 forces libtest. For the TUI crate, --lib and
--tests are disjoint — choose the target that owns the behavior rather than
running both by reflex.
scripts/dev-cargo.sh test --no-run answers a compile question without executing unrelated
cases. cargo test --doc covers doc examples, and is only worth running when
those examples changed.
CI builds with -D warnings, so a deleted last caller (an unused import, a
variant or helper nothing constructs) is a red main even though a plain
build only warns. After removing or rewiring a call site, check the library
the way CI does before you push:
RUSTFLAGS="-D warnings" scripts/dev-cargo.sh check -p <crate> --lib --locked
Changing RUSTFLAGS rebuilds every dependency, so keep that value for the
whole session. The test-only half of an unused item is invisible to this
check; use --tests as well when you touched helpers that tests still call.
Rung 3 — the budgets and drift checks CI enforces
Run the ones your change can move. Each fails the build in CI:
python3 scripts/check-dead-code-budget.py # #[allow(dead_code)] ceiling
python3 scripts/check-runtime-contract-budget.py
python3 scripts/check-persistence-backlog-budget.py
python3 scripts/check-provider-registry.py # provider registry drift
python3 scripts/check-command-crate-boundaries.py # command-contract boundary
python3 scripts/check-command-migration-manifest.py
python3 scripts/check-tui-locale-parity.py # touched crates/localization/locales/
sh scripts/check-tui-product-vocabulary.sh
python3 scripts/check-readme-translations.py # touched README*.md
./scripts/release/check-versions.sh # touched a version anywhere
The dead-code budget may go down freely; raising it needs a reviewer to be
told why. Lock in a win with python3 scripts/check-dead-code-budget.py --update.
Rung 4 — cross-cutting or release risk only
scripts/dev-cargo.sh clippy --workspace --all-targets --all-features --locked -- \
-D warnings \
-A clippy::uninlined_format_args \
-A clippy::too_many_arguments \
-A clippy::unnecessary_map_or
scripts/dev-cargo.sh nextest run --workspace --all-features --locked --profile ci
scripts/dev-cargo.sh test --workspace --all-features --locked --doc
git diff --exit-code -- Cargo.lock # lockfile drift guard
--all-targets matters: without it, clippy never lints test code. (CI runs
the all-targets form since the v0.9.10 gate incident; run the same form
locally so there is no weaker subset.)
Rung 5 — website, when web/ changed
npm test && npm run check:web
Rung 6 — hosted CI on the exact SHA
Hosted CI has no budget, and every push to main runs the full ci.yml.
Before landing, push the slice to a ci/<task> branch, dispatch ci.yml with
expected_sha set to the full 40-character commit, and wait for it to finish.
Repair what it finds. Local checks and a green hosted run on the same SHA are
separate evidence; report both and never use [skip ci].
Claiming a test passed
AGENTS.md ("Cl
Установить cw-gates в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл cw-gates?
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
Как установить скилл cw-gates?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cw-gates запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic