| name | kalamdb |
| description | KalamDB router skill — open ONE targeted reference after routing. Covers CLI (kalam init/dev), Rust/Dart/TypeScript SDKs, SQL, auth, ops, PG extension. Use for KalamDB contributor or app integration work. |
| license | Apache-2.0 |
| compatibility | codex, claude-code, opencode, agent-skills |
| metadata | {"repo":"KalamDB","audience":"contributors","scope":"router"} |
KalamDB
Router only. Do not preload all references.
Token Discipline
- Read this file first.
- Open one reference from the task table.
- Open a second file only when the task clearly spans areas (e.g. init + Dart SDK).
- For method signatures and flags, open the listed
*-api.md file — not the whole SDK tree.
- Open one example file when you need copy-paste patterns.
- Full file list: references/INDEX.md (use only when unsure).
Working Rules
- Prefer owning crate/abstraction; follow storage boundaries and
TableId conventions.
- No SQL rewrite passes in hot paths.
- Update this skill when user-facing CLI, SQL, SDK, or runbook behavior changes.
- Template-first: for new apps, pick the closest
kalam init --template scaffold and extend it — do not build equivalent boilerplate from scratch when a template exists. Catalog: cli-templates.md.
- Schema-first: for app work, edit
schema.sql before writing app/domain code, run generation, and treat generated SDK/ORM types as source of truth. Do not hand-write duplicate row models first.
- AI assistant chat: always include visible thinking/typing and frontend token streaming. Use direct
CREATE USER TABLE for conversation/message rows, direct CREATE STREAM TABLE for token rows, and a topic/source from user message inserts for the agent. Do not add an app users table or fake user_id tenancy columns for authenticated USER-table data; KalamDB auth already supplies the user identity.
Task Router
Quick Commands
cd backend && cargo run --bin kalamdb-server
cd cli && cargo build --release && cargo test --test smoke
cargo nextest run
New app: pick a template → kalam init --template <id> → kalam dev. Extend the scaffold; avoid rebuilding from scratch.
Repo-Local Deep Skills
For internals after routing: mvcc, raft, datafusion, rust-skills in the main KalamDB repo.