style
Installation
SKILL.md
KERI Coding Style Guide
Overview
The KERI coding style is a Domain-Specific Linguistic Programming (DSLP) approach that creates a 1:1 mapping between the KERI specification terminology and code structure. This style makes code self-documenting and enables implementers in other languages to translate patterns while maintaining conceptual fidelity.
Core Philosophy: Every naming convention reinforces KERI/CESR concepts. The code reads like the KERI spec itself.
Quick Reference
Five Primary Patterns
- Modules: Use gerunds with
-ingsuffix (e.g.,coring.py,eventing.py,signing.py) - Classes: Use agent nouns with
-ersuffix (e.g.,Verfer,Diger,Siger,Salter) - Code Tables: Use frozen dataclasses with
-Dexsuffix (e.g.,DigDex,PreDex,NumDex) - Transformations: Use verbs with
-ifysuffix (e.g.,sizeify(),versify(),saidify()) - Data Structures: Use namedtuples with
-agesuffix (e.g.,Versionage,Smellage)