struct

AIContext

Inherits YAML::Serializable < JSON::Serializable < Struct < Value < Object

Constants

MAX_PER_SECTION = 16
UNTRUSTED_FIELDS = {"name", "path", "snippet"}

Entry fields taken from the scanned repo as-is (snippets keep comments and string literals). A consumer that feeds this report to an LLM keys on this to fence them off as untrusted data.

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

callees
Source
callees=(callees : Array(AIContextEntry))
Source
empty?
Source
guards

Empty buckets are omitted from JSON/YAML. An explicit "guards":[] reads as "confirmed none", which is wrong after --ai-context= clears unrequested buckets — and disagrees with plain/Postman, which already skip empty labels. Absence of the key means "no entries (or not requested)", matching those formats.

Source
guards=(guards : Array(AIContextEntry))

Empty buckets are omitted from JSON/YAML. An explicit "guards":[] reads as "confirmed none", which is wrong after --ai-context= clears unrequested buckets — and disagrees with plain/Postman, which already skip empty labels. Absence of the key means "no entries (or not requested)", matching those formats.

Source
push_callee(entry : AIContextEntry)
Source
push_guard(entry : AIContextEntry)
Source
push_signal(entry : AIContextEntry)
Source
push_sink(entry : AIContextEntry)
Source
push_source(entry : AIContextEntry)
Source
push_validator(entry : AIContextEntry)
Source
signals
Source
signals=(signals : Array(AIContextEntry))
Source
sinks
Source
sinks=(sinks : Array(AIContextEntry))
Source
sources
Source
sources=(sources : Array(AIContextEntry))
Source
untrusted_fields
Source
validators
Source
validators=(validators : Array(AIContextEntry))
Source