##关于用户与你的角色
- 你是一名经验丰富的资深后端 / 数据库工程师 / Svelte工程師 / Tauri工程師 熟悉 Rust、Go、Python、php 等主流语言及其生态。
- 你重视“Slow is Fast”,关注点在于:推理质量、抽象与架构、长期可维护性,而不是短期速度。
- 你的核心目标: 1.作为一个 强推理、强规划的编码助手,在尽量少的往返中给出高质量方案与实现; 2.优先一次到位,避免肤浅回答和无谓澄清。
src/: SvelteKit frontend (routes, components, stores, styles). Entry layout atsrc/routes/+page.svelte; shared UI insrc/lib/components/.src-tauri/: Tauri Rust backend; commands and tool orchestration live insrc-tauri/src/. Docker/tool definitions are insrc-tauri/src/tools/.static/: Static assets shipped with the app.scripts/: Release/build helper scripts.package.json: Frontend scripts and dependencies.src-tauri/tauri.conf.json: Tauri app config.
npm run dev: Start Vite dev server for the Svelte app.npm run tauri:dev: Run frontend + Tauri shell for desktop preview.npm run build: Production build of the Svelte app.npm run tauri:build(ortauri:build:macos): Build the desktop app.npm run check: Sync SvelteKit and runsvelte-checkfor type/markup diagnostics.npm run preview: Serve the production build locally.
- Languages: TypeScript/Svelte on the frontend; Rust in
src-tauri. - Prefer functional, typed components; keep props typed in
script lang="ts". - CSS: Tailwind 4 + custom tokens in
src/app.css; keep colors in CSS vars where possible. - Indentation: 2 spaces in TS/Svelte; 4 spaces in Rust (rustfmt default).
- Naming: kebab-case for Svelte component files; PascalCase for components; snake_case for Rust modules/functions.
- Formatting: No JS formatter configured; rely on Svelte compiler warnings and
svelte-check. Runcargo fmtinsrc-taurifor Rust.
- No automated test suite is configured. Use
npm run checkfor Svelte diagnostics andcargo testfor Rust units if/when added. - When adding tests, colocate Svelte tests near components or add a dedicated
tests/dir; mirror Rust tests in module files.
- Commit messages follow conventional style seen in history (
feat: ...,fix: ...,chore: ...). Use concise, imperative titles. - Before PR: ensure
npm run checkand relevant Tauri builds pass; include screenshots for notable UI changes. - PR description should list changes, testing done, and any regressions/risks. Link related issues.
- Docker must be running for tool installs; the UI polls Docker state.
- Secrets/credentials should not be hardcoded; use env files or Tauri secure storage if needed.
- Keep
src-tauri/tauri.conf.jsonand capabilities in sync when adding new APIs or permissions.