Krillswitch is OpenClaw's self-hosted feature flag service. It combines a Cloudflare Worker and D1-backed control plane with framework-neutral evaluation, typed SDKs, and an operator dashboard.
Keep public evaluation independent from dashboard authentication. Treat flag evaluation, SDK exports, migrations, and deployment workflows as compatibility and security boundaries.
- GitHub:
https://github.com/openclaw/krillswitch - Documentation:
https://krillswitch.com - Default branch:
main - Runtime: Node.js
>=22.22.0 - Package manager:
pnpm; use the version declared by the repository - Human contribution guide:
CONTRIBUTING.md - Security policy:
SECURITY.md
Read the nearest scoped AGENTS.md before changing files below this directory.
Edit AGENTS.md directly; do not add CLAUDE.md aliases.
apps/apiowns the Worker, D1 schema, public evaluation, admin API, and authentication.apps/adminowns the dashboard SPA. It must not become a prerequisite for public evaluation.packages/corestays framework-neutral and performs no I/O.packages/reactowns React bindings and server evaluation helpers.packages/cliis private until a separate public package contract is explicitly approved.- D1 migrations, auth changes, token handling, and deployment configuration are security-sensitive. Preserve existing production data and access boundaries.
- SDK export maps, evaluation order, wire types, and package versions are public compatibility surfaces. Core and React SDK releases move in lockstep.
Install dependencies and use repository scripts:
pnpm install
pnpm lint
pnpm typecheck
pnpm test
pnpm docs:build
pnpm verify:sdk-packagesRun the smallest relevant command while iterating. Validate Worker behavior with Wrangler's local mode unless live deployment proof is explicitly required.
- Keep changes focused and add tests for behavior changes.
- Add an
Unreleasedchangelog entry for user-visible, compatibility, security, deployment, or release changes. - Do not edit generated output or dependency lockfiles by hand.
- Do not add JSON or text state stores where D1 or an existing database owns the state.
- Never commit credentials, private paths, private hosts, customer data, or unredacted logs.
- Use conventional commit and pull request titles such as
fix(eval): preserve boolean defaults.
- Run
python3 "$HOME/.agents/skills/autoreview/scripts/autoreview" --max-priority P3for non-trivial changes. - Verify accepted findings against source, tests, and operator-visible behavior.
- Application releases use
vX.Y.Ztags. - SDK releases use
sdk-vX.Y.Ztags frommainand publish only@openclaw/krillswitch-coreand@openclaw/krillswitch-reactthrough.github/workflows/npm-release.yml. - Never publish locally or add long-lived npm tokens to repository settings.
Use --max-priority P3 with the shared autoreview helper to preserve this
repository's existing P0–P3 review gate. Follow the
shared skill setup before running it.