Documentation Index
Fetch the complete documentation index at: https://docs.prism.byescaleira.com/llms.txt
Use this file to discover all available pages before exploring further.
Core Protocols
PrismFoundation defines the base protocols used across every Prism module. They provide consistent patterns for modeling data, handling errors, generating test fixtures, and logging.PrismEntity
The standard protocol for data models. CombinesCodable, Equatable, Hashable, CustomStringConvertible, and PrismLogger into a single conformance with automatic JSON serialization and logging.
Defining an Entity
PrismError
A typed error protocol that extendsError, LocalizedError, and PrismLogger. Provides structured error descriptions with failure reasons and recovery suggestions.
Defining a Custom Error
PrismMock
A protocol for generating test data. Provides amock instance and a mocks array (default: 10 items).
Defining Mock Data
PrismLogger
The simplest logging protocol — a singlelog() method. Both PrismEntity and PrismError conform to it, so any model or error can log itself.
Custom Logger Conformance
PrismSystemLogger
A more structured logging protocol that wrapsos.Logger with typed log messages.
System Logger
Protocol Hierarchy
PrismEntity
Codable + Equatable + Hashable + CustomStringConvertible + PrismLogger. The base for all data models. Auto-generates JSON description and logging.
PrismError
Error + LocalizedError + PrismLogger. Structured errors with description, failure reason, and recovery suggestion. Auto-logs all three fields.
PrismMock
Test data generation with
mock and mocks. Default implementation provides 10-item arrays.PrismLogger / PrismSystemLogger
Simple
log() protocol and os.Logger wrapper with typed messages for info, warning, and error levels.