150+ packages. One graph.
kb-devkit orchestrates the monorepo: topological builds, content-addressable cache, --affected via git diff, health score per preset. We build KB Labs with it every day.
Change one package — only the chain rebuilds.
Dependency graph + topological order + SHA256 content-addressable cache. Same content — 0ms, regardless of package count.
kb-devkit run buildBuild all packages in dependency order. Skips unchanged packages via SHA cache.kb-devkit run build --affectedBuild only changed packages and their downstream dependents.kb-devkit run build --packages @kb-labs/workflow-entryBuild a specific package by name.kb-devkit run build lint testChain multiple tasks in one pass, each in correct dep order.$ kb-devkit run build --affected
Detected 3 changed packages (git strategy)
@kb-labs/core-types ● building [1.4s]
@kb-labs/core-platform ● building [2.1s]
@kb-labs/sdk ● building [3.2s]
@kb-labs/commit-core ● building [0.9s]
@kb-labs/commit-entry ● building [1.3s]
@kb-labs/qa-entry ◌ cached [0ms]
@kb-labs/quality-entry ◌ cached [0ms]
@kb-labs/review-entry ◌ cached [0ms]
Done in 9.4s · 5 built · 113 from cacheHealth score. Checks. Auto-fix.
Static audit of every package by presets: ESLint config, TSConfig, README, engines, exports. Health score 0–100 with A–F grade — degradation is immediately visible per category.
Need custom logic? custom_checks in devkit.yaml — a shell command that receives a JSON package context and returns {"issues": [...]}. License headers, barrel exports, naming conventions — anything.
kb-devkit checkValidate all packages against devkit.yaml rules: naming, tsconfig, eslint, deps.kb-devkit statsWorkspace health score (A–F), issue counts by category, coverage metrics.kb-devkit fixAuto-fix safe violations. Use --dry-run to preview without writing.kb-devkit gateCheck staged files only. Exits with code 1 on violations. For pre-commit hooks.pnpm kb plugins listList all installed plugins with their version and enabled state.$ kb-devkit stats
KB Devkit — Workspace Stats
Health Score 72/100 Grade C
(98 healthy, 12 warning, 8 error of 118 total)
By category
go-binary ████████████ 7/7 Grade A
ts-lib ██████████░░ 77/93 Grade B
ts-app ████████░░░░ 14/18 Grade C
Issues by check
structure 3 errors 8 warnings in 11 packages
package_json 2 errors 4 warnings in 6 packages
eslint 1 error 2 warnings in 3 packages
Coverage (TS packages)
✓ ESLint config 94% (104/111)
✓ TSConfig 98% (109/111)
⚠ README.md 61% (68/111)
⚠ engines field 72% (80/111)
✓ exports field 91% (101/111)What breaks. What to test.
The Impact plugin builds a reverse graph and shows the cascade: direct → dependent → transitive packages. Tests — only what's actually affected. Build plan with the devkit command included.
kb-devkit run build --affectedResolve affected set via git diff + BFS through the dependency graph.pnpm kb impact analyzeShow which packages and tests are affected by current changes.pnpm kb impact reportExport a structured impact report with dependency paths.pnpm kb marketplace plugins refreshForce-invalidate the CLI discovery cache after a build.$ kb impact:check
📦 Package Impact
Direct (1):
@kb-labs/core-types — 3 files changed
Dependent (4):
@kb-labs/core-platform ← core-types
@kb-labs/sdk ← core-platform
@kb-labs/commit-core ← sdk
@kb-labs/commit-entry ← commit-core
🔨 Build Impact (5 packages in order)
1. @kb-labs/core-types
2. @kb-labs/core-platform
3. @kb-labs/sdk
4. @kb-labs/commit-core
5. @kb-labs/commit-entry
→ kb-devkit run build --packages ...
🧪 Test Impact
Must run (2):
@kb-labs/core-types — 2 test files ← changed
@kb-labs/commit-core — 5 test files ← sdkGraph. Cache. Impact. All in one.
kb-devkit ships with the platform. Impact is a separate plugin.
kb marketplace install @kb-labs/impact-entry