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,65 @@
# LSP Documentation Template for Keywords
# Copy this template for each keyword/declaration/type
[keyword]
name = "keyword_name"
category = "behavior_tree | declaration | value_type | decorator"
short_description = "One-sentence description (used in completion list)"
web_url = "https://r3t-studios.github.io/storybook/reference/page.html#anchor"
[syntax]
format = "keyword [optional] { required }"
example = """
keyword example {
child_element
}
"""
[hover]
markdown = """
**`keyword` - Short Name**
One-sentence description of purpose and behavior.
**Key behaviors:**
- Behavior 1
- Behavior 2
- Behavior 3
**Example:**
```storybook
keyword realistic_label {
meaningful_child
}
```
**Optional features:**
- Optional labels for debugging
- Optional parameters
[Learn more →](https://r3t-studios.github.io/storybook/reference/page.html#anchor)
"""
[completion]
snippet = "keyword ${1:label} {\n\t$0\n}"
description = "Short description for completion dropdown"
sort_text = "01-keyword" # Optional: control sort order
filter_text = "keyword" # Optional: control filtering
[signature]
# Optional: for keywords that take parameters
label = "keyword(param1: Type, param2: Type)"
parameters = [
"param1: Type - Description",
"param2: Type - Description"
]
[context]
# Optional: where this keyword is valid
valid_in = ["behavior_block", "life_arc_block"]
invalid_in = ["character_block"]
[related]
# Optional: related keywords for cross-reference
keywords = ["related1", "related2"]
concepts = ["concept1", "concept2"]

81
docs/_templates/reference-template.md vendored Normal file
View File

@@ -0,0 +1,81 @@
# [Concept Name]
> **Quick Summary**: [One-sentence description of what this is and what it does.]
## Syntax
```bnf
[Formal grammar or syntax pattern]
```
### Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `param1` | Type | Yes | What it does |
| `param2` | Type | No | What it does (default: value) |
## Semantics
[Precise description of behavior. What happens when this executes? What are the rules? What are the constraints?]
### Evaluation Order
[If relevant - describe how/when things are evaluated]
### Success and Failure
[If relevant - describe success/failure conditions]
## Minimal Example
```storybook
[Simplest possible working example]
```
## Complete Example
```storybook
[Realistic example showing all features]
```
## Validation Rules
- [Rule 1 with explanation]
- [Rule 2 with explanation]
- [Rule 3 with explanation]
## Common Errors
### Error: [Error Message]
**Cause**: [Why this happens]
**Solution**: [How to fix it]
```storybook
// ❌ Wrong
[bad example]
// ✅ Correct
[good example]
```
## Related Concepts
- [Related Concept 1](link) - [How they relate]
- [Related Concept 2](link) - [How they relate]
## See Also
- [Tutorial: Learning Chapter](../tutorial/chapter.md)
- [Examples: Use Case](../examples/example.md)
- [Reference: Related Feature](other-reference.md)
## Notes
[Edge cases, gotchas, performance considerations, design rationale]
---
**[Anchor ID for LSP linking]**

62
docs/_templates/tutorial-template.md vendored Normal file
View File

@@ -0,0 +1,62 @@
# [Chapter Title]
> **Learning Objective**: By the end of this chapter, you'll be able to [specific skill].
## Why This Matters
[Motivation - explain why this concept is important for storytelling. Connect to narrative creation, not just technical details. Make it inspiring!]
## The Concept
[Gentle introduction with metaphor or analogy. Explain in plain language before showing code. Build intuition.]
## Example: [Descriptive Name]
Let's see this in action with [character/scenario]:
```storybook
[Complete, working example with meaningful names]
```
### Walking Through the Example
[Step-by-step explanation of the code above. Call attention to important details. Explain each part's purpose.]
### Why It Works
[Explain the semantics - what happens when this code runs? Connect code structure to narrative outcome.]
## Try It Yourself
[Guided exercise with clear instructions. Suggest modifications. Encourage experimentation.]
```storybook
[Exercise template or starting point]
```
## Common Patterns
[Show 2-3 variations of this concept. Highlight when to use each.]
## Tips and Tricks
- **[Tip 1]**: [Practical advice]
- **[Tip 2]**: [Helpful hint]
- **[Tip 3]**: [Common pitfall to avoid]
## Key Takeaways
- [Main concept 1]
- [Main concept 2]
- [Main concept 3]
- [How this enables storytelling]
## What's Next
[Bridge to next chapter. Create excitement. Show how concepts build.]
→ [Next: Chapter Name](next-chapter.md)
---
**Quick Reference**: [Link to relevant reference section]