Ritual

account created

Complete in your agent

Run this in your coding tool. Ritual will initialize the spec and generate the complete brief for this task.

paste this
npm i -g @ritualai/cli && ritual init --token rtl_boot_k3q8v2m9x4 --exploration 7c1f2a90 && ritual refine
one paste: your agent opens with the refine flow loaded when init finishes

How to run it

One command, run from inside the repo.

  1. 1

    Open a terminal and cd into the repo this task is for.

  2. 2

    Paste the command above and press Enter.

  3. 3

    Answer a few grounding questions about your codebase.

  4. 4

    Ritual writes the brief to .ritual/ and prints ritual begin. Run that in your agent to start building.

What happens across the lifecycle

Intent is saved. Let’s pick up at Refine.

  1. Intentdone
    your exploration · saved Saved to your account.
  2. Refinenext
    ritual refine Reads your codebase, updates discovery to recommendations. Grounds your build brief.
  3. Build
    one commit per outcome Your agent implements from the brief. The checklist decides what counts as done.
  4. Test
    audit chain Every finding logged with a repair. Acceptance criteria enforce it.
view your build brief in the browser instead

This exploration stays saved to your account either way.

You’re in. One command left.

Turn the thing you’re building right now into a build brief.

Run this in your project. Ritual runs structured discovery against your codebase, then hands your coding agent a brief it can build from — grounded in the code you already have.

in your project directory about 3 minutes
npm i -g @ritualai/cli && ritual init
sign-in opens in your browser when init runs — nothing else to configure
  1. scopes against your codebase
  2. asks the blocking questions
  3. recommends an approach
  4. writes the build brief

What a run actually looks like

One real task, start to finish. You bring the sentence — Ritual does the rest.

The task you type

“Let people invite teammates into their workspace.”

  1. 01

    Scopes the problem

    Ritual reads the codebase to figure out what this task actually touches.

    • auth: better-auth sessions (lib/auth.ts)
    • db: postgres + drizzle — `members` table already exists
    • email: resend, transactional templates in /emails
    • blast radius: 1 migration, 2 routes, 1 settings screen
  2. 02

    Asks the questions that would have blocked the build

    The decisions an agent would otherwise guess at, surfaced up front.

    • Q: invite by email, or shareable team link?
    • Q: reuse owner / admin / member, or add a billing role?
    • Q: what happens when an invite exceeds the seat count?
    • Q: should invites expire, and after how long?
  3. 03

    Turns the answers into recommendations

    Each one is a resolved decision, justified against your existing code.

    • Email invite + 7-day signed token — matches your existing Resend setup
    • Reuse owner / admin / member — already enforced in `members.role`
    • Enforce seats server-side on accept, not on send
    • Skip a new billing role — no billing surface in the repo yet
  4. 04

    Writes the build brief your agent works from

    The recommendations become a spec, not a chat transcript. This file lands in your repo.

    .ritual/build-brief.md
    # Build brief — Add team invitationssource: 4 recommendations, all accepted## ScopeInvite teammates by email into an existing org, withseat limits enforced at accept time.## Constraints from the codebasereuse better-auth session in lib/auth.tsextend drizzle schema — do not recreate `members`send through the existing Resend client## Plan1. migration: invitations (token, email, role, expires_at)2. POST /api/invites — validate seat + role, send email3. accept flow at /invite/[token] — verify, then join org4. settings/team UI: list, resend, revoke## Acceptanceexpired + already-used tokens rejected with a clear errorseat overage blocked server-side, surfaced in the UI
Prefer the details first?
Sign-in
The command redeems a one-time token from this page. It works once and expires in 10 minutes.
Output
Your exploration and brief are written to .ritual/build-brief.md, committed with your code if you want them there.
Handoff
/ritual refine re-reads the codebase and updates the brief. /ritual begin hands it to your agent — auto mode to build, plan mode to review first.
Editors
Works in Cursor, Claude Code, Codex, Copilot, Windsurf, and any agent that reads your repo.