code-review-graph icon indicating copy to clipboard operation
code-review-graph copied to clipboard

feat: Add support for DevOps languages (Terraform/HCL and Helm Charts)

Open dniald opened this issue 7 months ago • 4 comments

I am using code-review-graph to provide context for AI assistants (Claude Code/Cursor) in a DevOps-heavy environment. While the tool is excellent for application code (Python, Go, TS), it currently lacks structural parsing for Infrastructure-as-Code (IaC) files like Terraform (.tf, .hcl) and Helm Charts.

I would like to see code-review-graph support structural mapping for: Terraform (HCL): Identifying resource blocks, modules, and variable dependencies so the AI understands the "blast radius" of infrastructure changes. Helm Charts (YAML/Go Templates): Mapping the relationship between values.yaml and template files.

Additional context: Since this tool already uses Tree-sitter, these languages have mature grammars available: tree-sitter-hcl tree-sitter-yaml

Adding these would make this the go-to tool for DevOps engineers using AI.

dniald avatar Apr 10 '26 02:04 dniald

Great feature request! Terraform/HCL and Helm Charts would be valuable additions for DevOps-heavy workflows. Both have mature tree-sitter grammars (tree-sitter-hcl and tree-sitter-yaml) available in the tree-sitter-language-pack that this project already uses.

For Terraform/HCL specifically, the key constructs to extract would be: resource blocks, module blocks, variable declarations, data sources, and output blocks — enabling blast-radius analysis for infrastructure changes.

This is a valid enhancement. A PR adding .tf/.hcl extension support with tree-sitter-hcl would be welcomed. If you'd like to contribute, the pattern to follow is in parser.py — add the extension mapping, define node types for classes/functions/imports, and add test fixtures.

tirth8205 avatar Apr 11 '26 08:04 tirth8205

I recently discovered this and was hoping to use this with ColdFusion/CFML. (I've been using CFML since '97.)

The CFML Tree-sitter grammar is available at https://github.com/cfmleditor/tree-sitter-cfml (I don'thave any experience with tree-sitter.)

What's required in order to integrate this mature scripting language?

JamoCA avatar Apr 21 '26 15:04 JamoCA

Maintainer status after the PR reconciliation: the Terraform/OpenTofu portion is now implemented on main through PR #514, including resources, data sources, modules, variables, outputs, locals, providers, expression references, and local-module links.

This issue remains open because Helm chart support—especially values.yaml to template relationships—has not been implemented or validated. The CFML request in the discussion is a separate language scope and should be tracked in its own issue so its grammar, fixtures, and acceptance tests can be reviewed independently.

tirth8205 avatar Jul 17 '26 22:07 tirth8205

Status: half of this landed. Terraform/HCL is in — .tf and .hcl map to the hcl language and blocks are parsed (see #514, and #985 for a follow-up defect in aliased providers). .yaml/.yml are mapped as a language too.

Helm is not. Nothing models the relationship between values.yaml and the Go-templated files under templates/, which is the part that would actually give blast radius on a chart.

Leaving open for the Helm half rather than closing on the Terraform half.

tirth8205 avatar Sep 16 '26 20:09 tirth8205