kotlin — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited kotlin (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Idiomatic Kotlin coding rules for production code in SKaiNET. Covers package layout, API stability, nullability, sealed hierarchies, and the expect/actual boundary. Style topics that are project-specific.
.kt file under any module's commonMain/, jvmMain/, or platform-specific main source set.@PublishedApi discipline).data class, value class, sealed class, sealed interface, or object.tensor { }, pipeline<...>(), sequential<...> { }, or dag { } block — those are the DSL skills.build.gradle.kts, settings.gradle.kts, libs.versions.toml, or files under build-logic/ — that's gradle-multimodule.skainet-testing.kmp.public, internal, private). Do not write fun foo() at top level — write public fun foo() or internal fun foo().src/<sourceset>/kotlin/sk/ainet/.... Do not introduce new top-level packages.val, var) — never getFoo() / setFoo() on a Kotlin class. Java consumers reach Kotlin through the dedicated facades in sk/ainet/java/ (covered by skainet-java-interop).data class.sealed class / sealed interface. Do not use enum class if the variants carry data (see InitializationType in TensorDSL.kt).T? type means "callers must handle absence." Never use !! to silence the compiler outside a documented invariant — prefer requireNotNull(x) { "<reason>" } so the failure is loud.CoroutineScope provided by the caller; never launch into GlobalScope. Hot streams use Flow; cold one-shot APIs use suspend functions.*.api changed, regenerate the dump (./gradlew apiDump) and own the change in the same commit — don't suppress the check.inline fun.sk.ainet.<area> package the change belongs to. Don't create a new package without strong justification.skainet-java-interop for the facade — keep the Kotlin definition idiomatic.*.api dump, regenerate it (./gradlew :module:apiDump) and include the diff in the same change.Explicit API + sealed hierarchy (used for tensor initialisation):
public sealed class InitializationType<out V> {
public object Zeros : InitializationType<Nothing>()
public object Ones : InitializationType<Nothing>()
public data class Fill<V>(val value: Number) : InitializationType<V>()
public data class Normal<V>(val mean: Float, val std: Float, val random: Random) : InitializationType<V>()
public data class Uniform<V>(val min: Float, val max: Float, val random: Random) : InitializationType<V>()
public data class Custom<V>(val generator: (indices: IntArray) -> V) : InitializationType<V>()
public data class RandomCustom<V>(val generator: (random: Random) -> V, val random: Random) :
InitializationType<V>()
}
// from: SKaiNET/skainet-lang/skainet-lang-core/src/commonMain/kotlin/sk/ainet/lang/tensor/dsl/TensorDSL.kt:272-281Data-shape DSL with explicit visibility on every entry point:
@TensorDsl
public fun <T : DType, V> tensor(
executionContext: ExecutionContext,
dtype: KClass<T>,
content: TensorDefineDsl<T, V>.() -> Tensor<T, V>
): Tensor<T, V> { ... }
// from: SKaiNET/skainet-lang/skainet-lang-core/src/commonMain/kotlin/sk/ainet/lang/tensor/dsl/TensorDSL.kt:17-25Module-level KMP plugins (so explicit-API is enforced):
kotlin {
explicitApi()
// ... targets ...
}
// from: SKaiNET/skainet-lang/skainet-lang-core/build.gradle.kts:14-16commonMain vs jvmMain vs iosArm64Main) — see ../kmp/SKILL.md.../gradle-multimodule/SKILL.md.../skainet-java-interop/SKILL.md.// WRONG — implicit visibility, will fail explicit-API check
fun computeDiff(expected: Float, actual: Float): Float = expected - actual// RIGHT
public fun computeDiff(expected: Float, actual: Float): Float = expected - actual// WRONG — Java-style accessors on a Kotlin class
public class Layer { fun getInChannels(): Int = inChannels }// RIGHT — Kotlin property
public class Layer { public val inChannels: Int get() = ... }// WRONG — variants with payload as enum
public enum class InitKind { ZEROS, ONES, FILL /* value? */ }// RIGHT — sealed hierarchy carries data
public sealed class InitializationType<out V> { ... }// WRONG — `!!` silently asserts a hidden invariant
val x = map[id]!!// RIGHT — surface the invariant in the failure message
val x = requireNotNull(map[id]) { "missing layer id=$id" }references/style-rules.md — explicit-API, package, naming, KDoc rules with one-line examples.references/api-stability.md — binary-compatibility-validator workflow and @PublishedApi discipline.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.