Files
storybook/tests/examples/behavior_and_lifearc.sb
Sienna Meridian Satterwhite 9c20dd4092 feat: implement storybook DSL with template composition and validation
Add complete domain-specific language for authoring narrative content for
agent simulations.

Features:
- Complete parser using LALRPOP + logos lexer
- Template composition (includes + multiple inheritance)
- Strict mode validation for templates
- Reserved keyword protection
- Semantic validators (trait ranges, schedule overlaps, life arcs, behaviors)
- Name resolution and cross-reference tracking
- CLI tool (validate, inspect, query commands)
- Query API with filtering
- 260 comprehensive tests (unit, integration, property-based)

Implementation phases:
- Phase 1 (Parser): Complete
- Phase 2 (Resolution + Validation): Complete
- Phase 3 (Public API + CLI): Complete

BREAKING CHANGE: Initial implementation
2026-02-08 13:24:35 +00:00

51 lines
724 B
Plaintext

// Test behavior trees and life arcs
life_arc Childhood {
state infant {
on ready -> toddler
}
state toddler {
on ready -> child
}
state child {
on ready -> teen
}
}
behavior SimpleBehavior {
walk_around
}
behavior SequenceBehavior {
> {
check_energy
move_to_location
perform_action
}
}
behavior SelectorBehavior {
? {
try_option_a
try_option_b
fallback
}
}
behavior NestedBehavior {
> {
? {
check_condition_a
check_condition_b
}
perform_action
}
}
behavior WithSubtree {
> {
@helpers::check_preconditions
main_action
}
}