Files
storybook/examples/alice-in-wonderland/world/characters/caterpillar.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

156 lines
4.3 KiB
Plaintext

//! The Caterpillar: Philosophical advisor and size-change expert
use schema::core_enums::{Size, EmotionalState};
use schema::templates::Supernatural;
use schema::beings::Caterpillar;
character TheCaterpillar: Caterpillar from Supernatural {
// Physical traits
current_size: normal // Large for a caterpillar
color: blue
smoking_hookah: true
// Personality
emotional_state: melancholy
follows_logic: false
awareness_of_absurdity: 1.0
// Supernatural/philosophical nature
can_disappear: false
defies_physics: true // A smoking caterpillar defies biology
offers_cryptic_advice: true
// Communication style
speaks_in_short_questions: true
makes_alice_explain_herself: true
patient_with_confusion: false
// Size-change knowledge
knows_mushroom_properties: true
understanding_of_transformation: 1.0
---description
A large blue caterpillar sitting atop a mushroom, smoking
a hookah. Speaks in short, terse sentences, usually questions.
Forces Alice to confront her identity crisis through Socratic
method.
Knows which side of the mushroom makes you taller, which side
makes you shorter. This knowledge is crucial for Alice's ability
to control her size changes.
---
---philosophical_role
The Caterpillar represents transformation and the difficulty
of maintaining identity through change. He asks "Who are YOU?"
when Alice herself doesn't know anymore.
His own impending transformation (chrysalis → butterfly) mirrors
Alice's transformation through Wonderland. Both are changing,
both struggle with "who am I?"
---
}
behavior Caterpillar_SocraticMethod {
---description
The Caterpillar's interrogative conversation style. He asks
questions, contradicts answers, and forces self-examination.
---
then interrogation_sequence {
// Initial confrontation
then opening_question {
RemoveHookahFromMouth
StareInSilence
AskWhoAreYou
}
// Alice's confused response
then contradiction_cycle {
AliceExplainsShesChanged
Caterpillar_StatesDisagreement
AliceExplainsMore
Caterpillar_Contradicts
}
// Philosophical exchange
choose debate_topic {
// On change and identity
then identity_crisis {
AliceMentionsDifferentSizes
Caterpillar_DismissesComplaint
AliceSuggestsFutureChange
Caterpillar_ShowsIndifference
}
// On memory and self
then memory_test {
AskWhatAliceCantRemember
AliceRecitesPoem
RecitationIsWrong
CriticizeStrictly
}
}
// Eventual aid (after sufficient confusion)
then reluctant_guidance {
AskWhatSizeAliceWants
AliceExplainsPreference
OfferCrypticAdvice
NotSpecifyWhichSide
LeaveAliceToExperiment
}
// Transformation and departure
then exit {
CrawlDownMushroom
Vanish
}
}
}
behavior Caterpillar_MushroomAdvice {
---description
The Caterpillar's guidance about the size-changing mushroom.
Deliberately vague to force Alice to experiment and learn.
---
then cryptic_instruction {
// Verify Alice's distress about size
then assess_problem {
ObserveAliceHeight
AskIfContentNow
AliceExplainsDesireToBeNormal
}
// Offer cryptic instruction
then vague_direction {
Point AtMushroom
Say
PauseForEffect
Add
}
// Respond to clarification requests
choose handle_confusion {
then refuse_clarification {
AliceAsksWhichSide
Caterpillar_StatesObvious
RefuseToElaborate
}
then already_departed {
AliceLooksAtRoundMushroom
RealizesAmbiguity
Caterpillar_AlreadyGone
}
}
// Let Alice figure it out
then mysterious_exit {
CrawlAway
BeginTransformation
LeaveAliceWithPuzzle
}
}
}