Language support
Language support has separate parts. Outlines describe which source structure can be retained at reduced detail. Local references identify supported imports, links, or symbols. Project metadata supplies roots and visibility for resolving those references within the scanned inputs.
A supported reference form does not guarantee a resolved dependency. The target must be present, and its path or name must be statically understood.
Capability table
The files column lists registered extensions and exact filenames. The outline column describes captured structure, rather than promising compiler-equivalent understanding of every construct.
| Language | Recognized files | Outlines | Local references | Project metadata |
|---|---|---|---|---|
| Bash | .sh, .bashrc, .bash_profile, .profile | Functions and shell structure | Literal source and dot commands | — |
| C | .c, .h | Declarations and preprocessor structure | #include | CMake, compilation database, include roots |
| C# | .cs, .csx | Types, namespaces, and declarations | Using directives and qualified names | .csproj references |
| C++ | .cpp, .cc, .cxx, .c++, .C, .hpp, .hh, .hxx, .h++, .H, .ipp, .tpp, .inl, .cppm, .ixx, .mpp, .cxxm, .ccm | Declarations, classes, and modules | Includes and module imports | CMake, compilation database, include roots |
| CMake | .cmake, CMakeLists.txt | Commands and target structure | Includes, subdirectories, sources, targets | CMakeLists.txt |
| CSS | .css | Rules, declarations, and conditional headers | @import, CSS modules, local assets | Node workspace metadata |
| Dockerfile / Containerfile | .dockerfile, .containerfile, Dockerfile, Containerfile | Instructions and stages | Local COPY and ADD sources | — |
| Elixir | .ex, .exs | Modules and declarations | Aliases, imports, require, use | mix.exs |
| Go | .go | Declarations and types | Imports, directory peers, embedded paths | go.mod, go.work |
| GraphQL | .graphql, .gql, .graphqls | Types, operations, and fragments | Fragment spreads and import comments | — |
| HCL / Terraform | .hcl, .tf, .tfvars, .terraform.lock.hcl | Blocks and attributes | Local modules, file/template calls, directory peers | Terraform directory roots |
| HTML | .html, .htm | Elements and embedded syntax | Local links, scripts, styles, assets | Node workspace metadata |
| Java | .java | Classes, records, and declarations | Packages, imports, qualified names | Maven, Gradle, SBT metadata |
| JavaScript / JSX | .js, .jsx, .mjs, .cjs | Declarations and exports | Imports, re-exports, literal module calls | Node packages and workspaces |
| JSON | .json | Object keys and values | $ref, $schema | Node metadata, Kustomize roots |
| Just | .just, justfile, .justfile, Justfile | Recipes, modules, and assignments | Imports, modules, and recipe dependencies | Justfile source roots |
| Kotlin | .kt, .kts | Declarations and types | Packages, imports, qualified names | Maven, Gradle, SBT metadata |
| Lua | .lua | Functions and declarations | require, dofile, loadfile | Rockspec metadata |
| Make | .mk, .mak, .make, Makefile, makefile, GNUmakefile | Targets, rules, and assignments | Literal includes and prerequisites | Makefile source roots |
| Markdown | .md, .markdown, .mdown, .mkd | Headings, blocks, and fenced code | Local links and images | — |
| PHP | .php, .phtml, .php3, .php4, .php5, .phps | Classes, namespaces, and declarations | Namespace imports and literal includes | Composer autoload metadata |
| Protocol Buffers | .proto | Messages, enums, and services | Imports and qualified names | buf.yaml roots |
| Python | .py, .pyi, .pyw | Declarations and docstrings | Imports, package initializers, and literal dynamic imports | pyproject.toml, setup files |
| R | .r, .R | Functions and assignments | Source calls and package references | DESCRIPTION |
| reStructuredText | .rst, .rest | Sections and directives | Include and image directives, Sphinx toctrees | — |
| Ruby | .rb, Gemfile, Rakefile, Brewfile, Vagrantfile | Classes, modules, and declarations | require, require_relative, load, autoload | Ruby manifests |
| Rust | .rs | Declarations and implementations | use, mod, include macros | Cargo manifests and workspaces |
| Scala | .scala, .sc | Classes, objects, traits, and declarations | Import/export selectors and qualified names | Maven, Gradle, SBT metadata |
| SCSS | .scss | Rules, declarations, and mixins | Imports, @use, @forward, supported assets | Node workspace metadata |
| SQL | .sql, .pgsql | Statements and schema declarations | Schema-object references | — |
| Svelte | .svelte | Component structure and embedded syntax | Host assets and embedded imports | Node packages and workspaces |
| Swift | .swift | Declarations and extensions | Imports and local symbols | Package.swift |
| TOML | .toml | Table headers, keys, and values | No extractor | — |
| TSX | .tsx | Declarations, types, and JSX | Imports and module references | Node packages, TypeScript configuration |
| TypeScript | .ts, .mts, .cts | Declarations, types, and exports | Imports and module references | Node packages, TypeScript configuration |
| Vue | .vue | Component structure and embedded syntax | Host assets and embedded imports | Node packages and workspaces |
| YAML | .yaml, .yml | Mappings, sequences, and scalars | Supported literal resource and file paths | Kustomize roots |
| Zig | .zig | Declarations | @import, @embedFile | build.zig, build.zig.zon |
Detection and fallback
Known filename rules and interpreter shebangs can identify extensionless scripts.
The Python SDK's Input.language overrides automatic detection for that input.
Markdown's inline grammar is an internal helper, not a separate file language.
Readable unsupported files still have FULL source and TREE available. Binary,
invalid UTF-8, oversized, and suppressed sensitive inputs stay path-only. The
budget can reduce detail or shorten the path listing. See
read the result.
Resolution limits
References are static evidence of a local dependency. ContextCraft does not fetch external packages, execute build scripts, or reproduce runtime loading. Computed imports, unknown build conditions, and generated files can leave references unresolved. The Python SDK exposes resolution outcomes through analysis metadata.
Detection comes from the language registry. Capability descriptions are reviewed against the language handlers.