|
101 | 101 | - `packages/ragmir-app` is the cross-platform Tauri desktop/mobile shell. Root `pnpm build` validates |
102 | 102 | the frontend bundle only; native `tauri build`, `tauri ios *`, and `tauri android *` commands stay |
103 | 103 | explicit and are not part of npm release validation. |
| 104 | +- Desktop app config editing should use structured shadcn-style controls from |
| 105 | + `@jcode.labs/ragmir-ui`. JSON remains the `.ragmir/config.json` file format, not the primary app |
| 106 | + editing experience. |
| 107 | +- For Tauri app file and folder pickers triggered from the UI, prefer the official |
| 108 | + `@tauri-apps/plugin-dialog` JavaScript `open(...)` API from the click handler. Do not add Rust |
| 109 | + commands that call `blocking_*` dialog APIs for frontend-triggered picker flows; they can deadlock |
| 110 | + the Tauri event loop and leave app loading state stuck. If a dedicated Rust picker command becomes |
| 111 | + necessary, use the non-blocking `pick_*` callback APIs and validate the real `pnpm dev:app` flow by |
| 112 | + clicking the control, opening the native picker, cancelling it, and confirming the loading state |
| 113 | + clears. |
104 | 114 | - Distribute the Ragmir app through direct downloads and sideloadable installers, not App Store or |
105 | 115 | Play Store flows. Desktop installers and Android APK-style distribution are first-class; iOS stays |
106 | 116 | deferred until a compliant non-store channel is chosen. |
|
153 | 163 | Transformers.js text generation for `rgr chat`; `rgr chat setup` is the explicit one-command |
154 | 164 | preload path for `.ragmir/models/chat`, and normal answers must keep remote model loading disabled |
155 | 165 | unless the user opts into `--allow-remote-models`. |
| 166 | +- In `packages/ragmir-app`, keep model preloads explicit in the Tauri sidecar: setup/prepare flows |
| 167 | + may pass `--allow-remote-models` only for one-time embedding/chat/TTS preload commands, while |
| 168 | + normal chat answers and audio rendering must use offline/local modes after preload. |
| 169 | +- In `packages/ragmir-app`, chat UX must stay non-blocking: append the user message and a pending |
| 170 | + assistant bubble before invoking native chat, show visible thinking/streaming/error states, render |
| 171 | + assistant Markdown, keep recent thread context local and explicit, and run long native CLI work |
| 172 | + through async Tauri commands or `spawn_blocking` so the webview does not freeze. |
| 173 | +- In `packages/ragmir-app`, distinguish Ragmir Chat from external coding agents. Local chat is the |
| 174 | + only fully private in-app conversation path. Codex, Claude, Kimi, OpenCode, Cline, or generic MCP |
| 175 | + modes should be presented as a handoff that generates/copies helper config and prompts for the |
| 176 | + external agent; do not build a fake duplicate chat UI for agents that already have their own chat. |
| 177 | + Always warn that prompts, retrieved snippets, and pasted confidential content may leave the |
| 178 | + machine through cloud agents even though the Ragmir index and MCP server stay local. |
| 179 | +- In `packages/ragmir-app`, chat TTS belongs on assistant messages, not as a vague global export: |
| 180 | + render the selected answer with `rgr audio --offline`, show per-message rendering/playing/error |
| 181 | + states, read generated files through Tauri's scoped asset protocol, and keep TTS preload as an |
| 182 | + explicit non-sensitive setup action. |
| 183 | +- In `packages/ragmir-app`, prepare direct-folder workspaces in bootstrap order: first write or |
| 184 | + repair `.ragmir/config.json` with `sources: ["."]` and the safe `local-hash` provider, then run |
| 185 | + `rgr models pull --enable`, then rebuild with Transformers. Do not set |
| 186 | + `embeddingProvider: "transformers"` before the model preload exists, or `doctor --fix` can ingest |
| 187 | + against a missing local model. |
156 | 188 | - Keep report generation separate from core retrieval. The `ragmir-markdown-report` skill writes cited |
157 | 189 | Markdown reports under ignored `.ragmir/reports/` by default and must distinguish evidence, |
158 | 190 | inference, uncertainty, missing documents, and professional-review items. |
@@ -237,6 +269,11 @@ any other), because several agents may run against this repo in parallel. |
237 | 269 | protected-branch back-merge), name it clearly and delete it once merged. |
238 | 270 | - **Respect other agents' work.** Before editing, run `git status` and check for other running agents |
239 | 271 | or processes; never stage, commit, or discard uncommitted changes you did not make. |
| 272 | +- **Capture durable agent lessons in the repo.** When a bug, review, or user correction reveals a |
| 273 | + repeatable AI-agent trap, update the nearest shared agent instructions in the same task: |
| 274 | + `AGENTS.md` for cross-agent project rules, and `CLAUDE.md` only for Claude Code-specific behavior. |
| 275 | + Keep the entry concise, factual, and tied to a reproducible workflow; do not rely on tool-local |
| 276 | + memory as the only place for team-shared rules. |
240 | 277 |
|
241 | 278 | ## Coding Conventions |
242 | 279 |
|
|
0 commit comments