Skip to content

Commit d1cd8de

Browse files
authored
docs: add AGENTS.md (#3056)
1 parent 73acacb commit d1cd8de

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

‎AGENTS.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# AGENTS.md
2+
3+
## Setup commands
4+
5+
Always use `bundle` and `rake` commands, not any third-party packaging tools.
6+
7+
- Install dependencies for all subprojects: `rake bundle`
8+
- Run unit and client tests: `rake test:client`
9+
- Run YAML API tests: `rake test:yaml`
10+
- See all available test tasks: `rake -T`
11+
12+
## Testing
13+
14+
**`rake test:client` must pass before you commit code.**
15+
16+
Integration tests require Elasticsearch running on `localhost:9200`. They are skipped automatically if no server is available, so a failing integration test in CI always means a real failure.
17+
18+
## Project Structure
19+
20+
This repo contains two subprojects, each with its own `Gemfile` and `Rakefile`:
21+
22+
- **elasticsearch/** - main gem (client, transport, DSL)
23+
- **elasticsearch-api/** - generated API layer and YAML test runner
24+
25+
Top-level `Rakefile` and `rake_tasks/` orchestrate tasks across all subprojects.
26+
27+
## Development Workflow
28+
29+
1. Run `rake bundle` to install dependencies in all subprojects.
30+
2. Make changes to files in the relevant subproject.
31+
3. Run `rake test:client` to verify unit tests pass.
32+
4. If your change touches API behaviour, also run `rake test:yaml`.
33+
34+
## Adding new agent instructions
35+
36+
If a specific action you learned to do better will be useful to other agents doing the same task in the future, but may not be needed for all agent-related tasks, create or update skills in `.github/skills/`.
37+
38+
If you learned something that will be useful to any contributor to this project, update `AGENTS.md`.

0 commit comments

Comments
 (0)