Skip to content

Commit ade0174

Browse files
authored
Merge pull request #323 from effect-native/docs/agents-md
added AGENTS.md
2 parents 4089ec4 + 737a1c7 commit ade0174

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

AGENTS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
5+
- `src/` — TypeScript API and types (`functions.ts`, `Storage.ts`, `types.ts`).
6+
- `cpp/` — C++ JSI core and bundled SQLite sources; runs on iOS/Android.
7+
- `android/` — Kotlin TurboModule + JNI glue (`CMakeLists.txt`, `*.kt`).
8+
- `ios/` — Objective‑C++ TurboModule (`OPSQLite.mm`) and `.xcframework` assets.
9+
- `c_sources/` — optional SQLite tokenizers/extensions compiled into the binary.
10+
- `example/` — React Native demo for local testing (iOS/Android).
11+
- `lib/` — build output (generated by `bob`); do not commit.
12+
13+
## Build, Test, and Development Commands
14+
15+
- Prereqs: Node 20 (`.nvmrc`), Yarn 4 (`yarn.lock`), Ruby for iOS pods.
16+
- Install deps: `yarn install`
17+
- Type check TS: `yarn typecheck`
18+
- Build JS outputs: `yarn prepare` (runs `bob build``lib/`)
19+
- Format native C/C++: `yarn clang-format-check`
20+
- Example app:
21+
- Install pods: `yarn pods` (runs in `example/`)
22+
- iOS run: `cd example && yarn ios`
23+
- Android run: `cd example && yarn android` (or `yarn build:android`)
24+
25+
## Coding Style & Naming Conventions
26+
27+
- TypeScript: Prettier enforced via `package.json` (single quotes, 2‑space
28+
indent, trailing commas `es5`). Use camelCase for variables/functions;
29+
PascalCase for types/classes. Keep strict typing; fix unused vars/params.
30+
- C/C++: `.clang-format` (LLVM style, 4‑space indent). Run
31+
`yarn clang-format-check` before pushing.
32+
- Kotlin/Obj‑C(++): Follow platform conventions and keep methods focused and
33+
small.
34+
35+
## Testing Guidelines
36+
37+
- No Jest configured. Validate changes with the `example/` app. Add minimal,
38+
reproducible flows under `example/src` when fixing bugs or adding features.
39+
- Verify both platforms build cleanly. Always run `yarn typecheck` and a local
40+
`yarn prepare` before opening a PR.
41+
42+
## Commit & Pull Request Guidelines
43+
44+
- Commits: clear, imperative messages. Conventional prefixes encouraged
45+
(`feat:`, `fix:`, `docs:`, `chore:`) with optional scope (`android`, `ios`,
46+
`cpp`, `ts`).
47+
- PRs: include a summary, motivation, test steps (iOS/Android), linked issues,
48+
and any performance notes/screenshots or logs.
49+
- Hygiene: do not commit `lib/`, `example/ios/Pods/`, or build artifacts. Ensure
50+
`yarn prepare` succeeds locally.
51+
52+
## Architecture Notes
53+
54+
- JSI TurboModule: `src/` exposes the public API; native JSI lives in `cpp/`,
55+
bridged via `android/` (JNI/Kotlin) and `ios/` (Obj‑C++). Feature flags (FTS5,
56+
RTree, SQLCipher, libsql) for the demo are configured in
57+
`example/package.json` under `op-sqlite`.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

0 commit comments

Comments
 (0)