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, one file is 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.
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 |
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: a standalone summary sentence, the caller’s contract, |
|
The task writes or updates tests — nearly every task |
Matching the package’s existing test conventions before introducing any of your own; what to cover (the changed
behaviour through the public API, one test per documented |
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.
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 the bundled
reference/agreements —varandfinalas the defaults for new code, public-to-private declaration order with overloads kept together, full Javadoc on every type and public/protected member — 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. -
JUnit tests added/updated covering the new/changed behavior, including a case per documented
@throws— 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.
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.
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/.