First loop
This is the AI coding agent + AuthRight path (Cursor, Codex, or Claude Code). Install @authright/cli first — see Installation.
Day-to-day work happens in the agent chat after a one-time terminal bootstrap (authright init). Host skills/commands use the model. Bare terminal authright scan / change --analyze / similar verbs are offline only (no LLM)—do not use them as the happy path. Terminal flag detail lives under How commands work and CLI.
1. Initialize the project
In the repository root:
Omit --tools to pick Cursor, Codex, or Claude Code interactively (detected hosts are pre-selected on first run). Pass a single host when you already know:
Init writes host commands/skills and .authright/AGENTS.md. Then open that same project in your agent.
2. Pick one Decide command
/auth:change (auto-plan) is the recommended first Decide path. /auth:explore (HITL) is the peer alternative for the same ask — pick one. Neither command is a mode, fallback, or prelude of the other. Recommended options in HITL or auto-plan are labeled — they are not already selected. --ready does not silently Implicit-Preserve; confirm the plan in chat first.
Host forms differ. Product names keep the colon (/auth:change); type what your host registered.
3. Cursor
/auth-scanRepo scanned. Context → .authright/context.yaml
/auth-change Integrate OIDC via adapterAUTH-YYYY-NNNN allocated (kept in this chat). Brief + slice accepted. Auto-plan: Decided for you / Needs your choice / Optional extras. Answer open slots, then confirm to lock.
/auth-request-match(or /auth-request-match AUTH-YYYY-NNNN)
Match clear — locked plan still fits your ask.
/auth-to-plan(or /auth-to-openspec — needs OpenSpec on PATH) · (or /auth-to-plan AUTH-YYYY-NNNN)
Plan-mode handoff package ready.
/auth-review(or /auth-review AUTH-YYYY-NNNN — after agents implement, optional)
Review under .authright/reviews/AUTH-YYYY-NNNN/
HITL alternative for the same ask: /auth-explore Integrate OIDC via adapter instead of /auth-change ….
4. Codex
Codex uses skills ($authright-…), not slash command files.
$authright-scanRepo scanned. Context → .authright/context.yaml
$authright-change Integrate OIDC via adapterAUTH-YYYY-NNNN allocated (kept in this chat). Brief + slice accepted. Auto-plan ready — answer open slots, then confirm to lock.
$authright-request-match(or $authright-request-match AUTH-YYYY-NNNN)
Match clear — locked plan still fits your ask.
$authright-to-plan(or $authright-to-openspec) · (or $authright-to-plan AUTH-YYYY-NNNN)
Plan-mode handoff package ready.
$authright-review(or $authright-review AUTH-YYYY-NNNN — optional after implement)
Review under .authright/reviews/AUTH-YYYY-NNNN/
HITL alternative: $authright-explore … instead of $authright-change ….
5. Claude Code
/auth:scanRepo scanned. Context → .authright/context.yaml
/auth:change Integrate OIDC via adapterAUTH-YYYY-NNNN allocated (kept in this chat). Brief + slice accepted. Auto-plan ready — answer open slots, then confirm to lock.
/auth:request-match(or /auth:request-match AUTH-YYYY-NNNN)
Match clear — locked plan still fits your ask.
/auth:to-plan(or /auth:to-openspec) · (or /auth:to-plan AUTH-YYYY-NNNN)
Plan-mode handoff package ready.
/auth:review(or /auth:review AUTH-YYYY-NNNN — optional after implement)
Review under .authright/reviews/AUTH-YYYY-NNNN/
HITL alternative: /auth:explore … instead of /auth:change ….
What the agent is doing
Skills use the host LLM and may shell offline public verbs under the hood (scan, change, plan confirm, --ready, and so on). You stay in chat: confirm the plan, then run request-match, then pick one handoff — Plan mode (to-plan) or OpenSpec (to-openspec). Omit the change id on those follow-ups while it stays in chat context. Export waits until request-match is clear. AuthRight does not write application source.
Both Decide paths start from an IAM Brief and an accepted slice. If context is missing or stale, intake can scan first; you can still run scan yourself. /auth:doctor (host forms: /auth-doctor, $authright-doctor, /auth:doctor) is optional anytime for a source risk report at .authright/diagnosis/report.md — it is not a required step between scan and Decide.
Next
- Existing projects — the repo already has IAM
- Workflows — day-to-day patterns
- Examples — copy-paste recipes
- After a lock: Reviewing decisions, then Implementation
- Advanced lookup: Overview, How commands work, Commands, CLI
Installation
Install the AuthRight CLI (@authright/cli) for the coding-agent path (Cursor, Codex, or Claude Code).
Existing projects
AuthRight is built for brownfield IAM: mixed IdPs, legacy sessions, partial OIDC, framework security that grew over years. You do not document the entire identity estate before the first useful change.