|
3 | 3 | ## Purpose & Scope |
4 | 4 | - Operational guidance for human and AI agents working in this repository. This revision preserves all existing expectations while improving structure and wording in line with agents.md best practices. |
5 | 5 |
|
| 6 | +User-facing documentation lives in `README.md`. Keep this file focused on contributor/agent workflow, debugging, and coding standards. |
| 7 | + |
6 | 8 | ## Operating Principles |
7 | 9 | - Follow the sequence plan → implement → verify; do not pivot without restating the plan. |
8 | 10 | - Stop immediately on unexpected failures and ask before changing approach. |
@@ -138,14 +140,8 @@ throw new IllegalArgumentException("bad value"); // No specifics |
138 | 140 | Use `Json.toDisplayString(value, depth)` to render JSON fragments in error messages, and include relevant context like schema paths, actual vs expected values, and specific constraint violations. |
139 | 141 |
|
140 | 142 | ## JSON Compatibility Suite |
141 | | -```bash |
142 | | -# Build and run compatibility report |
143 | | -mvn clean compile generate-test-resources -pl json-compatibility-suite |
144 | | -mvn exec:java -pl json-compatibility-suite |
145 | 143 |
|
146 | | -# Run JSON output (dogfoods the API) |
147 | | -mvn exec:java -pl json-compatibility-suite -Dexec.args="--json" |
148 | | -``` |
| 144 | +See `README.md` for user-facing commands. When running locally as an agent, use the Maven wrapper described in this file. |
149 | 145 |
|
150 | 146 | ## Architecture Overview |
151 | 147 |
|
@@ -202,35 +198,7 @@ IMPORTANT: Bugs in the main logic this code cannot be fixed in this repo they ** |
202 | 198 |
|
203 | 199 | ## Common Workflows |
204 | 200 |
|
205 | | -### API Compatibility Testing |
206 | | -1. Run the compatibility suite: `mvn exec:java -pl json-compatibility-suite`. |
207 | | -2. Inspect reports for regressions relative to upstream expectations. |
208 | | -3. Validate outcomes against the official JSON Test Suite. |
209 | | - |
210 | | -## Module Reference |
211 | | - |
212 | | -### json-java21 |
213 | | -- Main library delivering the core JSON API. |
214 | | -- Maven coordinates: `io.github.simbo1905.json:json-java21:0.X.Y`. |
215 | | -- Requires Java 21 or newer. |
216 | | - |
217 | | -### json-compatibility-suite |
218 | | -- Automatically downloads the JSON Test Suite from GitHub. |
219 | | -- Surfaces known vulnerabilities (for example, StackOverflowError under deep nesting). |
220 | | -- Intended for education and testing, not production deployment. |
221 | | - |
222 | | -### json-java21-api-tracker |
223 | | -- Tracks API evolution and compatibility changes. |
224 | | -- Uses Java 24 preview features (`--enable-preview`). |
225 | | -- Runner: `io.github.simbo1905.tracker.ApiTrackerRunner` compares the public JSON API (`jdk.sandbox.java.util.json`) with upstream `java.util.json`. |
226 | | -- Workflow fetches upstream sources, parses both codebases with the Java compiler API, and reports matching/different/missing elements across modifiers, inheritance, methods, fields, and constructors. |
227 | | -- Continuous integration prints the report daily. It does not fail or open issues on differences; to trigger notifications, either make the runner exit non-zero when `differentApi > 0` or parse the report and call `core.setFailed()` within CI. |
228 | | - |
229 | | -### json-java21-jtd (JTD Validator) |
230 | | -- JSON Type Definition validator implementing RFC 8927 specification. |
231 | | -- Provides eight mutually-exclusive schema forms for simple, predictable validation. |
232 | | -- Uses stack-based validation with comprehensive error reporting. |
233 | | -- Includes full RFC 8927 compliance test suite. |
| 201 | +Prefer linking to `README.md` for stable, user-facing workflows and module descriptions. Keep this file focused on agent execution details. |
234 | 202 |
|
235 | 203 | #### Debugging Exhaustive Property Tests |
236 | 204 |
|
|
0 commit comments