|
1 | | -# Repository Guidelines |
| 1 | +# AGENTS.md |
2 | 2 |
|
3 | | -## Project Structure & Module Organization |
| 3 | +This file provides guidance to AI coding agents when working with code in this repository. |
4 | 4 |
|
5 | | -This repository is a Yarn workspaces monorepo for shared GLSP development tooling. |
| 5 | +## Project Overview |
6 | 6 |
|
7 | | -- `dev-packages/*`: publishable workspace packages (`cli`, `config`, `config-test`, `eslint-config`, `mocha-config`, `nyc-config`, `prettier-config`, `ts-config`, `dev`). |
8 | | -- `dev-packages/cli/src`: TypeScript sources for the `glsp` CLI (`commands/` and `util/`). |
9 | | -- `.github/workflows`: CI, release, and publishing workflows. |
10 | | -- `docker/` and `releng/`: container and release-engineering assets. |
11 | | -- Root configs: `eslint.config.mjs`, `tsconfig*.json`, `.prettierrc`, `lerna.json`. |
| 7 | +Eclipse GLSP shared development tooling monorepo. Contains reusable dev packages (ESLint config, Prettier config, TypeScript config, CLI tools) published to npm under `@eclipse-glsp/*`. This is **not** the GLSP runtime — it provides build/lint/format configurations consumed by other GLSP repositories (glsp-client, glsp-server-node, glsp-theia-integration, etc.). |
12 | 8 |
|
13 | | -## Build, Test, and Development Commands |
| 9 | +## Build & Development |
14 | 10 |
|
15 | | -Use Node `>=20` and Yarn classic (`>=1.7.0 <2`). |
16 | | - |
17 | | -- `yarn install`: install dependencies and build via `prepare`. |
18 | | -- `yarn build`: run `lerna run build` across workspaces. |
19 | | -- `yarn watch`: watch CLI bundle changes. |
20 | | -- `yarn lint` / `yarn lint:fix`: run ESLint (or auto-fix). |
21 | | -- `yarn format` / `yarn format:check`: apply/check Prettier formatting. |
22 | | -- `yarn check:headers`: verify copyright headers against git history. |
23 | | -- `yarn check:pr`: CI-style local gate (`install`, lint, format check, headers). |
24 | | - |
25 | | -## Coding Style & Naming Conventions |
26 | | - |
27 | | -- Language: TypeScript for source code. |
28 | | -- Formatting: Prettier (`.prettierrc`) with 4-space indentation, single quotes, no trailing commas, LF line endings. |
29 | | -- JSON/YAML formatting uses 2-space indentation. |
30 | | -- Linting: ESLint flat config (`eslint.config.mjs`) with GLSP shared rules. |
31 | | -- Naming: keep command implementations in `dev-packages/cli/src/commands/*.ts`; shared helpers in `dev-packages/cli/src/util/*.ts`. |
32 | | - |
33 | | -## Testing Guidelines |
34 | | - |
35 | | -There is currently no root `test` script in this repository. Validate contributions with: |
36 | | - |
37 | | -- `yarn build` |
38 | | -- `yarn lint` |
39 | | -- `yarn format:check` |
40 | | -- `yarn check:headers` |
41 | | - |
42 | | -For new testable packages, use GLSP shared test config (`@eclipse-glsp/config-test`) and Mocha/nyc conventions (`*.spec.ts`, coverage via `test:coverage`). |
43 | | - |
44 | | -## Commit & Pull Request Guidelines |
45 | | - |
46 | | -- Open an issue in `https://github.com/eclipse-glsp/glsp` before coding. |
47 | | -- Branch naming: `issues/<issue_number>` (example: `issues/123`). |
48 | | -- Commit messages: imperative subject; issue references are expected (examples in history include `GLSP-1594: ... (#1596)`). |
49 | | -- Include closing reference with absolute URL, e.g. `closes https://github.com/eclipse-glsp/glsp/issues/241`. |
50 | | -- PRs should include scope, linked issue, and pass CI; ensure `yarn.lock` has no unintended diff. |
51 | | -- Ensure Eclipse Contributor Agreement (ECA) requirements are satisfied. |
| 11 | +- **Package manager**: Yarn 1.x (classic) — do not use Yarn 2+/Berry or npm |
| 12 | +- **Build**: Run `yarn` from the repository root to build the entire project |
| 13 | +- **CLI**: Run `yarn glsp` to start the CLI |
| 14 | +- Refer to the scripts in the root `package.json` for available build, lint, and format commands |
0 commit comments