Skip to content

Routing and State Model

Jeremy Longworth edited this page Sep 12, 2026 · 2 revisions

Routing And State Model

ChefSkills routes a request to focused culinary behavior and models cooking as movement from an observed state to a target state.

Routing questions

The router answers:

  1. What kind of culinary task is this?
  2. Which primary skill owns the decision?
  3. Which supporting skills are necessary?

Source files:

Task classes

Class Meaning
MAKE Create a dish, recipe, prep plan, or menu
FIX Diagnose and recover a dish, process, flavor, or texture problem
JUDGE Evaluate a recipe, substitution, plan, dish, or safety decision
PLAN Organize prep, shopping, workflow, timing, or service
LEARN Explain a technique, ingredient, mechanism, or culinary concept
ADAPT Modify for constraints, dietary needs, equipment, scale, or availability
PRESERVE Store, hold, reheat, ferment, cure, can, freeze, or assess leftovers

Routing ceiling

Use one primary skill and up to three supporting skills for ordinary requests. Use up to five only when the request genuinely spans recipe design, scale, safety, workflow, and troubleshooting. For larger work, write a brief first and stage the work.

Safety preflight

Activate food-safety when a request plausibly involves:

  • raw or undercooked animal products
  • unsafe holding, reheating, cooling, or storage
  • canning, curing, fermenting, dehydration, sous vide, or vacuum storage
  • allergens or medically relevant dietary constraints
  • pregnancy or other vulnerable diners
  • spoilage, mold, off odors, gas pressure, sliminess, or uncertain time-temperature history
  • commercial food service, regulation, licensing, inspection, or jurisdiction-specific claims

State model

ChefSkills treats cooking as movement from observed state to target state. The state model tracks:

  • ingredient state
  • heat state
  • moisture state
  • texture state
  • flavor state
  • workflow state
  • safety state

Source files:

Reasoning pattern

  1. Identify the user's goal.
  2. Identify the current observable state.
  3. Identify the target state.
  4. Explain the mechanism behind the gap.
  5. Choose the lowest-risk intervention.
  6. Predict side effects.
  7. Give verification cues.
  8. Apply the safety gate before final advice.

Clone this wiki locally