| name | jaipilot-fast-execution |
| description | Reduce wall time for substantial Java repository builds, tests, analyzers, and benchmarks through resource-aware batching and safe native parallelism. Use for slow Maven or Gradle work, CI-parity runs, large test suites, or requests to execute Java verification faster without weakening it. |
Run substantial Java commands efficiently
Minimize end-to-end wall time, not merely one command's displayed duration. Preserve the controlling
task's exact behavior, coverage, measurement, and final-verification requirements. Never skip work,
weaken a gate, raise a timeout, change test semantics, or edit repository configuration just to make
a run appear faster.
Every JAIPilot workflow should use this skill for substantial command work whenever independent
batching or bounded native parallelism can reduce total wall time without changing the required
proof. Parallelism is a default optimization opportunity, not permission to assume independence or
create contention.
Size work to the real machine
- Read repository instructions, wrappers, build configuration, modules, CI commands, required
services, configured test forks, and effective Java version.
- Determine usable CPU and memory from the execution boundary. On Linux, inspect
getconf _NPROCESSORS_ONLN and cgroup v2 cpu.max and memory.max when present; a container's
quota matters more than host totals.
- Choose one bounded worker count
N: at least one, no greater than usable CPUs, and lower when
build JVMs, test forks, services, or memory make saturation unsafe. Record N and non-secret
resource evidence.
- Classify substantial work as CPU-, memory-, I/O-, network-, or shared-state-bound. More workers
are not faster when they create contention, throttling, or nondeterminism.
Batch without corrupting evidence
- Prefer one targeted
rg traversal, one Git query with all pathspecs, batched reads, and one
script invocation over repeated per-file subprocesses.
- Run independent read-only discovery or isolated scripts concurrently up to
N. Keep output
attributable and propagate every exit status.
- Prefer native parallelism in the compiler, analyzer, test runner, or build graph over multiple
top-level builds.
- Give concurrent application or tool runs separate temporary directories, ports, databases, and
outputs. Do not invent concurrency around global state, ordered tests, rate-limited services, or
a shared database.
- Never run concurrent Git writers, dependency resolvers, or Maven/Gradle processes against the
same checkout and output tree. Never overlap performance measurements; contention invalidates
comparison.
Spend full builds where they prove something
- Identify the normal clean verification and the smallest focused command. Run the required clean
baseline once, retain safe dependency and wrapper caches, and iterate with the affected module,
class, or task.
- Keep comparable performance commands, profiles, environment, worker flags, and workload selection
identical.
- Run the final repository-native clean verification once after the diff stabilizes. Confirm the
intended tests and analyzers executed.
- Time material commands and report wall time, concurrency, and outcome. Separate dependency
resolution, compilation, tests, analysis, and workload measurement when possible.
Maven and Gradle
- Prefer
./mvnw. Use reactor -T N only for thread-safe lifecycle work; a non-thread-safe-plugin
warning or concurrency-only failure requires the serial command for proof. During iteration, use
-pl <module> -am and focused Surefire/Failsafe selection when repository conventions allow it.
- Prefer
./gradlew. Use --parallel --max-workers=N only when the project graph and repository
guidance permit it. Iterate with affected tasks such as :module:test --tests <class>.
- Reuse populated caches. Do not purge dependencies, force snapshot updates, inject test forks,
enable configuration or remote caches, or add build properties without repository evidence and
user approval.
If acceleration plausibly causes a failure, run the repository-native serial equivalent once. If
serial passes, stop using the unsafe option and report the fallback; if serial also fails, preserve
the real failure. Never retry blindly or kill unrelated processes.
Default substantial compilation, test, analysis, profiling, benchmark, and toolchain execution to
the jaipilot-remote-java skill whenever the laptop provides no concrete advantage. Keep it local
only for private network or artifact access, unavailable secrets or services, machine-specific
state, a command too small to justify workspace setup, or remote unavailability.
Report
Return the execution boundary, resource evidence, N, batching and native-parallelism choices,
exact commands, material durations, outcomes, serial fallbacks, cache assumptions, and any proof
that remained unavailable. Treat workflow acceleration and product performance as separate claims.