Skip to content

Commit d01c85b

Browse files
Add AGENTS.md (#2527)
Add AGENTS.md
1 parent 58a4200 commit d01c85b

File tree

5 files changed

+74
-0
lines changed

5 files changed

+74
-0
lines changed

AGENTS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Contributor Quickstart Guide
2+
3+
## Repository Layout
4+
- `temporal-sdk`: core SDK implementation.
5+
- `temporal-testing`: utilities to help write workflow and activity tests.
6+
- `temporal-test-server`: in-memory Temporal server for fast tests.
7+
- `temporal-serviceclient`: gRPC client for communicating with the service.
8+
- `temporal-shaded`: prepackaged version of the SDK with shaded dependencies.
9+
- `temporal-spring-boot-autoconfigure`: Spring Boot auto configuration.
10+
- `temporal-kotlin`: Kotlin DSL for the SDK.
11+
- `temporal-opentracing`: OpenTracing interceptor integration.
12+
13+
## General Guidance
14+
- Avoid changing public API signatures. Anything under an `internal` directory
15+
is not part of the public API and may change freely.
16+
- The SDK code is written for Java 8.
17+
18+
## Building and Testing
19+
1. Format the code before committing:
20+
```bash
21+
./gradlew --offline spotlessApply
22+
```
23+
2. Run the tests. This can take a long time so you may prefer to run individual tests.
24+
```bash
25+
./gradlew test
26+
```
27+
To run only the core SDK tests or a single test:
28+
```bash
29+
./gradlew :temporal-sdk:test --offline --tests "io.temporal.workflow.*"
30+
./gradlew :temporal-sdk:test --offline --tests "<package.ClassName>"
31+
```
32+
3. Build the project:
33+
```bash
34+
./gradlew clean build
35+
```
36+
37+
## Tests
38+
- All tests for this each package is located in `$PACKAGE_NAME/src/test/java/io/temporal`, where `$PACKAGE_NAME` is the name of the package
39+
- Workflow API tests should rely on `SDKTestWorkflowRule` to create a worker and
40+
register workflows, activities, and nexus services.
41+
42+
## Commit Messages and Pull Requests
43+
- Follow the [Chris Beams](http://chris.beams.io/posts/git-commit/) style for
44+
commit messages.
45+
- Every pull request should answer:
46+
- **What changed?**
47+
- **Why?**
48+
- **Breaking changes?**
49+
- **Server PR** (if the change requires a coordinated server update)
50+
- Comments should be complete sentences and end with a period.
51+
52+
## Review Checklist
53+
- `./gradlew spotlessCheck` must pass.
54+
- All tests from `./gradlew test` must succeed.
55+
- Add new tests for any new feature or bug fix.
56+
- Update documentation for user facing changes.
57+
58+
For more details see `CONTRIBUTING.md` in the repository root.

temporal-kotlin/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Unlike the rest of this repository, this directory is for the Kotlin SDK so most of the code here is written in Kotlin, not Java.

temporal-sdk/AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
This directory contains the core Temporal SDK code, which is used to build Temporal applications. The SDK provides a set of APIs and libraries that allow developers to create, manage, and execute workflows and activities in a distributed environment. The SDK is designed to be easy to use and provides a high-level abstraction over the underlying Temporal service.
2+
3+
The SDK is written in Java and is designed to be used with the Temporal service. It provides a set of APIs for defining workflows and activities, as well as for managing the execution of those workflows and activities.
4+
5+
# Testing
6+
7+
All tests are written using JUnit4.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
All files in this directory and subdirectory are intended to be internal to the SDK and should not be used by external users. They do not have the same backwards compatibility guarantees as our other APIS
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Summary
2+
3+
This directory and sub directory contain tests for workflow APIs.
4+
5+
# Testing
6+
7+
Tests should use the `SDKTestWorkflowRule` to create a worker, register workflows, activities and nexus services.

0 commit comments

Comments
 (0)