Add Kotlin Toolchain skills - #56
Conversation
|
eval info: there was only one data point in dataset with the following prompt: "Create a Kotlin project with Android and iOS platforms" skill tested: 10 trials with 2 models (10 trials each): Claude Opus 5 and Claude Sonnet 5 harness: Claude Code (via harbor) Graders were deterministic:
the result: without skill agents created a Gradle project and there were 7-9 Gradle calls the example of tokens amount for Opus 5 Significantly less tokens and the cost Experiment has been conducted only for project initialization, but the dataset will be expanded in future |
| proxies into them, pinning the project to the wrapper's version. Always invoke `kotlin` from the project | ||
| root so the wrapper wins; never call a globally installed binary directly when a wrapper exists. | ||
|
|
||
| ## CLI commands |
There was a problem hiding this comment.
Given that the set of commands may change in the future, maybe it's better to provide a generic hint on how for the agent can get an overview of the available commands?
| ``` | ||
| project-root/ | ||
| ├── kotlin, kotlin.bat # Local wrappers | ||
| ├── project.yaml # Project-level config |
There was a problem hiding this comment.
Should this skill also contain an example for project-level config?
There was a problem hiding this comment.
I'll add that as examples in references/ to the skill
| ## Templates | ||
|
|
||
| A template extracts reusable `module.yaml` sections into a `<name>.module-template.yaml` file (same | ||
| structure as `module.yaml`) that modules pull in via an `apply:` list of relative paths. It's a general |
There was a problem hiding this comment.
Is there a convention for where templates should be located?
There was a problem hiding this comment.
no, there is no convention, but yeah, I'll add one sentence about it
|
|
||
| The Toolchain ships no bundled linters — `tests` is the only built-in check. detekt, ktlint, and | ||
| API-compatibility verification must be registered as local-plugin tasks under `checks:` in `plugin.yaml`. | ||
| Invoking a linter binary directly or wiring in a Gradle plugin bypasses the check pipeline. |
There was a problem hiding this comment.
Is it possible to use Gradle plugins in the Kotlin toolchain? 🤔
There was a problem hiding this comment.
sure, it's better not to mention Gradle here in order not to steer agents, which are even without anything trying to wire up Gradle with Kotlin Toolchain anyway, I think I'll just remove this one
| user explicitly asks. | ||
|
|
||
| For anything the declarative YAML cannot express, use a local plugin — that is the supported escape hatch. | ||
| Toolchain cannot consume Gradle plugins: reimplement the behaviour instead of adapting one. When a |
There was a problem hiding this comment.
Should we here reference the kotlin-tooling-gradle-to-kotlin-toolchain-plugin skill?
| Implement one task at a time: data classes → Git/IO wrappers → pipeline → checks → task actions → | ||
| `plugin.yaml` wiring. | ||
|
|
||
| ### 4. Validate against a demo module |
There was a problem hiding this comment.
Do toolchain plugins have testing support? If so, I think the first thing the agent should do is write tests covering the semantics of the Gradle plugin.
| version: "0.1.0" | ||
| --- | ||
|
|
||
| # Gradle → Kotlin Toolchain Plugin Conversion |
There was a problem hiding this comment.
Should this skill reference kotlin-tooling-kotlin-toolchain-plugin-authoring one?
|
|
||
| # Kotlin Toolchain Plugin Authoring | ||
|
|
||
| Local plugins are the official escape hatch from declarative YAML: a `jvm/amper-plugin` module shipping |
There was a problem hiding this comment.
amper-plugin is still valid name?
There was a problem hiding this comment.
yes, it's still valid, we haven't renamed that yet
| --- | ||
| name: kotlin-tooling-gradle-to-kotlin-toolchain-project | ||
| description: > | ||
| Load when migrating or converting an entire Gradle Kotlin/JVM project |
There was a problem hiding this comment.
KMP project is also migratable?
| Write the inventory down (e.g. `MIGRATION_PLAN.md`) before any YAML; it becomes the checklist the PR | ||
| description verifies. | ||
|
|
||
| - **Plugins** in the `plugins { }` block, each sorted into native / local plugin. Native covers |
There was a problem hiding this comment.
Should it also check gradle.properties?
Adds four new skills covering the Kotlin Toolchain:
kotlin-tooling-kotlin-toolchain— building, running, testing, packaging, linting, and configuring Kotlin/Java projects with the Kotlin Toolchain.kotlin-tooling-kotlin-toolchain-plugin-authoring— authoring local Kotlin Toolchain plugins.kotlin-tooling-gradle-to-kotlin-toolchain-plugin— porting a single Gradle plugin to a Kotlin Toolchain local plugin.kotlin-tooling-gradle-to-kotlin-toolchain-project— migrating an entire Gradle Kotlin/JVM project to the Kotlin Toolchain.