Skip to content

Guides

The review widget

The review widget is a small script you add to a prototype or review site. On every page it shows what that page is in the brain and which components it uses, and lets reviewers leave comments pinned to the page, which an AI can then bring into the brain.

Reviewers walk the running product, not a document about it. The widget brings the brain to them, on the page they are looking at, and takes their comments back.

Add it to a site

Generate a token

In the project's settings, open Settings › Brain › Widget and choose Generate token (owners and admins; members see the token to embed it). The token starts with ecw_.

Paste the snippet

Copy the embed snippet from the same page into your site's HTML, before the closing body tag:

<script>
  window.epicContext = {
    "token": "ecw_…"
  };
</script>
<script src="https://www.epiccontext.com/widget.js" defer></script>

Choose where it sits

The widget's button sits bottom right. Set "position": "bottom-left" in window.epicContext (or choose it on the settings page) to move it.

The options are token, position (bottom-right or bottom-left) and apiUrl, which defaults to the address the script was loaded from. The script is about 106 KB, 23 KB compressed, and loads after the page (defer).

What reviewers see

The widget has three tabs:

  • Brain: what this page is in the graph. Its page in the information architecture, its content page, the journey steps that pass through it, the glossary terms it uses and the blocks linked to it, with links to open them in the book or as markdown.
  • Design: the components this page uses, from the design system.
  • Comments: comments on this page. A comment is a comment, suggestion, bug or question, carries the reviewer's name, and can be pinned to an element on the page. Show on page draws the pins.

From comment to context

Comments land in the project with their page's route. In an AI session, list_comments reads them (per block, per route, or only the unresolved ones), and ingest_comments runs the ones you choose through ingestion: the resulting writes land as one batch, each with a reason, and the batch reverts in one action if it landed wrong.

The token is public

The token sits in your page's HTML, so treat it as public. It only allows what the widget does: reading the project's context, with the organisation's shared blocks, and leaving comments; it cannot edit blocks. Anyone who has the token can read that context through the widget, from anywhere, so put the widget on a prototype or review site meant for the people who should see it. Regenerate token (owners and admins) replaces it and cuts off every old copy at once; the page asks first, because every site with the old token stops working.

Next

Last updated: