Skip to content

Commit 32e592d

Browse files
authored
Merge pull request #81 from BenCodez/codex/improve-agent-review-guidance-20260910
Improve agent and code review guidance
2 parents 020e62b + 05bbef2 commit 32e592d

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

.github/skills/code-review/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ not claims that every subsystem exists or must be redesigned.
129129
- For dependency/build changes, inspect scopes, Java release requirements,
130130
annotation processing, shaded relocations, packaged resources, and classpath
131131
conflicts. Re-read the current POM rather than assuming another project's setup.
132+
- Preserve the current single-project layout. Review the packaged full and `shared`
133+
JARs: neutral classes must not link platform APIs through signatures, annotations,
134+
superclasses, initializers, services, or reflection, and legacy compatibility
135+
facades must remain source/binary compatible unless a migration is authorized.
136+
- For configuration changes, test case-insensitive and literal-key traversal,
137+
supported-value classification, nested raw maps, copy isolation, bounds/cycles,
138+
and null-safe detached or rootless sections across neutral and Bukkit adapters.
132139

133140
### Concurrency, resources, and lifecycle
134141

AGENTS.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Maintainer and AI-agent guide
2+
3+
SimpleAPI is a shared library consumed by AdvancedCore and other plugins. The repository now uses one Maven project and one source tree with platform-neutral and platform-specific packages; do not recreate the removed experimental submodule build.
4+
5+
## Build and verification
6+
7+
Requirements: JDK 21+ and Maven. The Maven project is in `SimpleAPI/`.
8+
9+
```shell
10+
mvn -B -f SimpleAPI/pom.xml test
11+
mvn -B -f SimpleAPI/pom.xml package
12+
```
13+
14+
Confirm current CI and POM settings before relying on these commands. Verify that the package invocation produced both the legacy/full artifact and every configured classifier, especially the `shared` JAR. Run `git diff --check` and confirm tests actually ran.
15+
16+
## Packaging boundaries
17+
18+
- `com.bencodez.simpleapi.core` contains platform-independent implementations.
19+
- Platform adapters belong under packages such as `com.bencodez.simpleapi.bukkit`; future Forge/Fabric/other adapters must remain isolated from core.
20+
- The full `simpleapi` artifact preserves existing consumers and public package names.
21+
- The `shared` classifier JAR contains only the explicitly selected neutral API. Because a classifier shares the project's ordinary POM, native consumers must exclude its transitives and explicitly declare the neutral dependencies they use, as documented in `docs/shared-libraries.md`.
22+
- Compatibility facades in older package names are intentional. Do not remove, relocate, or narrow them without an explicit migration and downstream verification.
23+
- Previously removed experimental coordinates such as `simpleapi-parent`, `simpleapi-core`, `simpleapi-configurate`, and `simpleapi-sql` are not current build modules.
24+
25+
Core and the shared artifact must not link Bukkit, BungeeCord, Velocity, Minecraft, Forge, Fabric, NeoForge, or other loader-specific classes. Test the packaged JAR, not only source imports: signatures, annotations, superclass references, static initializers, service descriptors, and reflective loading can leak platform dependencies.
26+
27+
## API and configuration compatibility
28+
29+
Treat public signatures, constructors, overloads, generic types, return values, exceptions, callback threading, configuration shapes, and serialized data as compatibility surfaces.
30+
31+
- Preserve legacy YAML key lookup, casing, literal-key behavior, defaults, numeric values, empty/missing distinctions, and copy isolation.
32+
- Keep structured/plain configuration views bounded and cycle-safe.
33+
- Shared configuration paths must reject or adapt native platform objects according to their documented contract; Bukkit adapters may preserve native `ConfigurationSection` behavior where promised.
34+
- Annotation binding must preserve inherited fields, supported value classification, nested traversal, and detached/rootless-section safety.
35+
- Database abstractions must keep connection ownership, transaction boundaries, timeouts, null/closed-connection handling, and shutdown behavior explicit.
36+
- Do not introduce hidden user extraction or Bukkit-only behavior into neutral APIs merely for a storage mode that is scheduled for removal.
37+
38+
## Concurrency, lifecycle, and resources
39+
40+
- Avoid blocking I/O on Bukkit, region, proxy, networking, or event threads.
41+
- Define callback execution context and preserve it across adapters.
42+
- Bound queues, caches, payloads, recursion, retries, and diagnostic output.
43+
- Handle cancellation, interruption, executor rejection, partial initialization, reload, and shutdown without leaked work.
44+
- Optional integrations must not cause class-loading failures when absent.
45+
46+
## Change and PR workflow
47+
48+
Keep changes focused and avoid unrelated formatting. Before any commit, push, PR update, review reply, or other remote change:
49+
50+
1. run relevant focused tests;
51+
2. run the full Maven package build;
52+
3. inspect the newly produced full and shared artifacts;
53+
4. run `git diff --check`;
54+
5. inspect the complete base-to-HEAD diff and affected AdvancedCore/downstream contracts.
55+
56+
For substantive changes, obtain a fresh source-read-only review. The implementation agent verifies and fixes accepted findings, reruns all required checks, and obtains a new review of the updated snapshot. Do not reuse an earlier clean verdict after changes, and do not merge without explicit authorization.

0 commit comments

Comments
 (0)