Skip to content

Commit 202eded

Browse files
committed
docs: add AGENTS.md
1 parent a303990 commit 202eded

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# AGENTS.md
2+
3+
[`@snelusha/balrun`](https://github.com/snelusha/balrun) runs Ballerina from JavaScript/TypeScript by loading `ballerina.wasm`, which is built from the [`ballerina-lang-go`](https://github.com/ballerina-platform/ballerina-lang-go) submodule.
4+
5+
## Repository structure
6+
7+
Workspaces are declared in the root `package.json` as `apps/*`, `examples/*`, and `packages/*`.
8+
9+
| Path | Package | Role |
10+
| --------------------------- | ------------------- | ----------------------------------------- |
11+
| `packages/balrun` | `@snelusha/balrun` | TypeScript library, React hook, and CLI. |
12+
| `packages/ballerina-wasm` | `ballerina-wasm` | Builds `ballerina.wasm` with Go. |
13+
| `examples/memfs` | `example-memfs` | In-memory filesystem usage example. |
14+
| `examples/vite` | `example-vite` | Vite + React browser usage example. |
15+
16+
`packages/ballerina-wasm/ballerina-lang-go` is an upstream submodule and has its own `AGENTS.md`.
17+
18+
## Commands
19+
20+
Use **Bun** for installs and scripts. Do **not** use npm, pnpm, or yarn.
21+
22+
Useful root scripts:
23+
24+
- `bun install --frozen-lockfile`
25+
- `bun run build` — Turbo build across workspaces
26+
- `bun run test` — Turbo test across workspaces
27+
- `bun run lint` / `bun run lint:fix` — Biome check (and auto-fix)
28+
- `bun run format` — Biome format (write)
29+
30+
## Conventions
31+
32+
- Biome is the formatter/linter; keep tab indentation and double quotes.
33+
- Avoid editing generated `dist/` files unless explicitly required.
34+
35+
## Task completion
36+
37+
Before considering work complete, `bun run lint` and `bun run test` should pass at the repository root.

0 commit comments

Comments
 (0)