Expand description
AI-Facing Intermediate Representation (IR)
This module provides a JSON-serializable IR designed for consumption by AI agents, language servers, and external tooling. The IR captures:
- Function definitions with typed parameters and bodies
- Pipeline operations (morphemes, transformations, forks)
- Evidentiality annotations throughout
- Type information including the evidentiality lattice
- Control flow and data flow structures
- Protocol operations with their trust boundaries
Structs§
- Evidence
Level - An evidence level in the lattice
- Evidentiality
Lattice - The evidentiality lattice with explicit join/meet rules
- IrAffect
- Affect markers
- IrConstant
- Constant definition
- IrDump
Options - Configuration options for IR dump
- IrField
- A struct field
- IrFor
Iterator - For loop iterator
- IrFunction
- A function definition
- IrGeneric
Param - A generic type parameter
- IrImpl
Block - Impl block
- IrMatch
Arm - Match arm
- IrModule
- Top-level IR module representing a complete Sigil program
- IrParam
- A function parameter
- IrPosition
- IrSpan
- Source location span
- IrTrait
Def - Trait definition
- IrVariant
- An enum variant
- Lattice
Rule - A join/meet rule in the lattice
Enums§
- Binary
Op - Binary operators
- Confidence
- Emotion
- Evidence
Op - Evidence operations
- Formality
- Http
Method - HTTP methods
- Incorporation
Segment - Incorporation segment (noun-verb)
- Intensity
- IrEvidence
- Evidence marker enum matching AST Evidentiality
- IrOperation
- Core operation node - the heart of the IR
- IrPattern
- Pattern in IR
- IrPipeline
Step - Pipeline step
- IrType
- Type representation in IR
- IrType
Def - Type definition (struct, enum)
- IrVisibility
- Function visibility
- Join
Strategy - Join strategy for fork operations
- Kafka
OpKind - Kafka operations
- Literal
Variant - Literal variants
- Loop
Variant - Loop variants
- Morpheme
Kind - Morpheme kinds
- Protocol
Op - Protocol operations for pipeline
- Sentiment
- UnaryOp
- Unary operators
- WebSocket
Op - WebSocket operations
Constants§
- IR_
VERSION - The version of the IR schema