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
This commit is contained in:
2026-02-13 21:52:03 +00:00
parent 80332971b8
commit 16deb5d237
290 changed files with 90316 additions and 5827 deletions

View File

@@ -0,0 +1,40 @@
//! Emma - The bakers' daughter
//!
//! Demonstrates:
//! - Character using different template (Child vs Baker)
//! - Different behavior set appropriate to age
//! - No work schedule (children don't work)
use schema::templates::Child;
character Emma from Child {
// Personal details
age: 12
// Child-specific traits
school_grade: 7
curiosity: 0.9
// General traits
energy: 0.9
mood: 0.85
---backstory
Emma is the bright, energetic daughter of Martha and John. She loves
helping in the bakery on weekends, though she's not allowed to work
the ovens yet. She's fascinated by the chemistry of baking and often
asks her parents endless questions about why dough rises, how yeast
works, and what makes bread crusty.
At school, she excels in science and math, and dreams of one day
creating her own innovative recipes. For now, she's content to help
package goods and chat with the regular customers who've watched her
grow up.
---
}
// Note: Emma inherits from Child template which:
// - uses behaviors: PlayBehavior, LearnBehavior
// - uses behaviors: BasicNeeds, SocialInteraction (from Person)
// - Has NO work schedule (appropriate for a child)
// - Has different fields than Baker template

View File

@@ -0,0 +1,42 @@
//! Jane - Pastry specialist and Martha's wife
//!
//! Demonstrates:
//! - Another character using the same Baker template
//! - Different field values showcasing template flexibility
//! - Resource inheritance working across multiple characters
use schema::templates::Baker;
character Jane from Baker {
// Personal details
age: 36
// Baker-specific traits
specialty: "pastries"
baking_skill: 0.85
customer_relations: 0.80
// General traits
energy: 0.75
mood: 0.85
// Work ethic
work_ethic: 0.90
occupation: "pastry chef"
---backstory
Jane trained at a culinary school in the capital before returning
to his hometown and meeting Martha. His specialty is delicate
pastries and elaborate wedding cakes. While Martha handles the
bread and business, Jane focuses on the artistic creations that
draw customers from neighboring towns.
He's more of a night owl by nature, but has adapted to the baker's
early schedule over the years. His croissants are legendary.
---
}
// Note: Jane also inherits:
// - All behaviors from Baker template chain
// - BakerSchedule (same early mornings as Martha)
// - All fields with ranges have specific values

View File

@@ -0,0 +1,43 @@
//! Martha - Master baker and family matriarch
//!
//! Demonstrates:
//! - Character inheriting from template with resources
//! - Template provides both behaviors and schedule
//! - Field overrides from template
use schema::templates::Baker;
character Martha from Baker {
// Personal details
age: 34
// Baker-specific traits
specialty: "sourdough"
baking_skill: 0.9
customer_relations: 0.95
// General traits (inherited from Person template)
energy: 0.7
mood: 0.8
// Work ethic (from Worker template)
work_ethic: 0.95
occupation: "master baker"
---backstory
Martha learned to bake from her grandmother and has perfected
the art of sourdough over fifteen years. She wakes at 4 AM every
day to prepare the morning bread, and her bakery is known throughout
the region for its exceptional quality.
She manages the business side as well, keeping meticulous records
and maintaining warm relationships with all her customers. The bakery
is not just a shop - it's the heart of the community.
---
}
// Note: Martha inherits from Baker template which:
// - uses behaviors: BakingSkills, CustomerService (from Baker)
// - uses behaviors: BasicNeeds, SocialInteraction (from Person via Worker)
// - uses schedule: BakerSchedule (from Baker)
// - uses schedule: WorkWeek (base for BakerSchedule)