# Rule targets

GENERATED — do not edit. Regenerate with `bun run schema` (scripts/generate-schema.ts). The rows
come from the target vocabulary (`@jint/contract`), the resolution predicate
(`packages/sdk/src/core/rules/classify.ts`), and each grammar's own `queries.scm` census — a
rule resolves what this table says or the generator fails.

The two rule-target namespaces are FILE / CAPTURE (`docs/designs/grammar-loading.md`).
The table below covers the CAPTURE namespace's fixed targets; a grammar's own capture is
addressed through the qualified `{grammar}:{capture}` form - markdown's four: `markdown:section`, `markdown:paragraph`, `markdown:list_item`, `markdown:list`; typescript's and tsx's top-level code: `typescript:statement_group`, `tsx:statement_group`.

| target           | namespace | singular                    | resolves to                                                                                                                                                                                                                                                                                                       | grammars emitting it                          | frame carried                                                       | scope-coupled |
| ---------------- | --------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------- | ------------- |
| `files`          | FILE      | file                        | the whole unit as source text (no walk)                                                                                                                                                                                                                                                                           | every format (no grammar needed)              | the unit's raw content under its path                               | yes           |
| `functions`      | CAPTURE   | function                    | elements captured as functions                                                                                                                                                                                                                                                                                    | typescript, tsx, python, php, go, cpp, c      | attached run + inline comments + code (the pair frame)              | yes           |
| `classes`        | CAPTURE   | class                       | elements captured as classes (the @class capture: class-like units)                                                                                                                                                                                                                                               | typescript, tsx, python, php, cpp             | attached run + inline comments + code (the pair frame)              | yes           |
| `methods`        | CAPTURE   | method                      | elements captured as methods (the @method capture: member functions)                                                                                                                                                                                                                                              | typescript, tsx, python, php, go, cpp         | attached run + inline comments + code (the pair frame)              | yes           |
| `types`          | CAPTURE   | type                        | elements captured as types (interfaces, structs, enums, aliases)                                                                                                                                                                                                                                                  | typescript, tsx, php, go, cpp, c              | attached run + inline comments + code (the pair frame)              | yes           |
| `bindings`       | CAPTURE   | binding                     | elements captured as bindings (a name bound to a value)                                                                                                                                                                                                                                                           | typescript, tsx, php, go, cpp, c              | attached run + inline comments + code (the pair frame)              | yes           |
| `definitions`    | CAPTURE   | definition (umbrella)       | SHORTHAND for every definition capture at once (functions, classes, methods, types, bindings) - the same measured set; prefer the specific targets in new rules                                                                                                                                                   | typescript, tsx, python, php, go, cpp, c      | attached run + inline comments + code (the pair frame)              | yes           |
| `comments`       | CAPTURE   | definition (the pair frame) | the DOCUMENTATION pair frame: a definition judged together with the comments it owns (attached run, internal notes, docstrings); a module docstring, which has no definition frame, is its own match. An owned comment element never matches separately, so a narration rule fires once per documented definition | typescript, tsx, python, php, go, cpp, c, css | attached run + inline comments + docstrings + code (the pair frame) | yes           |
| `loose-comments` | CAPTURE   | comment (element)           | comment elements NO definition owns: standalone runs and inline comments outside any definition (the complement of comments)                                                                                                                                                                                      | typescript, tsx, python, php, go, cpp, c, css | the comment's own text under its path                               | yes           |
| `imports`        | CAPTURE   | import (element)            | the one merged import-group element per file                                                                                                                                                                                                                                                                      | typescript, tsx, python, php, go, cpp, c      | the merged import statements                                        | yes           |