Personas

A coding agent optimized for implementation isn't the best reviewer. A QA mindset doesn't write good specs. Personas let you swap the judgment — the lens through which the agent approaches your code — and optionally constrain which built-in tools that role may use. Different priorities, different questions, different output.

See Persona Research for the science behind why role framing changes agent behavior — and where it doesn't.

Built-in Personas

PersonaLabelDescription
analystBusiness AnalystRequirements out of vague asks — contradictions, gaps, scenarios, acceptance criteria, API contracts
appsecSecurity EngineerApplication security — threat modeling, secure code review, vulnerability analysis
architectArchitectSystem design — trade-off analysis, ADRs, module boundaries; the deliverable is a decision, not a diff
assistantAssistantGeneral-purpose everyday help — questions, planning, writing, quick lookups; uses tools only when a task needs them
coder-with-subagentsCoder with subagentsDelegates parallel and isolated work to sub-agents via the task tool
coder-with-subagents-force-reviewCoder with mandatory reviewSame delegation, plus a mandatory review gate: every code change goes through an independent review sub-agent (fresh context, diff-based, one round) before being reported done
codingCoding agentDefault persona — reads files, runs commands, edits code with precision
dbaDatabase EngineerSchema design, migrations, query optimization, indexing
devopsDevOps EngineerCI/CD, IaC, containers, Kubernetes, deployments, observability
fiction-writerFiction WriterCreative fiction and literary prose
marketerMarketerPositioning, messaging, and go-to-market
pmProject ManagerTask and spec writing — breaks work into clear, actionable tickets
productProduct ManagerProduct thinking — hypotheses, success metrics, prioritization, user stories from raw feedback
qaQA EngineerFunctional testing — verifies features, builds test plans, catches regressions
qa-nfrQA Non-FunctionalNon-functional testing — performance, security, reliability, scalability
researcherResearcherOpen-ended questions and investigations — searches, reads sources, cross-checks claims, answers with citations
seniorSenior DeveloperLazy senior dev — the ladder, root-cause fixes, deletion over addition
sreSRE / Incident ResponderIncident-mode thinking — logs first, hypothesis→check loops, blameless postmortems, SLOs
sysadminSystem AdministratorOperations and infrastructure — diagnoses systems, manages services
tech-writerTechnical WriterDocumentation — READMEs, guides, API references, changelogs, diagrams

The coding persona is the default. coder-with-subagents and coder-with-subagents-force-review are the personas that enable the task tool for delegating work to sub-agents.

Why coder-with-subagents-force-review reviews in a sub-agent rather than in place: self-review in the same context is unreliable (the model is biased toward the reasoning that produced the code, and a contaminated context contaminates the check). The gate hands the reviewer only the task summary and the diff — never the implementation reasoning — requires findings to be confirmed by execution, and runs exactly one round to avoid review ping-pong.

Switching Personas

The persona travels with the thread: each session remembers the persona that drove it, and resuming (-c, --resume, /sessions, /continue) restores that persona — same rule as plan/build mode. The global choice in ~/.cast/settings.json is the default for new sessions only. If a session's persona was deleted, resume keeps the current one with a notice.

Switching mid-conversation leaves the previous persona's reasoning in the context, so after switching to a different persona in a non-empty thread, cast offers to start a new session (the /new flow) — pick "Continue here" (or press Esc) to keep the current thread; the thread is then re-stamped with the new persona.

Custom Personas

Create a .md file in one of these locations:

LocationScopeTrust
~/.cast/personas/Global (all projects)Always loaded
.cast/personas/Project-localTrust-gated

File Format

---
name: my-persona
label: My Custom Persona
description: What this persona does
subagents: false
tools: [read, grep, ls, plan_*, web_*]
agentsMd: true
---

You are a specialized assistant focused on [role].

Your approach:
- [guideline 1]
- [guideline 2]

When analyzing code, always consider:
- [consideration 1]
- [consideration 2]

Frontmatter Fields

FieldRequiredDescription
nameYesIdentifier (lowercase, used in -p flag and /persona command)
labelNoDisplay name (defaults to name)
descriptionNoShown in persona listings
subagentsNotrue to enable the task tool (default: false)
toolsNoAllowlist of built-in tools. Omit = all builtins. Exact names or *-globs (plan_*, web_*). MCP tools are never filtered by this list
agentsMdNoInject AGENTS.md / CLAUDE.md into the system prompt (default: true)

The body (after frontmatter) becomes the system prompt. A shared error-handling section is appended automatically from prompts/error-handling.md — you don't need to include tool-failure mechanics in your persona.

Tool allowlist (tools)

When set, only matching built-in tools are advertised to the model and executable (a fabricated call to a filtered tool returns "not available"). Connected MCP servers are unaffected — their tools stay available whenever the session has them connected.

tools: [read, grep, ls]           # readonly builtins
tools: [read, grep, plan_*, web_*] # globs expand to plan_check, web_search, …
tools: []                          # no builtins (MCP still available)
# omit the field entirely         # all builtins

Session policy still applies on top of the allowlist: plan/build mode, the web-tools toggle, and headless cast run can disable tools via their own denylist even if the persona listed them. The task tool additionally requires subagents: true.

AGENTS.md (agentsMd)

By default (agentsMd: true, or the field omitted), project context files (AGENTS.md / CLAUDE.md) are injected into the system prompt. Set agentsMd: false to skip them for that persona.

Priority

On a name collision, the first-loaded persona wins:

  1. Project (.cast/personas/) — highest priority
  2. Global (~/.cast/personas/)
  3. Builtin (prompts/personas/) — lowest priority

This lets you override a built-in persona by creating one with the same name.