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.
npm i -g @ritualai/cli && ritual init --token rtl_boot_k3q8v2m9x4 --exploration 7c1f2a90 && ritual refine How to run it
One command, run from inside the repo.
- 1
Open a terminal and
cdinto the repo this task is for. - 2
Paste the command above and press Enter.
- 3
Answer a few grounding questions about your codebase.
- 4
Ritual writes the brief to
.ritual/and printsritual begin. Run that in your agent to start building.
What happens across the lifecycle
Intent is saved. Let’s pick up at Refine.
- Intentdoneyour exploration · saved Saved to your account.
- Refinenextritual refine Reads your codebase, updates discovery to recommendations. Grounds your build brief.
- Buildone commit per outcome Your agent implements from the brief. The checklist decides what counts as done.
- Testaudit chain Every finding logged with a repair. Acceptance criteria enforce it.
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.
npm i -g @ritualai/cli && ritual init - scopes against your codebase
- asks the blocking questions
- recommends an approach
- writes the build brief
What a run actually looks like
One real task, start to finish. You bring the sentence — Ritual does the rest.
“Let people invite teammates into their workspace.”
- 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
- 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?
- 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
- 04
Writes the build brief your agent works from
The recommendations become a spec, not a chat transcript. This file lands in your repo.
# Build brief — Add team invitations## 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.