~/examples · 5 chains
silly chains,
serious patterns.
every example is a real, typed jevchain program about something deeply unserious. each one teaches exactly one composition pattern you'd use in production. read the source, then run it in the studio.
reading the maps
- calls jev
- your code
- leaf / emit
- fork / join
- 01Intent routing + confidence fallback
Haunted Appliance Support Desk
Tier 1 support for toasters with unfinished business.
10 nodes · 3 decisions · 3 jevopen → - 02Speculative fan-out + composite scoring
Group Chat Drama Triage
Four reads of the room, one API call, zero emotional labour.
6 nodes · 0 decisions · 4 jevopen → - 03Cascade (cheap → thorough → fallback)
Should I Text Them Back?
A three-tier decision system for a one-word question.
5 nodes · 1 decision · 2 jevopen → - 04Threshold gate + unsure band
Could This Meeting Be An Email?
Finally, a calibrated answer to the oldest question in corporate life.
4 nodes · 1 decision · 1 jevopen → - 05Multi-question ask + composite scoring
Pull Request Horoscope
Mercury is in retrograde and so is your migration.
2 nodes · 0 decisions · 1 jevopen → your chain here.
start from any example, change a question, watch the trace move.
open the studio →
pattern index
| pattern | why it matters | taught by |
|---|---|---|
| Intent routing + confidence fallback | Use a choice to pick a handler, and use its confidence as a second axis: when Jev isn't sure, route to a human instead of guessing. Nest gates and routes inside branches for multi-step triage. | haunted-desk |
| Speculative fan-out + composite scoring | Fan out independent questions with parallel; asks against the same state are batched into a single request for free. Combine the answers with weights in code, where they're easy to test and tune. | group-chat-drama |
| Cascade (cheap → thorough → fallback) | Ask the cheapest question first and only escalate when confidence is low. Each tier can see more context; the fallback can be anything, like an LLM, a human queue or your friends. | text-them-back |
| Threshold gate + unsure band | Gate on a score or probability, and give borderline cases their own path. A decision near the bar is a different decision, not a coin flip. | meeting-email |
| Multi-question ask + composite scoring | Ask everything you need about one input in a single call (it's cheaper and faster than one call per question), then combine typed answers in plain code. | pr-horoscope |