Skip to main content

13. Appendix: Schema Reference

13.1 Schema Versions​

Artifact / ConfigSchema VersionDescription / Location
Configurationbatho-config.v1Unified YAML configuration (batho.yaml)
Entity SchemaPydantic modelFrozen dataclass for code entities
Relationship SchemaPydantic modelFrozen dataclass for code relationships
Arrow Bundlebatho-bundle.v1Arrow IPC tables: file_tracking, file_artifacts, run_artifacts
BSG Viewbsg.v1Memory-mapped Arrow IPC views

Schema Dependency Graph​

Figure 24: Schema Dependency Graph - Diagram showing the relationships between configuration schemas, database tables, and output views.


13.2 Directory Structure​

.batho/
├── artifact/
│ └── artifact_<dirname>.batho # Arrow IPC transport artifact
└── cache/
└── cache.json # Shared AST cache metadata

13.3 Glossary​

TermDefinition
ASTAbstract Syntax Tree — structured representation of source code
BSGBatho Structured Graph — compressed, queryable code representation
Arrow BundleHigh-performance binary database file containing entities, dependencies, and BSG views
EntityA node in the code graph (function, class, variable, etc.)
HypergraphGraph where edges can connect any number of nodes
PatchIncremental update to the database based on content-hash changes
RelationshipA directed edge between entities
Symbol IndexCross-file lookup table for imports and exports
Syntax GlueWhitespace, comments, braces, and non-semantic gaps recorded for lossless file reconstruction

13.4 Error Codes​

CodeDescription
E001File not found
E002Parse error
E003Cache corruption
E004Snapshot mismatch
E005Permission denied
E100Configuration error
E200Plugin load failure
E300Storage registry error