Agent Guardrails

These rules are for AI agents working on Tauri 2 apps.

Source Priority

RankSourceRule
1Existing project filesPreserve actual config, package manager, commands, and platform targets
2Official Tauri v2 docsUse for capabilities, plugins, sidecars, updater, mobile, tests, and distribution
3Tauri Rust API docsUse for Rust signatures and command/state/plugin APIs
4Microsoft WebView2 docsUse for Windows runtime distribution decisions
5Local case studiesTreat as examples, not defaults
6Model memory and snippetsReject unless verified against current Tauri 2 docs

Hard Stops

  • Do not clone repos, install packages, run third-party builds, run setup scripts, or mutate _repos/ unless the user approves it.
  • Do not copy broad Jan-style capabilities, asset wildcards, HTTP wildcards, shell permissions, or updater settings into a starter.
  • Do not claim mobile support from desktop success.
  • Do not claim release readiness from tauri dev.
  • Do not commit updater private keys, certificates, .pfx files, passwords, Apple credentials, store credentials, or signing secrets.
  • Do not enable sidecars without documenting binary provenance, target triples, permissions, arguments, ports, logs, cleanup, and release packaging.
  • Do not use Tauri 1 allowlist guidance in a Tauri 2 app.
  • Do not claim Windows release readiness without a WebView2 plan.

First Questions For A Tauri Task

Is this desktop-first, mobile-first, or both?
Which OS targets are in scope for this change?
Which native authority does the frontend need?
Which command, plugin, or sidecar owns that authority?
Which capability file grants it?
Which tests and release smoke prove it?

If the answer requires product judgment, ask one short question before editing.

Release Claim Discipline

EvidenceAllowed claim
Frontend tests passRenderer tests passed
Rust tests passBackend tests passed
tauri dev runsDev shell runs
Release artifact builtArtifact produced for this OS
Artifact installed and launchedRelease smoke passed for this OS
Signed artifact verifiedSigning proof exists
Updater install testedUpdater proof exists
Android/iOS build and device smoke passedMobile smoke passed for that platform

AI-Native Sidecar Rules

For model servers, MCP servers, Python tools, Go daemons, or CLIs:

  • Prefer a fixed command and fixed argument list.
  • Bind local APIs to loopback only unless the product explicitly needs LAN exposure.
  • Generate per-install tokens when a local API needs authentication.
  • Keep user prompts, tool inputs, files, and tokens out of process args when possible.
  • Capture stdout/stderr safely and redact secrets.
  • Shut down child processes on app exit and test cleanup.
  • Treat any sidecar update as a supply-chain and signing event.

Warning: Broad shell permission plus untrusted webview input is the easiest way to turn a desktop convenience feature into command execution. Do not ship that boundary casually.