Skip to content

Commit 3ebeed8

Browse files
committed
ORC-2143: Add AGENTS.md for AI coding assistants
### What changes were proposed in this pull request? This PR introduces an `AGENTS.md` file at the root of the repository. `AGENTS.md` is a dedicated documentation file intended to guide AI coding assistants (such as GitHub Copilot, Cursor, Gemini, etc.) when they are used by contributors. It provides AI agents with essential project context, including: - The separation of C++ (`c++/`) and Java (`java/`) modules - Accurate build and testing commands (CMake / Maven wrap) - Issue tracking conventions (requiring JIRA `ORC-XXXX`, `dev/create_orc_jira.py`) - Recommended local multi-environment testing strategy [docker/run-all.sh] and personal fork GitHub Actions tests. ### Why are the changes needed? As more developers use AI-assisted tools for coding, these tools often lack repository-specific context, leading to incorrect assumptions (e.g., suggesting raw `mvn` instead of `./mvnw`, or standard CMake instead of `make test-out`). This guideline will significantly improve the quality, accuracy, and compliance of the code and commands generated by AI agents for both new and existing contributors. ### How was this patch tested? Manual review. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity`. Closes #2593 from dongjoon-hyun/ORC-2143. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent acb12ad commit 3ebeed8

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# AI Agent Guidelines for Apache ORC
2+
3+
Welcome! If you are an AI coding assistant (like GitHub Copilot, Cursor, or Gemini) working on this repository, please adhere to the following guidelines.
4+
5+
## 1. Project Structure
6+
Apache ORC includes both Java and C++ libraries that are completely independent of each other.
7+
- `c++/` - the C++ reader and writer
8+
- `java/` - the Java reader and writer
9+
- `docker/` - docker scripts to build and test on various linuxes
10+
- `examples/` - various ORC example files that are used to test compatibility
11+
- `cmake_modules/` - CMake modules
12+
- `tools/` - C++ tools for reading and inspecting ORC files
13+
- `site/` - the website and documentation
14+
15+
## 2. Build Instructions
16+
### Java
17+
The Java project is built using Maven wrapper. Use Java 17 or higher.
18+
```bash
19+
cd java
20+
./mvnw package -DskipTests
21+
```
22+
23+
### C++
24+
The C++ project uses CMake. Use CMake 3.25.0+.
25+
```bash
26+
mkdir build && cd build
27+
cmake ..
28+
make package
29+
```
30+
*Note: To build with Meson, refer to the README.md.*
31+
32+
## 3. Testing
33+
Before submitting changes, ensure you run the appropriate test suites.
34+
35+
### Testing Java
36+
```bash
37+
cd java
38+
./mvnw test
39+
```
40+
41+
### Testing C++
42+
```bash
43+
cd build
44+
make test-out
45+
```
46+
47+
## 4. Code Style & Linting
48+
- Always keep the scope of your changes minimal.
49+
- Do not make formatting changes that are unrelated to the current task.
50+
- Follow the existing style of the file you are modifying (e.g., C++ formatting using `clang-format`, Java formatting rules).
51+
52+
## 5. Submitting Changes & Bug Tracking
53+
- **Jira**: Apache ORC uses Jira for issue tracking (https://orc.apache.org/bugs).
54+
- **Commit Messages**: Reference the Jira ticket in the commit message if applicable (e.g., `ORC-XXXX: Fix issue...`). There is a helper script `dev/create_orc_jira.py`.
55+
- **Pull Requests**: Explain the reasoning behind your changes clearly. To ensure your changes are correct before submitting a PR to `apache/orc`, you can:
56+
1. Run the tests locally (`mvn test` or `make test`).
57+
2. Use the Docker scripts in `docker/` (e.g., `cd docker && ./run-all.sh local main`).
58+
3. **Trigger GitHub Actions**: Push your branch to your personal fork of the repository and open a Pull Request there. This will automatically run `.github/workflows/build_and_test.yml` on your own GitHub account's compute before you submit it to the upstream ASF repository.
59+
60+
## 6. General Advice
61+
- **Do not introduce breaking changes** to the ORC file format serialization unless explicitly requested and discussed.
62+
- Ensure cross-compatibility between C++ and Java implementations if you are making logic or behavioral changes to readers / writers.

0 commit comments

Comments
 (0)