Rewrote the baker-family example around a unified story: the annual Harvest Baking Competition is Saturday. Martha's sourdough starter Old Maggie is sluggish from a cold snap, Jane is secretly entering the FreeStyle category, Emma's science fair project is "The Chemistry of Fermentation", Henry is judging for the first time and worried about impartiality, and Roland is defending last year's title. The week's schedules (Mon guild meeting → Tue test bakes → Wed sourcing → Thu dough prep → Fri science fair → Sat competition → Sun recovery) are now fully populated with narrative-specific actions. Files split for composability: - behaviors/baker_behaviors.sb → 5 focused files by character/domain - schema/types.sb → 4 files (core, baking, world, social) - schedules/work_schedules.sb → 4 files (one per schedule) - relationships/baker_family_relationships.sb → family + bakery Strong typing: replaced all enumerable string fields with concepts (BakerSpecialty, Occupation, LocationType, InstitutionType, ParentingStyle, Intensity, BakeryDomain, BakingDiscipline, ManagementDomain, CompetitiveAdvantage). Remove new-syntax-demo.sb (superseded by baker-family example).
63 lines
1.2 KiB
Plaintext
63 lines
1.2 KiB
Plaintext
//! Core baking behaviors — Martha and Jane's craft
|
|
//!
|
|
//! These behaviors are referenced by the Baker template and BakerSchedule.
|
|
//! See also: competition_behaviors.sb for competition-week-specific actions.
|
|
|
|
// Main baking work routine
|
|
behavior BakingWork {
|
|
then {
|
|
check_orders
|
|
prepare_ingredients
|
|
choose {
|
|
make_bread
|
|
make_pastries
|
|
make_cakes
|
|
}
|
|
bake
|
|
cool_products
|
|
package_goods
|
|
}
|
|
}
|
|
|
|
// Kitchen prep routine
|
|
behavior PrepKitchen {
|
|
then {
|
|
clean_surfaces
|
|
check_supplies
|
|
preheat_ovens
|
|
organize_workspace
|
|
}
|
|
}
|
|
|
|
// Market day selling behavior
|
|
behavior SellAtMarket {
|
|
repeat {
|
|
then {
|
|
greet_customer
|
|
show_products
|
|
if(self.customer_interested) {
|
|
make_sale
|
|
}
|
|
thank_customer
|
|
}
|
|
}
|
|
}
|
|
|
|
// Baker skill behaviors (from Baker template)
|
|
behavior BakingSkills {
|
|
then {
|
|
assess_dough
|
|
adjust_recipe
|
|
monitor_temperature
|
|
}
|
|
}
|
|
|
|
behavior CustomerService {
|
|
then {
|
|
greet_warmly
|
|
listen_to_needs
|
|
recommend_products
|
|
handle_payment
|
|
}
|
|
}
|