Scala 3.4+ Development Specialist
Functional programming, effect systems, and big data processing for JVM applications.
Quick Reference
Auto-Triggers: Scala files (.scala, .sc), build files (build.sbt, project/build.properties)
Core Capabilities:
- Scala 3.4: Given/using, extension methods, enums, opaque types, match types
- Akka 2.9: Typed actors, streams, clustering, persistence
- Cats Effect 3.5: Pure FP runtime, fibers, concurrent structures
- ZIO 2.1: Effect system, layers, streaming, error handling
- Apache Spark 3.5: DataFrame API, SQL, structured streaming
Key Ecosystem Libraries:
- HTTP: Http4s 0.24, Tapir 1.10
- JSON: Circe 0.15, ZIO JSON 0.6
- Database: Doobie 1.0, Slick 3.5, Quill 4.8
- Streaming: FS2 3.10, ZIO Streams 2.1
- Testing: ScalaTest, Specs2, MUnit, Weaver
Module Index
This skill uses progressive disclosure with specialized modules:
Core Language
- functional-programming.md - Scala 3.4 features: Given/Using, Type Classes, Enums, Opaque Types, Extension Methods
Effect Systems
- cats-effect.md - Cats Effect 3.5: IO monad, Resources, Fibers, FS2 Streaming
- zio-patterns.md - ZIO 2.1: Effects, Layers, ZIO Streams, Error handling
Frameworks
- akka-actors.md - Akka Typed Actors 2.9: Actors, Streams, Clustering patterns
- spark-data.md - Apache Spark 3.5: DataFrame API, SQL, Structured Streaming
Implementation Guide
Project Setup (SBT 1.10)
In build.sbt, set ThisBuild / scalaVersion to "3.4.2" and organization. Define lazy val root project with settings including name and libraryDependencies. Add dependencies for cats-effect, zio, akka-actor-typed, http4s-ember-server, circe-generic, and scalatest for test scope. Include scalacOptions for deprecation, feature warnings, and Xfatal-warnings.
Quick Examples
Extension Methods: Use extension keyword with parameter in parentheses. Define methods like words splitting on whitespace and truncate checking length before taking characters and appending ellipsis.
Given and Using: Define trait with abstract method signature. Create given instance with with keyword and implement the method. Create functions with using parameter clause for implicit resolution.
Enum Types: Define enum with generic type parameters and plus variance annotations. Create case entries with parameters. Define methods on enum using match expression to handle each case, returning appropriate results.
Context7 Integration
Library mappings for latest documentation:
Core Scala:
- /scala/scala3 - Scala 3.4 language reference
- /scala/scala-library - Standard library
Effect Systems:
- /typelevel/cats-effect - Cats Effect 3.5 documentation
- /typelevel/cats - Cats 2.10 functional abstractions
- /zio/zio - ZIO 2.1 documentation
- /zio/zio-streams - ZIO Streams 2.1
Akka Ecosystem:
- /akka/akka - Akka 2.9 typed actors and streams
- /akka/akka-http - Akka HTTP REST APIs
- /akka/alpakka - Akka connectors
HTTP and Web:
- /http4s/http4s - Functional HTTP server/client
- /softwaremill/tapir - API-first design
Big Data:
- /apache/spark - Spark 3.5 DataFrame and SQL
- /apache/flink - Flink 1.19 streaming
- /apache/kafka - Kafka clients 3.7
Testing Quick Reference
ScalaTest: Extend AnyFlatSpec with Matchers. Use string description with should in for behavior. Make assertions with shouldBe for equality checks.
MUnit with Cats Effect: Extend CatsEffectSuite. Define test with string name. Return IO containing assertEquals assertions.
ZIO Test: Extend ZIOSpecDefault. Define spec as suite with test entries. Use for-comprehension to run effects and yield assertTrue assertions.
Troubleshooting
Common Issues:
- Implicit resolution: Use scalac -explain for detailed error messages
- Type inference: Add explicit type annotations when inference fails
- SBT slow compilation: Enable Global / concurrentRestrictions in build.sbt
Effect System Issues:
- Cats Effect: Check for missing import cats.effect._ or import cats.syntax.all._
- ZIO: Verify layer composition with ZIO.serviceWith and ZIO.serviceWithZIO
- Akka: Review actor hierarchy and supervision strategies
Works Well With
- moai-lang-java - JVM interoperability, Spring Boot integration
- moai-domain-backend - REST API, GraphQL, microservices patterns
- moai-domain-database - Doobie, Slick, database patterns
- moai-workflow-testing - ScalaTest, MUnit, property-based testing
Additional Resources
For comprehensive reference materials:
- reference.md - Complete Scala 3.4 coverage, Context7 mappings, performance
- examples.md - Production-ready code: Http4s, Akka, Spark patterns
Last Updated: 2026-01-11
Status: Production Ready (v2.1.0)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: modu-ai-moai-adk-moai-lang-scala3description: Scala 3.4+ Development Specialist4---56# Scala 3.4+ Development Specialist78Functional programming, effect systems, and big data processing for JVM applications.910## Quick Reference1112Auto-Triggers: Scala files (.scala, .sc), build files (build.sbt, project/build.properties)1314Core Capabilities:1516- Scala 3.4: Given/using, extension methods, enums, opaque types, match types17- Akka 2.9: Typed actors, streams, clustering, persistence18- Cats Effect 3.5: Pure FP runtime, fibers, concurrent structures19- ZIO 2.1: Effect system, layers, streaming, error handling20- Apache Spark 3.5: DataFrame API, SQL, structured streaming2122Key Ecosystem Libraries:2324- HTTP: Http4s 0.24, Tapir 1.1025- JSON: Circe 0.15, ZIO JSON 0.626- Database: Doobie 1.0, Slick 3.5, Quill 4.827- Streaming: FS2 3.10, ZIO Streams 2.128- Testing: ScalaTest, Specs2, MUnit, Weaver2930---3132## Module Index3334This skill uses progressive disclosure with specialized modules:3536### Core Language3738- [functional-programming.md](modules/functional-programming.md) - Scala 3.4 features: Given/Using, Type Classes, Enums, Opaque Types, Extension Methods3940### Effect Systems4142- [cats-effect.md](modules/cats-effect.md) - Cats Effect 3.5: IO monad, Resources, Fibers, FS2 Streaming43- [zio-patterns.md](modules/zio-patterns.md) - ZIO 2.1: Effects, Layers, ZIO Streams, Error handling4445### Frameworks4647- [akka-actors.md](modules/akka-actors.md) - Akka Typed Actors 2.9: Actors, Streams, Clustering patterns48- [spark-data.md](modules/spark-data.md) - Apache Spark 3.5: DataFrame API, SQL, Structured Streaming4950---5152## Implementation Guide5354### Project Setup (SBT 1.10)5556In build.sbt, set ThisBuild / scalaVersion to "3.4.2" and organization. Define lazy val root project with settings including name and libraryDependencies. Add dependencies for cats-effect, zio, akka-actor-typed, http4s-ember-server, circe-generic, and scalatest for test scope. Include scalacOptions for deprecation, feature warnings, and Xfatal-warnings.5758### Quick Examples5960Extension Methods: Use extension keyword with parameter in parentheses. Define methods like words splitting on whitespace and truncate checking length before taking characters and appending ellipsis.6162Given and Using: Define trait with abstract method signature. Create given instance with with keyword and implement the method. Create functions with using parameter clause for implicit resolution.6364Enum Types: Define enum with generic type parameters and plus variance annotations. Create case entries with parameters. Define methods on enum using match expression to handle each case, returning appropriate results.6566---6768## Context7 Integration6970Library mappings for latest documentation:7172Core Scala:7374- /scala/scala3 - Scala 3.4 language reference75- /scala/scala-library - Standard library7677Effect Systems:7879- /typelevel/cats-effect - Cats Effect 3.5 documentation80- /typelevel/cats - Cats 2.10 functional abstractions81- /zio/zio - ZIO 2.1 documentation82- /zio/zio-streams - ZIO Streams 2.18384Akka Ecosystem:8586- /akka/akka - Akka 2.9 typed actors and streams87- /akka/akka-http - Akka HTTP REST APIs88- /akka/alpakka - Akka connectors8990HTTP and Web:9192- /http4s/http4s - Functional HTTP server/client93- /softwaremill/tapir - API-first design9495Big Data:9697- /apache/spark - Spark 3.5 DataFrame and SQL98- /apache/flink - Flink 1.19 streaming99- /apache/kafka - Kafka clients 3.7100101---102103## Testing Quick Reference104105ScalaTest: Extend AnyFlatSpec with Matchers. Use string description with should in for behavior. Make assertions with shouldBe for equality checks.106107MUnit with Cats Effect: Extend CatsEffectSuite. Define test with string name. Return IO containing assertEquals assertions.108109ZIO Test: Extend ZIOSpecDefault. Define spec as suite with test entries. Use for-comprehension to run effects and yield assertTrue assertions.110111---112113## Troubleshooting114115Common Issues:116117- Implicit resolution: Use scalac -explain for detailed error messages118- Type inference: Add explicit type annotations when inference fails119- SBT slow compilation: Enable Global / concurrentRestrictions in build.sbt120121Effect System Issues:122123- Cats Effect: Check for missing import cats.effect._ or import cats.syntax.all._124- ZIO: Verify layer composition with ZIO.serviceWith and ZIO.serviceWithZIO125- Akka: Review actor hierarchy and supervision strategies126127---128129## Works Well With130131- moai-lang-java - JVM interoperability, Spring Boot integration132- moai-domain-backend - REST API, GraphQL, microservices patterns133- moai-domain-database - Doobie, Slick, database patterns134- moai-workflow-testing - ScalaTest, MUnit, property-based testing135136---137138## Additional Resources139140For comprehensive reference materials:141142- [reference.md](reference.md) - Complete Scala 3.4 coverage, Context7 mappings, performance143- [examples.md](examples.md) - Production-ready code: Http4s, Akka, Spark patterns144145---146147Last Updated: 2026-01-11148Status: Production Ready (v2.1.0)149150---151> Converted and distributed by [TomeVault](https://tomevault.io/claim/modu-ai) — claim your Tome and manage your conversions.152<!-- tomevault:4.0:skill_md:2026-04-11 -->