Skip to content
trestle

Showing everyone how the process works

Pick another answer

Diagrams that match what runs

Flowcharts in wikis and slide decks go stale almost immediately, leaving engineers as the only people who know what happens when an approval times out. Trestle draws the diagram straight from the code, so everyone reviews the real process.

The code, 27 lines
const value = await act({
  name: 'Appraise the claim',
  body: () => surveyor.appraise(policy),
});
const isOver = await choice({
  name: 'Over the appraisal?',
  condition: amount > value,
});
if (isOver) {
  const review = await wait({
    name: 'Adjuster approves',
    party: adjuster,
    window: '3 days',
  });
  const isApproved = await choice({
    name: 'Approved?',
    condition: review.isAnswered && review.answer === true,
  });
  if (!isApproved) {
    return 'refused';
  }
}
await act({
  name: 'Pay the claim',
  body: ({ actKey }) => bank.pay(amount, actKey),
});
return 'paid';
The insurance claim code sits beside the diagram Trestle draws from it, with every box aligned to its lines. Tab through the statements or point at any box to highlight the pair, including the three-day timeout.
  1. How the diagram stays current

    Nobody maintains the chart by hand. Trestle produces the exact same diagram directly from the code without executing any steps, and each box links straight to its source line.

  2. Every branch and who owns it

    Every decision appears with all of its outcomes, including failures and timeouts, and each step names whether a person, team, system, or AI agent owns it. If code branches in a way the diagram cannot show, Trestle warns the author.

  3. Where real runs stand right now

    Open any active run to see where it is waiting and how it got there, or look across runs to spot where overdue approvals are backing up. Groups of steps fold and open in place so large processes stay readable.

  4. What changed and what never ran

    Compare two versions of a process to see what a change moved, or check run history to find branches no run has ever reached. You can export the diagram as text, structured data, or a Mermaid flowchart.

What Trestle does not do

Your visit is running on Trestle.

This is the real Trestle engine running a live process in your browser tab, not a simulation. Each of the eight topic pages you open answers its question once, showing the path you have taken and the pages you have not opened yet—until you copy npm create @trestlerun to finish it.