Files
storybook/tests/examples/equality.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

41 lines
844 B
Plaintext

// Test equality expressions in life arcs
life_arc NameCheck {
state checking {
on name is "Alice" -> found_alice
on name is "Bob" -> found_bob
}
state found_alice {
on ready -> checking
}
state found_bob {
on ready -> checking
}
}
life_arc StatusCheck {
state monitoring {
on status is active -> active_state
on status is inactive -> inactive_state
}
state active_state {
on status is inactive -> inactive_state
}
state inactive_state {
on status is active -> active_state
}
}
life_arc FlagCheck {
state idle {
on completed is true -> done
on completed is false -> working
}
state working {
on completed is true -> done
}
state done {
on completed is false -> working
}
}