Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Add code formatting guidelines to documentation

Richie McIlroyd24e92c33fbd
diff --git a/AGENTS.md b/AGENTS.md
index 2a7295118..7a1dd5542 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -44,3 +44,7 @@
- Convert the effectful API to a Next.js handler with `apiToHandler(ApiLive)` from `@/lib/server` and export the returned `handler`—avoid calling `runPromise` inside route files.
- On the server, run effects through `EffectRuntime.runPromise` from `@/lib/server`, typically after `provideOptionalAuth`, so cookies and per-request context are attached automatically.
- On the client, use `useEffectQuery`/`useEffectMutation` from `@/lib/EffectRuntime`; they already bind the managed runtime and tracing so you shouldn't call `EffectRuntime.run*` directly in components.
+
+## Code Formatting
+- Always format code before completing work: run `pnpm format` for TypeScript/JavaScript and `cargo fmt` for Rust.
+- Run these commands regularly during development and always at the end of a coding session to ensure consistent formatting.
diff --git a/CLAUDE.md b/CLAUDE.md
index 7617ae509..d13e14a88 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -414,3 +414,11 @@ Transcription/AI Enhancement → Database Storage
- **Monorepo Guide**: Turborepo documentation
- **Effect System**: Used in web-backend packages
- **Media Processing**: FFmpeg documentation for Rust bindings
+
+## Code Formatting
+
+Always format code before completing work:
+- **TypeScript/JavaScript**: Run `pnpm format` to format all code with Biome
+- **Rust**: Run `cargo fmt` to format all Rust code with rustfmt
+
+These commands should be run regularly during development and always at the end of a coding session to ensure consistent formatting across the codebase.