How heckslabs/hecks works
hecks is an executable business-domain specification language: bluebook declarations define domain behavior and run directly, rather than generating conventional handlers. The principal workflow is authoring a declaration, loading and validating it, dispatching commands through the runtime’s fixed rule-and-mutation order, then persisting state and emitting events; queries read domain state. Separate capabilities project domain data into diagrams and other views, compile it for Rust, and fuzz generated execution sequences. README documentation establishes the main workflow; unsampled subsystem wiring is shown only where the tree or documentation supports it.
Main entry points: ir.rb Domain IR · command_interpreter.rb Command interpreter · dispatcher.rb Command dispatcher · dsl.rb Bluebook DSL
Components 22
Domain language
- Bluebook DSL
lib/hecks/bluebook/dsl.rb - DSL builders
lib/hecks/bluebook/dsl - Domain IR
lib/hecks/ir.rb - Meta validation
lib/hecks/bluebook/meta_validator.rb
Runtime execution
- Domain loader
lib/hecks/runtime/loader.rb - Runtime registry
lib/hecks/runtime/registry.rb - Command dispatcher
lib/hecks/runtime/dispatcher.rb - Command interpreter
lib/hecks/runtime/command_interpreter.rb - Command rules
lib/hecks/runtime/command_rules.rb - Event outbox
lib/hecks/runtime/outbox.rb - Query runtime
lib/hecks/runtime/query_interpreter.rb - Application facade
lib/hecks/facade.rb
Ports and adapters
- Persistence repository
lib/hecks/ports/persistence.rb - Persistence adapters
lib/hecks/adapters/driven
Domain projections
- Domain forms
lib/hecks/forms.rb - Domain projections
lib/hecks/projections.rb - Domain diagrams
lib/hecks/projections/diagrams.rb - Generated fuzzing
lib/hecks/fuzzing.rb
Rust support
- Rust parser
rust/parser/src/main.rs - Rust code generation
rust/codegen/src/main.rs - Rust runtime kernel
rust/src/kernel/mod.rs
Other components
- Domain author
Connections 20
- Domain author → Bluebook DSL: authors
- Bluebook DSL → DSL builders: builds declarations
- DSL builders → Domain IR: produces IR
- Domain IR → Meta validation: validates
- Domain IR → Domain loader: loads domain
- Domain loader → Runtime registry: registers domain
- Runtime registry → Command dispatcher: supplies runtime
- Command dispatcher → Command interpreter: dispatches command
- Command interpreter → Command rules: enforces rules
- Command interpreter → Persistence repository: persists state
- Persistence repository → Persistence adapters: uses adapter
- Command interpreter → Event outbox: emits events
- Command dispatcher → Query runtime: runs queries
- Application facade → Command dispatcher: routes requests
- Domain IR → Domain projections: projects domain
- Domain projections → Domain diagrams: renders diagrams
- Domain IR → Generated fuzzing: generates test domains
- Bluebook DSL → Rust parser: parses declarations
- Rust parser → Rust code generation: provides parsed IR
- Rust code generation → Rust runtime kernel: targets runtime