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.

Work the loop in your AI coding agent (Cursor, Claude Code, or Codex). The packaged skills/commands use the host model. A bare terminal authright scan (or change --analyze) is offline only—it does not call an LLM—so do not treat the shell as the happy path for scan/Decide.

Start with scan, not a blank encyclopedia

Bootstrap once in the terminal, then open the same repo in your agent:

Terminal
$cd your-existing-app
$authright init

Omit --tools to pick the agent you are in, or pass --tools cursor (or claude / codex). Installation.

In the agent chat, run scan with the host form (this is where judgment and LLM-backed work happen):

Cursor:       /auth-scan
Claude Code:  /auth:scan
Codex:        $authright-scan

That path writes heuristic signals into .authright/context.yaml and lets the host reason over the repo. Sparse repos get sparse context—that is expected. The first Auth Change locks decisions from that intent and from scan observations. A later change appends, or explicitly supersedes a prior decision through conflict clarification. Do not maintain constitution.yaml as iron law; init writes an empty stub that is not enforced.

Scan and pack-idiomatic landing work best on Java and Node.js / TypeScript today. Python and Go are supported and being strengthened; more languages and stacks will follow. Hybrid repos (for example a Vite frontend next to a Maven or Go backend) get a surface per build root. Concepts.

One change at a time

Pick a concrete identity problem (SSO for one app surface, token audience fix, logout consistency). Prefer change (auto-plan); explore is the HITL peer alternative — pick one. Type the host form in chat:

Cursor:       /auth-change Add Entra OIDC for the admin console
              # or: /auth-explore …
Claude Code:  /auth:change …
Codex:        $authright-change …

The host writes .authright/brief/brief.yaml (bounded aperture, one accepted slice) before Decide, then walks confirm/lock in the same session. After confirm, run request-match (omit the change id while it stays in chat context), then pick one handoff (to-plan or to-openspec). Implement. Review. Then take the next slice.

Terminal twins and flags are Look up under CLI—offline helpers for scripts/agents, not a substitute for the chat loop.

What “good enough” context looks like

  • Named IdPs / protocols you actually touch
  • Where sessions/tokens are established today
  • Still-valid accepted decisions from earlier changes (append, or supersede one lock explicitly)
  • Explicit non-goals for this change

Avoid boiling the ocean: full protocol matrices, every microservice, or Knowledge Graph dumps are not required for a first useful scan.

Team adoption

  • Commit .authright/ so decisions travel with the repo, including .authright/knowledge/ and .authright/AGENTS.md
  • Do not commit .authright/logs/ — init (and the first later command) writes .authright/logs/.gitignore so run JSONL stays local
  • Prefer host commands / skills for scan, Decide, request-match, and export so humans share the same AUTH-YYYY-NNNN and get host LLM judgment
  • Use Reviewing decisions before to-openspec or to-plan so implementation doesn't invent auth policy in code review

On this page