Expand description
Read-time code-health annotations.
Produces sparse, deterministic per-function annotations (cc=18) for the
over-threshold functions in a file, so an agent reading signatures or the map
sees complexity hotspots inline and can decide not to read a giant function
in full. Only functions above the threshold are annotated, keeping output
byte-stable and cheap (#498-safe).
Structs§
- Read
Annotation - One inline annotation for a function in a read view.
Functions§
- annotations_
for_ file - Annotations for the over-threshold functions in
sourceof fileext. Sorted by line then name. Empty when tree-sitter is off, the extension is unsupported, or nothing is over threshold. - by_name
- Index annotations by function name for renderers that match on the symbol name (more robust than line numbers when attributes/decorators shift lines).
- cognitive_
for_ symbol - Cognitive complexity of the function named
namedefined neareststart_lineinsource(file extensionext). Unlikeannotations_for_filethis is not threshold-gated, so a targetedctx_symbolquery can show the exact cc of any function.Nonewhen tree-sitter is off, the extension is unsupported, or no function with that name is present (e.g. a struct symbol).