# Symbol Tags

This document describes the currently implemented Masterbelt symbol tagging behavior for tree-sitter tags.

Symbol tagging is intentionally minimal at this stage. Future tag captures must extend this document before or together with query changes.

## Captures

Const item names are captured as `@name`. Const items are captured as `@definition.constant`.

Type declaration names are captured as `@name`. Type declarations are captured as `@definition.type`.

Type parameter names on a generic type declaration are captured as `@name`. Type parameters are captured as `@definition.type.parameter`.

Product type field names are captured as `@name`. Product type fields are captured as `@definition.field`. The `readonly`, `writable`, or `primary` modifier on a field, when present, is not part of the tagged span; it remains a syntactic modifier rather than a separately tagged declaration.

Enum declaration names are captured as `@name`. Enum declarations are captured as `@definition.type`.

Enum variant names are captured as `@name`. Enum variants are captured as `@definition.constant`.

Function declaration names are captured as `@name`. Function declarations are captured as `@definition.function`.

Method names declared inside a product type are captured as `@name`. Methods are captured as `@definition.method`.

Master declaration names are captured as `@name`. Master declarations are captured as `@definition.type`. Fields and methods inside the master's record section are tagged through the existing product type field and method rules. Const and function declarations inside the master's `static` section are tagged through the existing const-item and function-declaration rules.

Master select-section projection names are captured as `@name`. Select sections are captured as `@definition.type`.

Master scope names are captured as `@name`. Scope declarations are captured as `@definition.method`, since a scope surfaces as a method on the master's relation.
