Dev Workflow
git clone https://github.com/cuongtranba/kannacd kannabun installRun the dev server
Section titled “Run the dev server”bun run devThis starts two processes: the Vite client on :5174 and the server on
:5175 (always the client port + 1). Open the client port —
localhost:5174 — for HMR. --port changes the client
port and the server follows.
bun run dev also sets KANNA_RUNTIME_PROFILE=dev, so it reads and writes
~/.kanna-dev instead of ~/.kanna. Your real chats are never at risk from a
dev run.
Two other shapes worth knowing:
bun run start # single process on :3210, production shapebun run install:dev # build, then install this tree globally as the `kanna` CLIWork in a git worktree
Section titled “Work in a git worktree”Long-running changes belong in a worktree, so they are isolated from the main checkout and from every other in-flight change:
git worktree add -b feat/<topic> .worktrees/<topic> origin/maincd .worktrees/<topic>This repo routinely has a dozen or more live worktrees; that is why the architecture budget uses ceilings rather than exact line pins.
Fast test iteration
Section titled “Fast test iteration”bun run test src/server/<file>.test.tsNever bare bun test — see Lint & Tests.
Before you push
Section titled “Before you push”bun run check # typecheck → lint → build:client → check:bundlebun run testThose two are the minimum. The full gate list is in Lint & Tests.
C3 docs
Section titled “C3 docs”Before changing component boundaries, run /c3 query <topic>. After, run
/c3 change to keep .c3/ in sync — code-doc drift blocks a merge. See
Architecture.