Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Design a small, well-typed Kotlin LIBRARY for a domain (a validation library, a query/HTML builder, a state machine). Show off the language: model the domain with SEALED class/interface hierarchies handled by exhaustive `when` (no else); use GENERICS with variance (out/in) where appropriate, and reified type parameters on an inline function where it helps; provide a type-safe BUILDER / DSL via lambdas-with-receiver; add EXTENSION functions and maybe an operator or infix function for ergonomics; use delegated properties (e.g. by lazy) where fitting; and keep everything null-safe and immutable-by-default. If it targets the JVM, demonstrate clean Java interop (@JvmStatic/@JvmOverloads) OR sketch how it would work as a Kotlin Multiplatform (expect/actual) module. Include tests and document the API.
Sealed hierarchies + exhaustive `when`; generics with correct variance; reified+inline where it helps; null-safe, immutable-by-default.
A type-safe builder/DSL (lambda-with-receiver); tasteful extension/operator/infix functions; delegated properties where fitting.
Clean Java interop (@JvmStatic/@JvmOverloads) or a credible KMP expect/actual sketch; tests pass; API documented.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A typed domain library with a DSL ## Goal Design a small, well-typed Kotlin LIBRARY for a domain (a validation library, a query/HTML builder, a state machine). Show off the language: model the domain with SEALED class/interface hierarchies handled by exhaustive `when` (no else); use GENERICS with variance (out/in) where appropriate, and reified type parameters on an inline function where it helps; provide a type-safe BUILDER / DSL via lambdas-with-receiver; add EXTENSION functions and maybe an operator or infix function for ergonomics; use delegated properties (e.g. by lazy) where fitting; and keep everything null-safe and immutable-by-default. If it targets the JVM, demonstrate clean Java interop (@JvmStatic/@JvmOverloads) OR sketch how it would work as a Kotlin Multiplatform (expect/actual) module. Include tests and document the API. ## Acceptance criteria - [ ] Type-system mastery: Sealed hierarchies + exhaustive `when`; generics with correct variance; reified+inline where it helps; null-safe, immutable-by-default. - [ ] Expressive API / DSL: A type-safe builder/DSL (lambda-with-receiver); tasteful extension/operator/infix functions; delegated properties where fitting. - [ ] Interop/KMP & quality: Clean Java interop (@JvmStatic/@JvmOverloads) or a credible KMP expect/actual sketch; tests pass; API documented. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.