|
1 | | -# AI Assistant Instructions: evolu-plan-b |
| 1 | +# Repository Notes for Contributors |
2 | 2 |
|
3 | | -> **Full context**: See `.ai/` directory for detailed instructions and active tasks. |
| 3 | +This file is intentionally public-safe and minimal. |
4 | 4 |
|
5 | | -## 🎯 This Repository |
| 5 | +## Purpose |
6 | 6 |
|
7 | | -**Evolu Plan B** - Fork of [evoluhq/evolu](https://github.com/evoluhq/evolu) with: |
8 | | -- **Bun** as package manager and runtime (not pnpm/Node) |
9 | | -- **Biome** for linting and formatting (not ESLint/Prettier) |
10 | | -- Reduced dependencies |
11 | | -- SQLoot-specific enhancements |
| 7 | +`evolu-plan-b` is SQLoot's Bun + Biome fork of Evolu with focus on: |
12 | 8 |
|
13 | | -## 📊 Quick Context |
| 9 | +- upstream compatibility, |
| 10 | +- measurable CI/benchmark quality, |
| 11 | +- practical local-first runtime hardening. |
14 | 12 |
|
15 | | -| Aspect | Value | |
16 | | -| ---------------- | ------------- | |
17 | | -| Package Manager | Bun 1.3.9 | |
18 | | -| Node.js | >=24.0.0 | |
19 | | -| Linter/Formatter | Biome 2.4.0 | |
20 | | -| Test Framework | Vitest | |
21 | | -| Upstream | evoluhq/evolu | |
| 13 | +## Development Baseline |
22 | 14 |
|
23 | | -## 🗂️ Repository Structure |
| 15 | +- Package manager: `bun` |
| 16 | +- Lint/format: `biome` |
| 17 | +- TypeScript: strict mode |
| 18 | +- Main quality gate: `bun run verify` |
24 | 19 |
|
25 | | -``` |
26 | | -evolu-plan-b/ |
27 | | -├── apps/ |
28 | | -│ ├── relay/ # Sync relay server |
29 | | -│ └── web/ # Documentation (Dan's) - TO BE REMOVED |
30 | | -├── packages/ |
31 | | -│ ├── common/ # Core logic, CRDTs, sync |
32 | | -│ ├── web/ # Browser adapter (wa-sqlite) |
33 | | -│ ├── react/ # React bindings |
34 | | -│ ├── react-web/ # React + web combined |
35 | | -│ ├── react-native/ # React Native adapter |
36 | | -│ ├── nodejs/ # Node.js adapter |
37 | | -│ ├── svelte/ # Svelte bindings |
38 | | -│ ├── vue/ # Vue bindings |
39 | | -│ └── tsconfig/ # Shared TS config |
40 | | -├── examples/ # Framework examples - MIGRATING TO bench-suite |
41 | | -└── .ai/ # AI agent context |
42 | | -``` |
43 | | - |
44 | | -## 🔧 Common Commands |
45 | | - |
46 | | -```bash |
47 | | -# Development |
48 | | -bun install # Install dependencies |
49 | | -bun run dev # Start dev mode (packages + web + relay) |
50 | | -bun run build # Build all packages |
51 | | - |
52 | | -# Testing |
53 | | -bun run test # Run tests |
54 | | -bun run test:coverage # Tests with coverage |
55 | | -bun run test:watch # Watch mode |
56 | | - |
57 | | -# Quality |
58 | | -bun run lint # Lint with Biome |
59 | | -bun run format # Format with Biome |
60 | | -bun run verify # Full verification (build + lint + test) |
61 | | - |
62 | | -# Release |
63 | | -bun run changeset # Add changeset |
64 | | -bun run version # Bump versions |
65 | | -bun run release # Publish packages |
66 | | -``` |
| 20 | +## Core Commands |
67 | 21 |
|
68 | | -## 🔄 Upstream Sync Strategy |
69 | | - |
70 | | -This fork cherry-picks from upstream. Dan (@steida) pushes frequently without warning. |
71 | | - |
72 | | -**Branches:** |
73 | | -- `main` - Stable |
74 | | -- `sync/upstream-main` - Tracking upstream/main |
75 | | -- `sync/upstream-common-v8` - Tracking upstream/common-v8 (new Task architecture) |
76 | | -- `feat/*` - Feature branches |
77 | | - |
78 | | -**Workflow:** |
79 | 22 | ```bash |
80 | | -git fetch upstream |
81 | | -git cherry-pick <commit> # Pick specific commits |
82 | | -# Resolve conflicts, especially in lock files and CI |
| 23 | +bun install |
| 24 | +bun run build |
| 25 | +bun run test |
| 26 | +bun run lint |
83 | 27 | bun run verify |
84 | 28 | ``` |
85 | 29 |
|
86 | | -## ⚠️ Key Differences from Upstream |
87 | | - |
88 | | -1. **Bun over pnpm** - All commands use `bun` |
89 | | -2. **Biome over ESLint** - Single tool for lint + format |
90 | | -3. **No `apps/web`** - Dan's docs site will be removed |
91 | | -4. **Examples migrating** - Moving to `bench-suite` repo |
92 | | - |
93 | | -## 📍 Related Resources |
94 | | - |
95 | | -| Resource | Location | |
96 | | -| ------------ | ----------------------------------- | |
97 | | -| Issues | `../knowledge/05-Issues/` | |
98 | | -| Roadmap | `../knowledge/01-Vision/ROADMAP.md` | |
99 | | -| Architecture | `../knowledge/02-Architecture/` | |
100 | | -| Bench Suite | `../bench-suite/` (sibling repo) | |
101 | | -| Upstream | https://github.com/evoluhq/evolu | |
102 | | - |
103 | | -## 🤖 For AI Agents |
104 | | - |
105 | | -### Do |
106 | | -- Use Bun for all package operations |
107 | | -- Run `bun run verify` before suggesting PR |
108 | | -- Check `.ai/tasks/active/` for current work |
109 | | -- Reference upstream issues with `upstream#` |
110 | | - |
111 | | -### Don't |
112 | | -- Use npm/pnpm/yarn |
113 | | -- Suggest ESLint/Prettier configs |
114 | | -- Modify `apps/web/` (it's going away) |
115 | | -- Add unnecessary dependencies |
| 30 | +## Security |
116 | 31 |
|
117 | | -### Context Priority |
118 | | -1. This file |
119 | | -2. `.ai/README.md` |
120 | | -3. `.ai/tasks/active/*.md` |
121 | | -4. `../knowledge/01-Vision/ROADMAP.md` |
| 32 | +- Never commit secrets or credentials. |
| 33 | +- Use responsible disclosure process from `SECURITY.md`. |
122 | 34 |
|
123 | | ---- |
| 35 | +## Contribution |
124 | 36 |
|
125 | | -<div align="center"> |
126 | | - <a href="https://github.com/SQLoot/evolu-plan-b">SQLoot/evolu-plan-b</a> |
127 | | -</div> |
| 37 | +- Keep changes focused. |
| 38 | +- Add/update tests for behavioral changes. |
| 39 | +- Update docs when behavior or workflows change. |
0 commit comments