You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/java-development/SKILL.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,20 @@ Use this skill when tasked with modifying Java code, fixing bugs, or adding feat
11
11
12
12
### Step 1: Understand the Scope
13
13
- Determine if you are working on **Core Components** (`sdk-platform-java`) or a specific **Client Library** (`java-<service>`).
14
-
- Review the root [AGENTS.md](../../AGENTS.md) for the Style Guide and Dependency Management rules that apply repo-wide.
14
+
- Review the root [AGENTS.md](../../../AGENTS.md) for the Style Guide and Dependency Management rules that apply repo-wide.
15
15
16
16
### Step 2: Make Changes and Build
17
17
- Apply your code changes.
18
-
- To build efficiently, use the recommended flags or scoped builds detailed in [AGENTS.md](../../AGENTS.md#building-the-project).
18
+
- To build efficiently, use the recommended flags or scoped builds detailed in [AGENTS.md](../../../AGENTS.md#building-the-project).
19
19
20
20
### Step 3: Determine and Run Tests
21
21
- If working on a **Client Library**, run its unit tests (`mvn test` in the module directory) and check its README for integration test procedures.
22
22
- If working on **Core Components** (`sdk-platform-java`), you **must** follow the testing heuristics in [sdk-platform-java/DEVELOPMENT.md](../../../sdk-platform-java/DEVELOPMENT.md#testing-guide) to know which tests are required.
23
-
- If golden files need updating, follow the specific procedures referenced in [AGENTS.md](../../AGENTS.md#specialized-development-guides).
23
+
- If golden files need updating, follow the specific procedures referenced in [AGENTS.md](../../../AGENTS.md#8-specialized-development-guides).
24
24
25
25
### Step 4: Format Code
26
-
- You **must** ensure the code is formatted before completing a task. Use the formatting commands listed in [AGENTS.md](../../AGENTS.md#code-formatting).
26
+
- You **must** ensure the code is formatted before completing a task. Use the formatting commands listed in [AGENTS.md](../../../AGENTS.md#code-formatting).
27
27
28
28
### Step 5: Verify and Document
29
29
- Verify that all tests pass and formatting is correct.
30
-
- Follow the Contribution Guidelines in [AGENTS.md](../../AGENTS.md#7-contribution-guidelines) for creating commits and PRs.
30
+
- Follow the Contribution Guidelines in [AGENTS.md](../../../AGENTS.md#7-contribution-guidelines) for creating commits and PRs.
- Bazelisk (for integration tests in `sdk-platform-java`)
39
40
40
41
### Building the Project
@@ -50,19 +51,18 @@ Directories starting with `java-` are client libraries for specific Google Cloud
50
51
## 4. Testing Strategy
51
52
-**Unit Tests**: `mvn test`.
52
53
-**Integration Tests**: Module specific, may require emulators or live services.
53
-
-**Core Components Testing**: See [sdk-platform-java/DEVELOPMENT.md](sdk-platform-java/DEVELOPMENT.md) for a detailed explanation of the 4 layers of testing (Traditional Unit, Golden Unit, Showcase, Golden Integration).
54
+
-**Core Components Testing**: Components should have adequate unit and integration tests to ensure coverage and correctness.
54
55
55
56
## 5. Style Guide
56
57
1. Minimize visibility scopes. Default to most restrictive access level.
57
58
2. Use short names over fully qualified names.
58
-
3. Avoid calling `@ObsoleteApi` or `@Deprecated` methods.
59
+
3. Avoid calling `@ObsoleteApi` or `@Deprecated` methods and classes.
59
60
4. Avoid unnecessary formatting changes to keep diffs clean.
60
61
5. Use `mvn` for everything other than the `test/integration` folder.
61
62
62
63
## 6. Dependency Management
63
64
- Do not bump external dependency versions unless for CVE or critical bug fix.
64
-
- Avoid introducing new external dependencies.
65
-
- Prefer Java standard library, then existing dependencies.
65
+
- Avoid introducing new external dependencies if possible. Prefer Java standard library, then opt for existing dependencies.
0 commit comments