Intermediate Representationir
An Intermediate Representation (IR) is a typed, structured form of the program or knowledge that sits between raw input and the final artifact. In SKCE the IR is a graph of ConceptNodes and typed edges shared by every pass.
The IR is the stable core of a compile-time system. Per Brian Letort's "continuity of cognition", the IR survives changes above (new corpus) and below (new emit targets) it. Swap your data source or your runtime; the compiled IR does not have to change.
Where it appears
- Knowledge Compiler SDK ir/ package
- SKCE compiler/ir.py
Descend
Prerequisites
Dependencies
Foundations
Historical evolution
From LLVM IR / MLIR in software compilers to Context IR (Brian Letort) and the SKCE ConceptNode graph — the same idea applied to knowledge.
Implementation details
SKCE IR types (ir.py): ConceptNode, RelationshipEdge, MisconceptionNode, LearningPathNode, SourceRef. Validated (acyclicity, dangling refs) before emit.
Sources
- [2026-07-12-compile-time-ai-knowledge-compiler-architecture] 2026-07-12-compile-time-ai-knowledge-compiler-architecture
- [compiler/ir.py] compiler/ir.py
- [2026-07-12-compile-time-ai-knowledge-compiler-architecture] 2026-07-12-compile-time-ai-knowledge-compiler-architecture
- [compiler/ir.py] compiler/ir.py