Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.4 KB
Raw Blame

description: "Backend guardrails: how to run Rust tests, migrations, the SQLx cache, and crate boundaries." paths: - "crates/" - "services/" - "tooling/" globs: "crates/,services/,tooling/" alwaysApply: false

Backend guardrails

  • Run Rust tests from the repository root with cargo test -p <package> and leave SQLX_OFFLINE unset. Offline mode is for checks, builds, and lints, not tests.
  • Generate migrations with sqlx migrate add; never invent timestamped filenames. Never hand-edit .sqlx/query-*.json. Prepare the workspace cache from the root inside Nix with just prepare_db (database guide).
  • Never generate .sqlx metadata for test queries: no --tests on prepare. Tests compile against the live database, so they don't need the cache.
  • Across domain crates, depend on the owning domain service or port; only a composition root may construct that crate's outbound adapters. Never import another crate's outbound module from an outbound adapter. Soup's candidate repository may read entity_properties after the properties service authorizes the selected definitions; keep execution and entity access gates in Soup.
  • Read the Rust development guide before building or testing, and the hexagonal architecture skill before changing inbound, domain, or outbound code.