Languages
Cascade ships with eight built-in language profiles. Each profile bundles the conventions, tooling, and LLM guidance for that language. The pipeline reads the profile and adapts.
Built-in languages
Section titled “Built-in languages”| Language | Detection | Test command |
|---|---|---|
| Python | pyproject.toml, setup.py, requirements.txt | pytest |
| TypeScript | tsconfig.json | npx vitest run |
| JavaScript | package.json | npx vitest run |
| Go | go.mod | go test ./... |
| Rust | Cargo.toml | cargo test |
| Java | pom.xml, build.gradle | mvn test |
| Ruby | Gemfile, Rakefile | bundle exec rspec |
| C# | *.csproj, *.sln | dotnet test |
How detection works
Section titled “How detection works”When you run a Cascade command, the language is resolved in this order:
- Explicit override in
cascade.yaml(language: go) - CLI flag (
--language rust) - Auto-detection from marker files in the repo root
Polyglot repos: the highest-priority profile wins. So a repo with both pyproject.toml (Python, priority 60) and go.mod (Go, priority 90) is detected as Go. If that’s wrong for your project, set language explicitly in cascade.yaml.
What each profile defines
Section titled “What each profile defines”file_extensions: which extensions Cascade considers part of the languagesource_dir_default: where new source files go (srcfor Python,.for Go)test_dir_default: where tests go (testsfor Python,.for Go inline)test_file_glob: how test files are named (test_*.py,*_test.go)test_command: what runs to validate generated codeinstall_command: how to install dependenciestype_check_command: optional type check before running testsdetection_files: marker files that identify this languagenotes_for_llm: language-specific guidance passed to the LLM in prompts
Adding a language
Section titled “Adding a language”A new language is one entry in src/cascade/languages.py:
KOTLIN = LanguageProfile( name="kotlin", display_name="Kotlin", file_extensions=(".kt", ".kts"), source_dir_default="src/main/kotlin", test_dir_default="src/test/kotlin", test_file_glob="*Test.kt", test_command=("gradle", "test"), install_command=("gradle", "build", "-x", "test"), type_check_command=None, formatter_command=("ktlint", "--format"), detection_files=("build.gradle.kts", "settings.gradle.kts"), detection_priority=75, notes_for_llm=( "Idiomatic Kotlin: prefer val over var, use data classes, " "use expressions over statements. Tests with JUnit 5 + MockK." ),)Add it to the PROFILES registry and submit a PR. That’s it.