Java Code One Task
| This documentation was generated with the assistance of AI. Please report any inaccuracies. |
Carry out a single task’s implementation, tests, and checkbox update against the real codebase — nothing else.
This is the narrowest execution unit in the iru-code pipeline: iru-java-code-one-task-group calls it once per
task in a bucket (potentially many at once, in parallel agents).
Purpose
iru-java-code-one-task is the Java-specific implementation worker iru-java-code-one-task-group calls once per task.
Given one task’s own text (what to build, the named file(s)/class(es)/method(s), the described behavior, its
exact implementation_plan.md checkbox line(s), and any sub-tasks), it loads whichever of its own bundled Java
code agreements the task needs, re-checks the current code state, implements exactly what’s specified, and
writes/updates JUnit tests. If the task didn’t stop on a blocker, it
then immediately checks off that task’s own checkbox (and its sub-tasks') in implementation_plan.md with a
"group validation pending" note, before reporting back — so an interrupted run doesn’t re-attempt work that
already landed, even if the interruption happens before the group’s own validation runs. License headers,
Javadoc audits, scoped tests, coverage, the full suite, code-quality regression checks, and replacing the pending
note with the final validation outcome no longer happen here; they moved to iru-java-code-one-task-group, which
validates them once for the whole bucket of tasks instead of once per task, cutting the redundant tool
invocations that used to happen here for every single task. It hands back only a short summary; it never
captures a quality baseline or runs any test/coverage/quality check itself.
The bundled reference library
This skill ships a reference/ directory alongside its SKILL.md, holding this catalog’s general Java code
agreements — the framework-independent conventions new code is expected to follow. It is read by
progressive disclosure: reference/README.md is a short routing table, two files are always read, and the
others only when the task’s shape calls for them, so a one-method change doesn’t pay for the whole library.
One of the always-read files, mandatory-rules.md, is different in kind from the rest: its rules are
non-negotiable and take precedence over "match the surrounding code" for every line the skill writes or
rewrites — production and test code alike. They still don’t license restyling untouched code; a pre-existing
violation found in a touched file is left alone and named in the report.
The Spring Boot counterpart, Java Spring Boot Code One Task, ships its own reference/
covering hexagonal module boundaries, DDD, SOLID, and the distributed patterns. Everything in this directory
still holds there; the two libraries are complementary rather than alternatives.
| File | Read when | Covers |
|---|---|---|
|
Always |
The non-negotiable rules. Tests: JUnit assertions, never AssertJ; Mockito mocks or spies, never hand-written fake
implementations (an abstract class is tested through a |
|
Always |
Type inference — |
|
The task adds a new type, or adds/moves a member in an existing one |
The public-to-private declaration order every type follows — static constants, static fields, instance fields, static initialisers, constructors, methods, then nested types, each band ordered public → protected → package-private → private. Plus the two cross-cutting rules: overloads stay contiguous and sit where their most visible member would, and a private helper lives in the private band rather than next to its caller. Includes an annotated skeleton class, the variations for interfaces/enums/records, and the rules for applying the order to an existing file without producing an unreviewable diff. |
|
The task adds or changes a type or a public/protected member |
Full Javadoc as a hard requirement — on every type, method, constructor, and field, private ones and test sources
included: a standalone summary sentence, the caller’s contract, |
|
The task writes or updates tests — nearly every task |
The fixed rules from |
The declaration-order rules are the ones with a downstream consequence: iru-java-code-quality runs Checkstyle’s
DeclarationOrder and OverloadMethodsDeclarationOrder one gate later, in the task group, so getting the order
right while writing the code is what keeps that gate green.
Every file states the same override: the rules are the default for new code, and a file that consistently does something else wins. A divergence is reported rather than silently converted, because restyling untouched code turns a two-line change into an unreviewable diff.
Plugin
Shipped by the iru-java plugin of the ai-catalog marketplace (install with /plugin install iru-java@ai-catalog; see Plugins).
Inputs
| Argument | Required | Description | Default |
|---|---|---|---|
|
Yes |
The task’s full text as written in |
None — this skill has nothing to do without a task description. |
|
No |
The skill’s own bundled reference directory. If it is missing (the skill directory was copied without it), the
skill falls back to the repository’s |
Bundled with the skill |
Outputs
-
Source and test files created/modified per the task, following
reference/mandatory-rules.mdin full and the rest of the bundledreference/agreements —varandfinalas the defaults for new code, public-to-private declaration order with overloads kept together, full Javadoc on every type, method, constructor, and field — plus this repository’s ownCLAUDE.mdconventions (Java version, license header expectations, banned dependencies) where they are more specific, and the surrounding file’s existing style wherever it consistently differs (except for the mandatory rules). -
JUnit tests added/updated covering the new/changed behavior, including a case per documented
@throws— one<ClassName>Testper public class, methods namedmethodBeingTested_whenCondition_expectedResult, JUnit assertions and Mockito mocks/spies only — not run by this skill; the caller runs them once for the whole bucket. -
implementation_plan.mdwith this task’s own checkbox (and its sub-tasks') checked off and a "group validation pending" note, written immediately once the task finishes cleanly — before this skill reports back, and before the caller’s own group-wide validation runs. Left untouched if the task stopped on a blocker. -
A short summary handed back to the caller: file(s) touched, tests added/updated, whether the run stopped on a blocker, and any deliberate deviation from
reference/(a file that doesn’t usevar, a class left non-final because a framework proxies it or the project’s Mockito can’t mock it, a file whose existing member order is already wrong) so it reads as a decision rather than an oversight — plus any pre-existing violation of the mandatory rules noticed in a touched file (AssertJ, fakes, shared test classes, platform line endings) and left alone because it was outside the task’s scope.
Execution flow
A conflict between reference/ and the surrounding code is deliberately not a stop condition — the skill
follows the surrounding code and reports the divergence in Step 7, except for mandatory-rules.md, which new code
follows regardless.
Dependencies
Invokes
None — iru-java-code-one-task is a leaf skill; it does not call any other skill in this catalog. It reads its own
reference/ directory and edits the code and test files the task names. License headers, Javadoc audits, scoped
tests, coverage, and quality checks all moved to iru-java-code-one-task-group.
Invoked by
-
Java Code One Task Group — Step 2, once per task in a bucket (concurrently, in a single batch of
Agentcalls, when the group is markedParallelizable: yes; one at a time otherwise), via theiru-isolated-skill-executoragent, passing that task’s full text including its exact checkbox line(s). That caller re-readsimplementation_plan.mdafterward to confirm the checkbox this skill already flipped landed, backfilling it only if a rare concurrent-write race clobbered it, then replaces the "pending" note with the final validation outcome once the whole bucket’s validation passes.
Source
SKILL.md on GitHub — the file this page was generated from. The bundled Java code agreements live alongside it under reference/.