kotlin-best-practices
Kotlin Best Practices — Quick Reference
Null Safety
!! is banned. Use ?., ?:, or null check for smart cast.
See code-patterns.md for all null safety examples.
Either Error Handling
Managers return Either<ClientException, T> -- never throw. Controllers unwrap with .throwOrValue().
See code-patterns.md for manager + controller examples.
Enum Usage
Never hardcode strings when an enum exists. Use EnumName.VALUE.value everywhere.
See code-patterns.md for enum definition and usage patterns.
More from spartan-stratos/spartan-ai-toolkit
ops-investigate-alert
Investigate a monitoring alert end-to-end. Pulls metrics, logs, traces, and recent code changes to identify root cause. Works with any monitoring MCP.
10startup-pipeline
Coordinates the full startup idea pipeline from brainstorm to investor outreach. Use when the user starts a new idea project, asks for the 'full pipeline', or references stages/gates.
9terraform-service-scaffold
Generate complete service-level Terraform infrastructure with modules, environments, and CI/CD. Use when adding Terraform to a new service or bootstrapping infrastructure from scratch.
8investor-outreach
Draft cold emails, warm intro blurbs, follow-ups, and investor communications. Use when the user needs to write to angels, VCs, or accelerators.
8article-writing
Write blog posts, guides, tutorials, and long-form content. Sounds like a real person, not AI. Use when the user wants polished written content.
8market-research
Run market research, competitive analysis, investor due diligence, and industry scans. Use when the user wants market sizing, competitor comparisons, fund research, or tech scans.
8