Skip to content

Recipes

Workflow is the medium — a runnable portable graph. Recipe is a workflow packaged as a job: outcome first, contract explicit, guards on by default.

Examples teach one mechanic each (knot, ply, tripwire…). Recipes finish real work against your repository or session.

Terminal window
threadle recipes
threadle run repo-brief --dir ~/code/some-repo

In the app: Workflows → recipes → use (same catalog as examples/recipes/ in the repo). Teaching graphs sit in the examples table below.

ExamplesRecipes
QuestionHow does this mechanic work?What do I get when this finishes?
Catalogthreadle templates · examples/workflows/threadle recipes · examples/recipes/
UIWorkflows → examplesWorkflows → recipes
SuccessYou understand the wireYou have a verdict, brief, triage list, …

Every recipe is a workflow (kind: "workflow"). Not every workflow is a recipe.


Every recipe states what you must supply before ▶ will succeed:

You supplyMeaning
modelPick a model on each agent node (readiness blocks until you do)
--dirWorking directory for agents that read or run tools in a repo
session slotDrag a session onto the empty ❝ context node and wire it in
IdOutcomeContract
diff-review-panelThree-lens review → one verdictmodel ×3 · --dir · scope
second-opinionCross-provider review of finished workmodel · --dir · session slot · concern
handover-briefBrief in the context librarysession slot · audience (0 agent nodes — distill is the model call)
test-triageFailures → root causes in one sessionmodel · --dir · failures
repo-briefOne onboarding pagemodel ×3 · --dir · focus

Machine-readable catalog: examples/recipes/catalog.json in the repo. API: GET /api/graphs/recipes, POST /api/graphs/recipes/:id.


Three reviewers, three lenses (correctness, security, performance), one synthesize knot. Agents read the diff with git — point --dir at the repo.

Guards: content tripwire parks under 200 characters, approval before accept, $2 spend ceiling, ply 3.

Terminal window
threadle run diff-review-panel \
--dir ~/code/my-project \
--param scope="the staged changes (git diff --staged)" \
--approve-all

The interesting variant: point each labeled agent at a different provider.


Distill a finished session, frame it as another engineer’s work, hand it to an agent on a different provider — no sunk cost in the reasoning.

Default agent is Claude. If the session under review was already Claude, swap the node to Cursor or opencode.

Terminal window
# Clone in the UI, wire the session into ❝, pick a model, then ▶
# or:
threadle run second-opinion --dir ~/code/my-project

Session slots cannot be filled from the CLI alone — wire them on the canvas (or import, wire, then run).


Four hours of session → a page someone can act on. No agent node — distilling is the model call (cheapest recipe). Output lands in the library for re-inject or another workflow.

Wire the finished session into ❝. Thin-brief tripwire (400 chars) + approval/splice.

Terminal window
threadle run handover-brief \
--param audience="a teammate picking this up tomorrow morning with no context"

Paste failing output; get causes. An iterator splits on blank lines; a framing convert tells the agent to diagnose each failure in one accumulating session so later items can cite shared roots.

Terminal window
threadle run test-triage \
--dir ~/code/my-project \
--param failures="$(npm test 2>&1 | tail -60)" \
--approve-all

Capped at 8 items and $3.


Three labeled explorers (architecture, build & test, risks) under ply 3 → synthesize → one onboarding page. Prefer read-only / ask agents.

Terminal window
threadle run repo-brief \
--dir ~/code/unfamiliar-project \
--param focus="the whole repository" \
--approve-all

Spend ceiling · approval before accept · content tripwire when empty output means “found nothing” · note that leads with outcome + contract · ply only for true parallel branches · role labels on parallel agents.

Adapt freely. Keep the habits.