Configure or diagnose Account Pooler accounts, authentication, quota routing, and failover through bb pool.
日本語の概要は準備中です。原文の説明を表示しています。
Gate new or changed tests, and audit existing tests for low value, implementation coupling, duplication, and the test-only production seams they keep alive. Use when writing, changing, reviewing, or sweeping tests.
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Three modes, one value bar. Authoring mode gates every new or changed test at write time. Audit mode runs focused sweeps of tests that re-assert source, duplicate stronger proof, couple behavior to implementation, or keep test-only production seams alive. Continue broad audits as separate coherent follow-up PRs; optimize for confidence, not deletion count. Campaign mode prunes one whole subsystem's test surface (every test file a plugin, app, or package owns); before starting one, read CAMPAIGN.md.
Before adding any test, answer four questions; a missing answer means do not add it yet:
Then check the test against every junk pattern; a match fails the gate unless the retention bar names the contract it independently guards. A test that would break under behavior-preserving refactoring is asserting implementation, not behavior; rewrite it at the owning boundary before landing it.
Bug regression tests must fail on the pre-fix code for the intended reason and pass after the owner-boundary repair. A regression test that never demonstrably failed proves the mock, not the fix. One regression at the owner boundary covers the bug; do not replay the same scenario at every layer it crosses.
bb test rules: never mock the database; use createConnection(":memory:")
and migrate(db) from @bb/db. Vitest projects come from
sharedWorkerProjects in vitest.shared.ts: Node test files share workers
(isolate: false), and files that use vi.mock, vi.stubGlobal, fake timers,
process.env writes, or global assignments are isolated automatically.
Restore any other global state a test changes. Tests follow the no-comments
rule.
The shared checklist for both modes: the authoring gate rejects a new test that matches one, and audits hunt for existing tests that do.
bb stub or
fake provider that never loads the real plugin entry, bridge, or extension;Tests justify their maintenance cost by protecting behavior, a credible regression, or an independently meaningful contract. In an audit, an existing test that must change for behavior-preserving source reorganization is suspect, not automatically deletable; the authoring gate still rejects new ones.
Before judging a candidate, read the complete test and production owner, its
entry point, callers, callees, sibling implementations, overlapping tests, CI
routing (turbo.json task inputs and .github/workflows/ci.yml shards), and
relevant history. Read AGENTS.md first. When the test claims
dependency-backed behavior, inspect the dependency source or types directly.
Keep discovery read-only and report evidence before editing. For broad scope, run parallel discovery lanes when available:
apps/app (the largest suite), apps/web, apps/mobile,
apps/desktop, packages/thread-view, packages/client-core;apps/server, packages/db, packages/domain;apps/host-daemon, packages/agent-runtime,
packages/provider-bridge-*, packages/host-*;plugins/ (built-in and provider-* plugins),
packages/plugin-sdk, packages/plugin-build;apps/cli, packages/sdk, packages/scripts,
packages/bb-app, tests/integration;Outside campaign mode, prefer a few high-confidence candidates over a large speculative inventory. Hunt for the junk patterns.
Keep a test when it independently enforces a public API, Plugin SDK, protocol,
config, migration, storage, security, platform, default, prompt-byte, generated
cross-language, package, release, or architecture contract. In bb that
includes server/daemon wire shapes behind HOST_DAEMON_PROTOCOL_VERSION
(packages/host-daemon-contract/src/protocol.ts) and Plugin Guide surfaces and
anchors (plugins/plugin-api-docs/src/surfaces.ts, anatomy-manifest.json).
Also keep:
Static or slow is not a deletion reason. A test that resembles implementation may still be the independent contract; prove otherwise before removing it.
An unprefixed export of a published @get-bb/plugin-sdk subpath is public API,
not a test-only seam, even with zero in-repo consumers. Removing one needs an
entry under "Scheduled removals (next major)" in docs/api_to_audit.md.
Provider event shapes and timeline rows are owned by the recorded parity
conformance (packages/provider-parity, recordings in
packages/provider-bridge-protocol/recordings/) and the provider corpus gates
(apps/server/test/provider-corpus/). A plugin test that replays a recorded
case is a candidate; one covering a case recordings cannot capture is not.
Record every field below before editing. A missing field means the candidate is not ready for deletion:
Choose one coherent owner-boundary batch. Delete obsolete test-only exports, globals, wrappers, and dead production paths instead of preserving aliases. Move retained regressions to their canonical owners. Consolidate repeated package or dependency assertions into one generic contract.
Prefer net-negative production LOC. Do not add replacement tests that restate
the same implementation, and do not convert uncertain candidates into cleanup
to increase deletion counts. Generated modules (packages/templates/src/generated/,
packages/plugin-build/src/generated/, packages/plugin-sdk/bundled-types/)
are gitignored; never commit them or add a --check mode to guard them.
Never edit source or tests while Vitest is running in the checkout. Never run
git checkout <rev> -- . for a baseline in a checkout with uncommitted edits;
it overwrites them. Commit a WIP first, then compare through
git worktree add --detach <dir> <rev> or git show <rev>:<path>.
--
go to vitest run; paths are relative to the package directory. Plugin
packages are named bb-plugin-<id>. Pipe slow output to a file:
pnpm exec turbo run test --filter=@bb/server -- test/<file>.test.ts -t "<name>" > /tmp/test.log 2>&1.turbo run test skips some suites; when a touched test or its owner
belongs to one, run it too (list them with
rg -n '^\s*"(@bb/[a-z-]+#)?(test|smoke)[a-z:_-]*"\s*:' turbo.json).
Suites that need credentials must still pass setup and discovery; see
docs/debugging-and-qa.md for corpus and parity inputs.
packages/agent-runtime/src/integration*.test.ts:
pnpm exec turbo run test:integration --filter=@bb/agent-runtime;tests/integration/real/:
pnpm exec turbo run test:integration --filter=@bb/integration-tests;apps/server/test/provider-corpus/ (skips without BB_PROVIDER_CORPUS_DIR):
pnpm exec turbo run test:provider-corpus --filter=@bb/server;pnpm parity --old <before-worktree> --new .;pnpm exec turbo run smoke:tarball --filter=bb-app, and the
@bb/desktop smoke:* tasks.pnpm exec oxfmt <changed-paths>, then
pnpm exec turbo run lint typecheck --filter=<pkg>, then git diff --check.apps/server/test/internal/internal-skill-trees.test.ts
fails under umask 0002, and apps/host-daemon/src/command-discovery.test.ts
and plugins/provider-acp/src/native-roots/native-roots.test.ts fail when
/tmp/.agents or ~/.agents exists. Turbo drops TMPDIR, so after a Turbo
run has built dependencies, rerun those with
TMPDIR=/var/tmp/<dir> pnpm --filter <pkg> exec vitest run --config vitest.config.ts <file>.--concurrency=1 when the machine is loaded.git diff --numstat; report production/tooling separately from
tests and test support.docs/CODE_REVIEW.md
(for example with /code-review) and run the deslop skill.Commit, push, open a PR, or land only when authorized. Fill
.github/PULL_REQUEST_TEMPLATE.md and end the body with > AGENT GENERATED.
Use the close-out skill to land when it is available. Land one coherent PR
at a time; after landing, refresh from current main and rerun read-only
discovery for the next high-confidence batch.
Report:
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configure or diagnose Account Pooler accounts, authentication, quota routing, and failover through bb pool.
日本語の概要は準備中です。原文の説明を表示しています。
Configure or troubleshoot ACP agent discovery, custom models, skills, and compaction in BB.
日本語の概要は準備中です。原文の説明を表示しています。
Approve a GitHub contributor to open PRs in get-bb/bb, then land the allowlist change with SlopCop and CI skipped. Use for requests such as "add @username to be able to open PRs" or an explicit add-contributor invocation.
日本語の概要は準備中です。原文の説明を表示しています。
Create or edit element annotations in desktop Browser tabs, or update saved annotation comments through the plugin RPC.
日本語の概要は準備中です。原文の説明を表示しています。
Schedule or manage recurring and one-shot BB agent or script automations.
日本語の概要は準備中です。原文の説明を表示しています。
Sign this bb in to or out of its getbb.app account with bb account, and check which account remote access and hosted services use.
日本語の概要は準備中です。原文の説明を表示しています。