What problem does it solve?
Maintaining consistent code generation across two build tools (sbt and Mill) for Golem agent projects is error-prone when each plugin reimplements discovery, validation, and rendering logic. This Skill guides changes to the shared codegen pipeline so both plugins stay behaviorally aligned.
Core Features & Use Cases
- Shared codegen pipeline: Source discovery, validated semantic IR (AgentSurfaceIR, ToolProjectionIR), and source rendering live in
sdks/scala/codegen/, keeping sbt and Mill integrations thin.
- RPC and tool client generation: Mode-aware durable and ephemeral client generation with correct signatures for
get, newPhantom, apply, cancelable, and trigger/schedule receipts.
- Cross-version constraints: Shared sources must compile on Scala 2.12.21 (sbt) and Scala 3.8.2 (Mill/repository build), avoiding Scala-3-only syntax.
- Use Case: When adding a new generated RPC method, update
RpcCodegen.scala and the IR once, then verify both plugins with sbt "++3.8.2; codegen/test" and the Mill fixtures instead of patching each plugin separately.
Quick Start
Ask the assistant to add a new generated tool client method to the Golem Scala codegen pipeline and verify it with the codegen tests on both Scala versions.