Commit Graph

8 Commits

Author SHA1 Message Date
16deb5d237 release: Storybook v0.2.0 - Major syntax and features update
BREAKING CHANGES:
- Relationship syntax now requires blocks for all participants
- Removed self/other perspective blocks from relationships
- Replaced 'guard' keyword with 'if' for behavior tree decorators

Language Features:
- Add tree-sitter grammar with improved if/condition disambiguation
- Add comprehensive tutorial and reference documentation
- Add SBIR v0.2.0 binary format specification
- Add resource linking system for behaviors and schedules
- Add year-long schedule patterns (day, season, recurrence)
- Add behavior tree enhancements (named nodes, decorators)

Documentation:
- Complete tutorial series (9 chapters) with baker family examples
- Complete reference documentation for all language features
- SBIR v0.2.0 specification with binary format details
- Added locations and institutions documentation

Examples:
- Convert all examples to baker family scenario
- Add comprehensive working examples

Tooling:
- Zed extension with LSP integration
- Tree-sitter grammar for syntax highlighting
- Build scripts and development tools

Version Updates:
- Main package: 0.1.0 → 0.2.0
- Tree-sitter grammar: 0.1.0 → 0.2.0
- Zed extension: 0.1.0 → 0.2.0
- Storybook editor: 0.1.0 → 0.2.0
v0.2.0
2026-02-13 21:52:03 +00:00
80332971b8 fix(tree-sitter): resolve if keyword ambiguity in behavior nodes
Separate if(expr) condition from if(expr) { child } decorator to fix
grammar conflicts. Simplify decorator_params to accept only integer,
range, or duration.
2026-02-13 20:21:31 +00:00
b100ded3d3 feat(tree-sitter): add Tree-sitter grammar for Storybook DSL 2026-02-09 22:06:25 +00:00
734eb93f12 chore(tree-sitter): add .gitignore for tree-sitter-storybook 2026-02-09 22:05:34 +00:00
ae5e9fdcd8 docs: add Alice in Wonderland example storybook
Add comprehensive example demonstrating all major features of the
Storybook DSL through Lewis Carroll's Alice in Wonderland.

Contents:
- 12 characters (Alice, WhiteRabbit, CheshireCat, MadHatter, etc.)
- 7 relationships with named participant blocks
- 3 institutions (tea parties, royal court)
- 1 schedule (Mad Tea Party eternal rotation)
- 12 behavior trees using new syntax features
- 1 life arc (Alice's journey)

Demonstrates:
- Cross-file template resolution (schema/templates.sb)
- Template inheritance and includes
- Strict template validation
- Action parameters and repeater decorators
- Named participant relationship blocks
- Species-based character typing
- Rich prose blocks throughout

All content validates successfully.
2026-02-08 15:46:52 +00:00
a8882eb3ec feat(parser): add action parameters, repeater decorator, and named participants
Add syntax enhancements for more expressive behavior trees and relationships.

Action parameters:
- Support typed/positional parameters: WaitDuration(2.0)
- Support named parameters: SetValue(field: value)
- Enable inline values without field names

Repeater decorator:
- Add * { node } syntax for repeating behavior nodes
- Maps to Decorator("repeat", node)

Named participant blocks:
- Replace self/other blocks with named participant syntax
- Support multi-party relationships
- Example: Alice { role: seeker } instead of self { role: seeker }

Schedule block syntax:
- Require braces for schedule blocks to support narrative fields
- Update tests to use new syntax: 04:00 -> 06:00: Activity { }
2026-02-08 15:45:56 +00:00
4c89c80748 feat(resolver): implement cross-file template resolution
Enable characters to inherit from templates defined in different files
across the project structure.

- Add file_index field to NameEntry to track declaration source files
- Update NameTable::from_files() to set file indices when merging tables
- Change conversion pipeline to pass &[ast::File] instead of flat arrays
- Update merge functions to use two-level indexing:
  all_files[entry.file_index].declarations[entry.decl_index]
- Update all affected tests to use new signatures
2026-02-08 15:45:30 +00:00
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