Why a skill, and not just good docs
Your assistant has never seen this framework
Ask any coding assistant to write a Java agent today and you will get one of two things:
a LangChain4j AiServices interface, or a Spring AI ChatClient
builder chain. Both are perfectly good libraries. Neither is jOpenAgent, and neither
compiles against it.
Even when you paste in the README, models get the one mechanic that matters wrong. They
write a @Generative method with a real implementation in the body, or they
put the prompt in a javadoc comment where Java throws it away at compile time, or they
call generate() from a helper method so the stack walk resolves the wrong
caller. These are not silly mistakes. They are exactly what you would guess if you were
reasoning from every other Java framework you had ever read.
So we wrote the rules down in the format assistants actually load. The skill is about 270 lines. It covers the trampoline rule first, because that is the thing everyone gets wrong on the first try.
The rule the skill leads with
@Generative("Classify the ticket.")
protected Category classify(String ticketText) {
return generate(ticketText); // interception point
}
A @Generative method has a real body, and that body must end in
return generate(...). No proxy, no bytecode generation. The stack walk
resolves the immediate caller, so wrapping it behind a helper breaks it.
Statements before the generate(...) call run as ordinary Java, which is
where setup and validation go.