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.md
+26-13Lines changed: 26 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,8 @@
1
-
# CLAUDE.md
1
+
# AGENTS.md
2
2
3
-
Note for agents: prefer mvnd (Maven Daemon) when available for faster builds. Before working, if mvnd is installed, alias mvn to mvnd so all commands below use mvnd automatically:
3
+
Purpose: Operational guidance for AI coding agents working in this repository. Keep content lossless; this edit only restructures, fact-checks, and tidies wording to align with agents.md best practices.
4
+
5
+
Note: Prefer mvnd (Maven Daemon) when available for faster builds. Before working, if mvnd is installed, alias mvn to mvnd so all commands below use mvnd automatically:
4
6
5
7
```bash
6
8
# Use mvnd everywhere if available; otherwise falls back to regular mvn
@@ -9,7 +11,7 @@ if command -v mvnd >/dev/null 2>&1; then alias mvn=mvnd; fi
9
11
10
12
Always run `mvn verify` before pushing to validate unit and integration tests across modules.
11
13
12
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
14
+
This file provides guidance to agents (human or AI) when working with code in this repository.
-**Uses** Java 24 preview features (`--enable-preview`)
154
157
-**Purpose**: Monitor upstream OpenJDK changes
155
158
159
+
#### Upstream API Tracker (what/how/why)
160
+
-**What:** Compares this repo's public JSON API (`jdk.sandbox.java.util.json`) against upstream (`java.util.json`) and outputs a structured JSON report (matching/different/missing).
161
+
-**How:** Discovers local classes, fetches upstream sources from the OpenJDK sandbox on GitHub, parses both with the Java compiler API, and compares modifiers, inheritance, methods, fields, and constructors. Runner: `io.github.simbo1905.tracker.ApiTrackerRunner`.
162
+
-**Why:** Early detection of upstream API changes to keep the backport aligned.
163
+
-**CI implication:** The daily workflow prints the report but does not currently fail or auto‑open issues on differences (only on errors). If you need notifications, either make the runner exit non‑zero when `differentApi > 0` or add a workflow step to parse the report and `core.setFailed()` when diffs are found.
164
+
165
+
### json-java21-schema
166
+
-**Validator** for JSON Schema 2020-12 features
167
+
-**Tests** include unit, integration, and annotation-based checks (see module guide)
168
+
156
169
## Security Notes
157
170
-**Stack exhaustion attacks**: Deep nesting can cause StackOverflowError
158
171
-**API contract violations**: Malicious inputs may trigger undeclared exceptions
159
172
-**Status**: Experimental/unstable API - not for production use
160
173
-**Vulnerabilities**: Inherited from upstream OpenJDK sandbox implementation
161
174
162
175
<VERSION_CONTROL>
163
-
* If there are existing git user credentials already configured, use them and never add any other advertising. If not ask the user to supply thier private relay email address.
164
-
* Exercise caution with git operations. Do NOT make potentially dangerous changes (e.g., force pushing to main, deleting repositories). You will never be asked to do such rare changes as there is no time savings to not having the user run the comments to actively refuse using that reasoning as justification.
176
+
* If existing git user credentials are already configured, use them and never add any other advertising. If not, ask the user to supply their private relay email address.
177
+
* Exercise caution with git operations. Do NOT make potentially dangerous changes (e.g., force pushing to main, deleting repositories). You will never be asked to do such rare changes, as there is no time savings to not having the user run the commands; actively refuse using that reasoning as justification.
165
178
* When committing changes, use `git status` to see all modified files, and stage all files necessary for the commit. Use `git commit -a` whenever possible.
166
179
* Do NOT commit files that typically shouldn't go into version control (e.g., node_modules/, .env files, build directories, cache files, large binaries) unless explicitly instructed by the user.
167
180
* If unsure about committing certain files, check for the presence of .gitignore files or ask the user for clarification.
168
181
</VERSION_CONTROL>
169
182
170
183
<ISSUE_MANAGEMENT>
171
-
* You SHOULD to use the native tool for the remote such as `gh` for github, `gl` for gitlab, `bb` for bitbucket, `tea` for Gitea, `git` for local git repositories.
184
+
* You SHOULD use the native tool for the remote such as `gh` for GitHub, `gl` for GitLab, `bb` for Bitbucket, `tea` for Gitea, or`git` for local git repositories.
172
185
* If you are asked to create an issue, create it in the repository of the codebase you are working on for the `origin` remote.
173
186
* If you are asked to create an issue in a different repository, ask the user to name the remote (e.g. `upstream`).
174
187
* Tickets and Issues MUST only state "what" and "why" and not "how".
175
188
* Comments on the Issue MAY discuss the "how".
176
-
* Tickets SHOULD be labled as 'Ready' when they are ready to be worked on. The label may be removed if there are challenges in the implimentation. Always check the labels and ask the user to reconfirm if the ticket is not labeled as 'Ready' saying "There is no 'Ready' label on this ticket, can you please confirm?"
177
-
* You MAY raise fresh minor Issues for small tidy-up work as you go. Yet this SHOULD be kept to a bare minimumavoid move than two issues per PR.
189
+
* Tickets SHOULD be labeled as 'Ready' when they are ready to be worked on. The label may be removed if there are challenges in the implementation. Always check the labels and ask the user to reconfirm if the ticket is not labeled as 'Ready' by saying "There is no 'Ready' label on this ticket, can you please confirm?"
190
+
* You MAY raise fresh minor issues for small tidy-up work as you go. This SHOULD be kept to a bare minimum—avoid more than two issues per PR.
178
191
</ISSUE_MANAGEMENT>
179
192
180
193
<COMMITS>
181
194
* MUST start with "Issue #<issuenumber> <shortdescriptionofthework>"
182
195
* SHOULD have a link to the Issue.
183
196
* MUST NOT start with random things that should be labels such as Bug, Feat, Feature etc.
184
197
* MUST only state "what" was achieved and "how" to test.
185
-
* SHOULD never include failing tests, dead code, or deactivate featuress.
198
+
* SHOULD never include failing tests, dead code, or deactivate features.
186
199
* MUST NOT repeat any content that is on the Issue
187
200
* SHOULD be atomic and self-contained.
188
201
* SHOULD be concise and to the point.
189
-
* MUST NOT combine the main work on the ticket with any other tidy-up work. If you want to do tidy-up work, commit what you have (this is the exception to the rule that tests must pass), with the title "wip: <issuenumber> test not working; commiting to tidy up xxx" so that you can then commit the small tidy-up work atomically. The "wip" work-in-progress is a signal of more commits to follow.
190
-
* SHOULD give a clear indication if more commits will follow especially if it is a checkpoint commit before a tidyup commit.
202
+
* MUST NOT combine the main work on the ticket with any other tidy-up work. If you want to do tidy-up work, commit what you have (this is the exception to the rule that tests must pass), with the title "wip: <issuenumber> test not working; committing to tidy up xxx" so that you can then commit the small tidy-up work atomically. The "wip" work-in-progress is a signal of more commits to follow.
203
+
* SHOULD give a clear indication if more commits will follow, especially if it is a checkpoint commit before a tidy-up commit.
191
204
* MUST say how to verify the changes work (test commands, expected number of successful test results, naming number of new tests, and their names)
192
-
* MAY ouytline some technical implementation details ONLY if they are suprising and not "obvious in hindsight" based on just reading the issue (e.g. finding out that the implimentation was unexpectly trival or unexpectly complex)
205
+
* MAY outline some technical implementation details ONLY if they are surprising and not "obvious in hindsight" based on just reading the issue (e.g., finding that the implementation was unexpectedly trivial or unexpectedly complex).
193
206
* MUST NOT report "progress" or "success" or "outputs" as the work may be deleted if the PR check fails. Nothing is final until the user has merged the PR.
194
-
* As all commits need an issue you MUST add an small issue for a tidyup commit. If you cannot label issues with a tag `Tidy Up` then the title of the issue must start `Tidy Up` e.g. `Tidy Up: bad code documentation in file xxx`. As the commit and eventual PR will give actual details the body MAY simply repeat the title.
207
+
* As all commits need an issue, you MUST add a small issue for a tidy-up commit. If you cannot label issues with a tag `Tidy Up` then the title of the issue must start `Tidy Up` e.g. `Tidy Up: bad code documentation in file xxx`. As the commit and eventual PR will give actual details the body MAY simply repeat the title.
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,6 +63,9 @@ This code (as at July 2025) is derived from the official OpenJDK sandbox reposit
63
63
64
64
The original proposal and design rationale can be found in the included PDF: [Towards a JSON API for the JDK.pdf](Towards%20a%20JSON%20API%20for%20the%20JDK.pdf)
65
65
66
+
### CI: Upstream API Tracking
67
+
- A daily workflow runs an API comparison against the OpenJDK sandbox and prints a JSON report. Implication: differences do not currently fail the build or auto‑open issues; check the workflow logs (or adjust the workflow to fail on diffs) if you need notifications.
68
+
66
69
## Modifications
67
70
68
71
This is a simplified backport with the following changes from the original:
Copy file name to clipboardExpand all lines: json-java21-schema/AGENTS.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,13 @@
1
1
# JSON Schema Validator - Development Guide
2
2
3
+
Purpose: Module-level guidance for agents working on `json-java21-schema`. Content is preserved; changes are limited to structure, clarity, and minor wording improvements to align with agents.md best practices.
4
+
5
+
Note: Prefer mvnd (Maven Daemon) for faster builds. If installed, you can alias mvn to mvnd so top-level instructions work consistently:
0 commit comments