Before you start
- Read the root
README.mdand the relevantdocs/design and check notes. - Search for existing facades, DTOs, reducers, and platform adapters before you decide you need a new abstraction.
- Preserve existing uncommitted changes in the working tree; do not overwrite other people’s files.
Implementation principles
- Keep
DesktopRuntimeas the single authoritative state owner. - Expose new capabilities through
BackendFacadeso they work for both the embedded runtime and a paired remote runtime. - Have clients reach capabilities through the shared backend and Remote v2 contracts, without duplicating business state.
- Use structured errors, capabilities, and sequence numbers; do not infer success from UI copy.
- Check and audit permissions for file, Git, terminal, provider, and device operations.
- Redact logs, test evidence, and diagnostics; never write keys, prompts, file contents, or terminal bytes into them.
Pre-submit checks
pnpm check:acp, pnpm check:code-workbench, pnpm check:terminal, and pnpm check:all do not exist — use the real scripts in the table above. See Build and test for the full list.Documentation and evidence
User-visible behavior must update the Simplified Chinese, Traditional Chinese, and English pages together. Mark implementation details you cannot confirm withTODO, and do not document a feature that exists only in a code path but is unreachable for users — if an entry point is not open yet, do not mention it in the documentation.
Explain behavior with written steps, state tables, protocol fields, and redacted diagnostic records; do not require visual captures, and do not submit workspace contents as evidence.
Documentation site maintenance
- The version number lives in
snippets/release.mdx. Do not hard-code a version in a page. When you publish a release, change only that file. - Download and release links point to the GitHub Releases
latestpage, which resolves to the newest version automatically. - User interface copy is defined by
apps/desktop/src/locale.rs; keep documentation wording consistent with it.