This file provides repository-specific instructions for coding agents working on Paimon C++. For contributor-facing setup and the complete coding conventions, also read CONTRIBUTING.md and docs/code-style.md.
These instructions apply to the entire repository. More deeply nested AGENTS.md files, if added later, may provide additional or more specific instructions for their directory trees.
Keep the requested scope exact. Do not include unrelated refactors, formatting changes, API redesigns, dependency updates, or generated files in a focused change.
include/paimon/: public C++ API headers.src/paimon/: core implementation and most unit tests.test/inte/: end-to-end integration tests.benchmark/: benchmarks and benchmark-specific tests.examples/: example programs.docs/ and apidoc/: user documentation and API documentation.cmake_modules/ and build_support/: CMake helpers and build infrastructure.ci/: scripts used by continuous integration.test/test_data/: checked-in test fixtures.third_party/: third-party sources and patches.build/, build-release/, and output/: generated or local build output.Do not edit third_party/, checked-in fixtures, generated output, or Git LFS objects unless the task explicitly requires it. Never add files from local build directories to a change.
When changing a public API, check the declaration under include/paimon/, its implementation, symbol visibility, documentation, callers, and tests together.
The full rules are in docs/code-style.md. In particular:
Status and Result<T> for fallible operations. Do not use exceptions for production error propagation.PAIMON_RETURN_NOT_OK and PAIMON_ASSIGN_OR_RAISE.auto, as the declaration in PAIMON_ASSIGN_OR_RAISE and PAIMON_ASSIGN_OR_RAISE_FROM_ARROW.std::unique_ptr for sole ownership and use std::shared_ptr only for genuine shared ownership.static Create() plus a private constructor when object initialization can fail.PAIMON_EXPORT.src/paimon/common/utils/ instead of duplicating utility code..clang-format; do not manually restyle unrelated code.Use an existing configured build directory when it is compatible with the change. To configure a new debug build with tests:
cmake -S . -B build \ -DCMAKE_BUILD_TYPE=Debug \ -DPAIMON_BUILD_TESTS=ON
Start with the narrowest relevant validation:
cmake --build build --target <test-target> -j "$(nproc)" ./build/debug/<test-binary> --gtest_filter='<Suite.Test>'
Then broaden validation in proportion to the change:
# All unit tests cmake --build build --target unittest -j "$(nproc)" # Formatting, lint, and repository checks for changed files pre-commit run --files <changed-files> git diff --check
For changes to build configuration, public APIs, shared infrastructure, or cross-module behavior, run the relevant wider test suite. The CI-equivalent build entry point is ci/scripts/build_paimon.sh; it may rebuild all dependencies and take substantially longer than a focused local target.
If a required check cannot be run because of missing dependencies, unsupported hardware, or time constraints, report exactly what was and was not run.
*_test.cpp.ASSERT_* when later assertions depend on the condition succeeding.Before handing off a change:
git diff for accidental or unrelated edits.git diff --check.CONTRIBUTING.md.CONTRIBUTING.md, use a Conventional Commits title, and complete every applicable section of .github/PULL_REQUEST_TEMPLATE.md.