/kanon-java-airails:ears-testsfrom kanon-java-airails
Generate parameterized (table-driven) tests from EARS requirement statements — the deterministic transform that turns an SBCE capability spec's `## Requirements` into one parameterized test per requirement group and one labeled row per statement id. Stack-neutral; owns only the EARS→table mapping and the spec↔test trace, and delegates the test syntax to the composed stack skill (JUnit 5, zunit, Playwright). Use whenever turning EARS requirements, acceptance criteria, or an SBCE/`/sbce` spec into tests; whenever you see "When/While/If…then, the … shall …" statements that need covering; or when asked for table-driven, data-driven, or parameterized tests from a requirement group. Triggers on "EARS", "parameterized tests", "table-driven tests", "data-driven tests", "tests from requirements", "tests from the spec", "cover requirement Rn", "generate tests for this capability", "acceptance criteria to tests".
Ships in kanon-java-airails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turn EARS requirement statements into parameterized tests. The leverage is structural: every
EARS pattern is a (condition → response) tuple, and an SBCE requirement group already
collects statements that share one boundary operation — same arrange/act skeleton, only the
data differs. That is the textbook precondition for parameterization, so the mapping is mechanical.
Own only the transform and the trace. The concrete test syntax is the composed stack skill's call — never name a runner or framework verb here. When the generated tests exercise the running system, the system-tests skill owns the contract (black box, coordinates as configuration, total verdict reporting).
Rn → one parameterized test method (the shared boundary op is the body).Rn.m → one row in the parameter source.Rn.m is the row's display name — so the spec↔test binding stays per-statement
and grep-visible, exactly as SBCE requires (a removed id retires its row; a row with no statement is drift).The system is always the BC. Each pattern decomposes into the arrange/act/assert columns of a row:
| Pattern | Statement shape | Arrange (state) | Act (trigger) | Assert (response) | Role |
|---|---|---|---|---|---|
| Event-driven | When <trigger>, the BC shall <response> | — | trigger | response | happy |
| Unwanted-behaviour | If <trigger>, then the BC shall <response> | — | bad/invalid trigger | rejection / error | unhappy |
| State-driven | While <precondition>, the BC shall <response> | precondition | (implicit) | response | stateful |
| Complex | While <precondition>, when <trigger>, the BC shall <response> | precondition | trigger | response | full tuple |
| Optional-feature | Where <feature>, the BC shall <response> | feature enabled | trigger | response | gated |
| Ubiquitous | The BC shall <response> | — | — | invariant | single case (least parameterizable — a plain test is fine) |
Mixing a happy When row and an unhappy If…then row in the same group's table is the norm — it is
how one parameterized method covers both the success and the rejection path of one boundary op.
EARS hands you the enumeration, not the data. Keep the two honestly separated so the generated test never silently asserts an assumption:
Rn.m row labels (in Java, the generated per-BC trace symbols), which boundary op the body calls,
the row role from the pattern, and the bijection check (every Rn.m ↔ exactly one row).<response>. EARS abstracts the response in prose ("create and confirm
an order") and carries no values — do not fabricate them. Emit a failing/TODO stub a human or a
later /sbce apply pass fills, so an unwritten assertion shows up red, not green.This skill is stack-neutral. The parameter-source mechanism and display-name form belong to the
composed stack skill — read references/realizations.md for the per-stack shape (JUnit 5
@ParameterizedTest + @MethodSource, zunit's table form, Playwright test.describe per group).
Java stacks materialize the Rn.m ids as a generated per-BC Requirement annotation with a nested
Rn enum — the label contract is unchanged because the enum's display form is the literal id; web
stacks and the black-box -st module keep literal strings. Pick the one the project already uses;
never introduce a second test idiom.
/sbce owns the spec and the stable Rn.m ids — this skill consumes them; it never edits the
spec or coins ids. During /sbce apply, this is how the spec→code "a traceable test per Rn.m"
step is realized when a group has ≥2 statements./bce owns where tests and the BC live; the stack skill owns the test syntax and the
"are you green?" oracle.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub themaverik/kanon --plugin kanon-java-airails8 skills in this plugin
/bceGeneric, composable architecture rules for the Boundary-Control-Entity (BCE/ECB) pattern — business components, layer responsibilities, package structure, and cross-component relationships. Technology-neutral; meant to be composed with language- or framework-specific skills (e.g. microprofile-server, web-components, aws-cdk, java-cli-app). Use when creating, generating, scaffolding, writing, or reviewing code organized as business components with boundary/control/entity layers. Triggers on "BCE", "ECB", "Boundary-Control-Entity", "business component", "BC layout", "BC structure", "boundary layer", "control layer", "entity layer", or requests to organize, package, refactor, or review code along BCE lines./continuous-testingContinuous test-driven development loop — after every code change, builds the project, starts the server, and runs Unit Tests, Integration Tests, and System Tests. Applies on top of microprofile-server skill. Use during development when you want full verification after each change. Triggers on "continuous testing", "continuous-testing", "test loop", "st-loop", or requests to run all tests after every change./java-conventionsGeneric, composable Java 25 code conventions — modern syntax, code style, naming, visibility, structure, methods, streams, exceptions, and documentation rules that apply across all Java contexts (single-file scripts, CLI apps, MicroProfile/Jakarta EE servers, libraries). Technology-neutral within the Java world; meant to be composed with context-specific skills (e.g. `java-cli-script`, `java-cli-app`, `microprofile-server`, `bce`). Use when writing, generating, or reviewing Java code anywhere the composed skill does not already specify style. Triggers on "Java conventions", "Java style", "Java code style", "modern Java", "Java 25", "idiomatic Java", or any request to write or review Java code where context-specific skills do not already cover style.