Files
storybook/examples/alice-in-wonderland/world/characters/cheshire_cat.sb
Sienna Meridian Satterwhite 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
2026-02-13 21:52:03 +00:00

204 lines
5.3 KiB
Plaintext

//! Cheshire Cat: The enigmatic guide with a permanent grin
use schema::core_enums::{Size, EmotionalState, ManifestationLevel};
use schema::templates::Supernatural;
use schema::beings::Cat;
character CheshireCat: Cat from Supernatural {
// Physical state
current_size: normal
manifestation: fully_visible
grin_visible: true
// Personality
emotional_state: amused
follows_logic: false
awareness_of_absurdity: 1.0
// Supernatural abilities
can_disappear: true
defies_physics: true
offers_cryptic_advice: true
// Cat traits
purrs: true
has_claws: true
lands_on_feet: true // Even when vanishing
---description
A large cat with a permanent, unsettling grin. Possesses the ability
to appear and disappear at will, often leaving only its grin behind.
Speaks in riddles and offers directions that confuse more than clarify.
Known for philosophical observations like "We're all mad here" and
"I'm not crazy, my reality is just different than yours."
---
---philosophy
The Cheshire Cat represents the absurdist nature of Wonderland itself.
His ability to vanish piece by piece (usually starting with the tail
and ending with the grin) defies physical law but seems perfectly
natural in Wonderland's logic.
He tells Alice that everyone in Wonderland is mad, including himself
and her. This is not a judgment but an observation: madness is the
natural state where logic has no power.
---
}
behavior CheshireCat_AppearDisappear {
---description
Complex behavior modeling the Cheshire Cat's gradual materialization
and dematerialization. Uses decorators to add timing and conditions.
---
// Root selector: decide action based on current state
choose state_dependent_action {
// If invisible, consider appearing
then appear_from_nothing {
IsInvisible
DecideToAppear
GradualManifestation
}
// If visible, might give advice or disappear
choose visible_options {
// Give cryptic advice
then confuse_alice {
IsFullyVisible
ObserveAliceConfusion
GrinWider
OfferUnhelpfulDirections
}
// Begin disappearing
then fade_away {
IsFullyVisible
DecideToLeave
GradualDematerialization
}
}
// If partial, continue transition
then continue_manifestation {
IsPartiallyManifest
ContinueTransition
}
}
}
behavior CheshireCat_GradualManifestation {
---description
Models the piece-by-piece appearance of the Cheshire Cat.
Always ends with the grin appearing last (or first).
---
then materialize_piece_by_piece {
// Start with grin (the signature move)
then grin_first {
SetManifestationLevelPartialGrin
WaitTwoSeconds
AliceNoticesGrin
}
// Eyes appear
then add_eyes {
AddEyes
SetManifestationLevelPartialBody
WaitOneAndHalfSeconds
}
// Head materializes around grin
then form_head {
AddHead
WaitOneSecond
}
// Full body appears
then complete_body {
AddBody
AddTail
SetManifestationLevelFullyVisible
GreetAlice
}
}
}
behavior CheshireCat_GradualDematerialization {
---description
Models the piece-by-piece disappearance. The grin lingers
"quite some time after the rest of it had gone."
---
then vanish_piece_by_piece {
// Tail vanishes first
then tail_first {
FadeTail
WaitOneSecond
}
// Body fades
then fade_body {
FadeBody
SetManifestationLevelPartialBody
WaitOneAndHalfSeconds
}
// Head disappears, leaving grin
then leave_grin_behind {
FadeHead
LeaveEyes
SetManifestationLevelPartialGrin
WaitTwoSeconds
AliceRemarksOnGrinWithoutCat
}
// Finally, grin vanishes
then grin_last {
FadeGrin
SetManifestationLevelInvisible
}
}
}
behavior CheshireCat_OfferAdvice {
---description
The Cat's advice-giving behavior: cryptic, circular, and often
more confusing than helpful.
---
choose cryptic_response {
// If asked for directions
then unhelpful_directions {
AliceAsksWhichWay
choose either_way_works {
then point_left {
PointLeft
SayDirections
}
then point_right {
PointRight
SayDirections
}
}
AddPhilosophically
GrinKnowingly
}
// If asked about the game
then mysterious_answer {
AliceAsksAboutCroquet
Say
WaitForResponse
VanishGradually
}
// General philosophical musing
then unsolicited_wisdom {
ObserveAlicesSituation
OfferUnsolicitedWisdom
VanishBeforeExplanation
}
}
}