# AGENTS.md

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use. 

## Setup

```
yarn install
```

## Commands

```
yarn dev           # run locally
yarn build         # produce a build
yarn test          # run the test suite, must pass before any commit
yarn typecheck     # type check without emitting
yarn lint          # lint
yarn affine
yarn af
yarn lint:format
```

## Layout

- `packages/`   4728 source files
- `blocksuite/` 2728 source files
- `tests/`      305 source files
- `tools/`      50 source files
- `scripts/`    10 source files

## Conventions

- Tests live alongside the code they cover, following `.github/helm/affine/charts/front/templates/tests/test-connection.yaml`.
- TypeScript runs in strict mode. Type errors are the fastest feedback available, so do not weaken it.
- CI defines what passing means. See `.github/workflows/auto-labeler.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `.yarn/releases/yarn-4.18.0.cjs` is 3696KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
