Next.js 16 + Tauri desktop code editor. Static export (output: 'export'), Turbopack dev.
- Package manager: pnpm (never npm)
- Repo:
~/Documents/GitHub/OpenKnots/code-editor - Stack: Next.js, Tailwind CSS v4, TypeScript strict, Tauri v2
- Build check:
pnpm buildmust pass with zero TS errors before committing
This project uses gitquick for fast git operations.
gq save "commit message" # git add -A && git commit -m "message" && git push
gq sync # git pull --rebase && git push
gq clean # delete local branches already merged into main/mastergq save "msg"— After completing a feature, fix, or logical unit of work. Stages everything, commits, and pushes in one shot. Default message is "update" if omitted.gq sync— Before starting new work or when you need to pull latest changes. Rebases local commits on top of remote, then pushes.gq clean— After PRs are merged. Removes stale local branches that have been merged into main/master.
- Always run
pnpm build(or at minimumnpx tsc --noEmit) beforegq saveto catch type errors - Write meaningful commit messages — not just "update"
- If there are merge conflicts during
gq sync, resolve them before continuing
- Skill-first policy is required: run
/skill <query>before creating a new skill. - New skill creation is blocked by default unless a recent skill probe exists.
- Explicit override token for audited bypass only:
--allow-new-skill.
- All colors use CSS theme variables (
var(--brand),var(--brand-contrast), etc.) — never hardcodetext-whiteon brand elements - Tauri desktop: use
data-tauri-drag-regionfor window drag,tauri-no-dragclass to exclude interactive elements - Components go in
components/, views incomponents/views/, contexts incontext/ - Prefer
useCallbackanduseMemofor performance in large components - Use
@iconify/reactIconcomponent for all icons (Lucide set)
- Theme system: CSS custom properties via
data-themeon<html>, presets incontext/theme-context.tsx, all CSS inapp/globals.css - Gateway comms: WebSocket to
ws://127.0.0.1:18789, JSON RPC viamakeRequest()inlib/gateway.ts - Local filesystem: Tauri commands in
src-tauri/src/local_fs.rs, exposed viacontext/local-context.tsx - Terminal: Max 3 tabs, managed in
components/terminal-panel.tsx - Agent chat: Per-chat session keys
agent:main:code-editor:{chatId.slice(0,8)}, lazy init on first message