YantrikDB/packs
Sign in
officialyantrikdbsigned

java-stdlib

yantrik/java-stdlib@0.2.0·66 facts·1220 KB·9 downloads·by spranab

The Java standard library's actual API surface, disassembled from the local JDK with javap: exact method signatures for the sixty classes agent code touches most — collections, streams, files, HTTP client, time, concurrency — correct by construction, never from memory. Complements yantrik/java-modern (idioms and style) with ground truth aimed at the measured failure mode of local models: invented methods and wrong signatures.

covers

Java standard library class and method signatures · Java collections, streams and optionals · Java file, path and process operations · Java HTTP client, URI and networking · Java time, dates, formatting and duration · Java concurrency, executors, futures and virtual threads

rules this pack installs (7)

Injected on every turn while mounted. Shown verbatim — a pack's rules are public by design.

Verify the method before writing the call: Before calling a standard-library method, recall its signature from this pack. If the pack has no record of the method, say so and use a documented alternative — never write a call from memory alone.
No invented APIs: Call only methods the recalled signatures show. If a convenience method seems like it should exist (String.capitalize, List.first before 21, Files.readLines), check — it usually does not.
Prefer the modern spelling: `Path.of` over `Paths.get`; `Files.readString`/`writeString` over manual readers; `java.net.http.HttpClient` over `URLConnection`; `java.time` over `java.util.Date` and `Calendar`; records over getter-setter beans; `List.of`/`Map.of` for fixed data; `Executors.newVirtualThreadPerTaskExecutor` for I/O-bound concurrency.
Checked exceptions are part of the signature: The fences show `throws` clauses. Handle or declare exactly those — IOException on Files calls, InterruptedException on waits — and never swallow InterruptedException without re-interrupting the thread.
Immutability is the default: `List.of` and `Map.of` return immutable collections that throw UnsupportedOperationException on mutation; wrap in `new ArrayList<>()` when mutation is needed. Strings are immutable — repeated `+=` in a loop is quadratic; use StringBuilder.
Version-gate anything newer than 17: Virtual threads and `SequencedCollection` (`getFirst`/`getLast`) are 21+; `Math.clamp` and unnamed variables are 21+/22+. If the project targets 17 or 11, use the compatible spelling.
State the source of an uncertain claim: If asked about an API this pack does not cover, prefix the answer with the fact that it is from model memory, unverified against the local JDK.

evaluation notes

skills.constitution — pack installs 7 always-on rule(s); they are shown verbatim on the listing for review

install

Native client — verifies against the registry, then installs:

curl -O https://packs.yantrikdb.com/client/yantrik_pack_client.py
python yantrik_pack_client.py install yantrik-java-stdlib

Manual — download first, then:

yantrikdb pack info java-stdlib-0.2.0.ydbpack
yantrikdb pack install java-stdlib-0.2.0.ydbpack

Verify any copy of this file, wherever it came from:

curl "https://packs.yantrikdb.com/api/v1/verify?sha256=a05bd20e7827121f51328b5afe1af1f246401734b5bdf774065e50c964950529"

get it

Download 0.2.0
sha256
a05bd20e7827121f51328b5afe1af1f246401734b5bdf774065e50c964950529
digest
blake3:eac0df0297e50445350578c03dc9d6c1ffa2f17a71e2dd9ffe8190cb21c96879
signer
13a9232bc7829ea6a03e4bd6a0706c08f80ff4a2ecc83fd10062314acfb59683

versions

0.2.0 2026-08-03 download
0.1.0 2026-07-30 download