-
Notifications
You must be signed in to change notification settings - Fork 2
chore: add AGENTS.md #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
chore: add AGENTS.md #324
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Modules | ||
|
|
||
| - Multi-module Maven repo (root `pom.xml`) with three modules: | ||
| - `sdk/`: the OpenTDF Java SDK (`sdk/src/main/java`, `sdk/src/main/kotlin`, tests in `sdk/src/test/java`) | ||
| - `cmdline/`: shaded CLI jar (`cmdline/src/main/java`, resources in `cmdline/src/main/resources`) | ||
| - `examples/`: runnable examples (`examples/src/main/java`) | ||
| - Protobuf/gRPC sources are generated during the build into `sdk/target/generated-sources` (do not hand-edit generated code). | ||
|
|
||
| ## Build, Test, and Dev Commands | ||
|
|
||
| - Build everything (runs codegen): `mvn clean install` | ||
| - Fast local build (skip tests): `mvn clean install -DskipTests` | ||
| - SDK unit tests: `mvn -pl sdk test` | ||
| - Verify like CI (coverage profile): `mvn clean verify -P coverage` | ||
| - Build CLI jar: `mvn -pl cmdline -am package` (output: `cmdline/target/cmdline.jar`) | ||
| - Run an example via exec plugin: `mvn -pl examples exec:java@EncryptExample` | ||
|
|
||
| ## Coding Style & Naming | ||
|
|
||
| - Target runtime: Java 11 (`maven.compiler.release=11`). CI runs on newer JDKs but compiles to 11 bytecode. | ||
| - No repo-wide formatter is enforced; match surrounding style (4-space indent, no tabs, consistent import grouping). | ||
| - Packages use `io.opentdf.platform...`; keep public SDK APIs stable and additive where possible. | ||
|
|
||
| ## Testing Guidelines | ||
|
|
||
| - Tests use JUnit (Jupiter) plus Mockito/AssertJ; place new tests under `sdk/src/test/java` and name `*Test`. | ||
strantalis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - Prefer focused unit tests over integration tests; keep network calls mocked (e.g., `MockWebServer`). | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
|
|
||
| - Use Conventional Commits (enforced on PR titles): `feat(sdk): ...`, `fix(cmdline): ...`, `chore(docs): ...` (use `!` for breaking changes). | ||
| - DCO sign-off is required: `git commit -s`. | ||
strantalis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - PRs should include: summary, rationale, test plan/commands run, and any public API notes. | ||
| - Build/dependency files (e.g., `pom.xml`, `sdk/pom.xml`) are code-owned and may require security/architecture review. | ||
|
|
||
| ## Security & Configuration Tips | ||
|
|
||
| - Builds require the `buf` CLI (see `sdk/buf.yaml` / `sdk/buf.gen.yaml`). Authenticate to avoid rate limits; CI uses `BUF_INPUT_HTTPS_USERNAME`/`BUF_INPUT_HTTPS_PASSWORD`. Never commit tokens. | ||
strantalis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.