Repository navigation
Description
Item 4 of 11 in the Personas v2: simpler specialists milestone. It ships in one release with #777 and #778.
The problem
A persona today has a default policy plus a list of allowed policies, picked from seven names: read-only, workspace-write, critic-review, critic-fix, diagnostic, publish-only, and full-access. Two of them can't be enforced by any driver, and a couple are near-duplicates. Nobody can keep straight which persona runs with what access, or which providers can actually hold it to that.
Where this sits
Decision 10 of the Personas v2 proposal. Bastian's comment on the proposal: "I like the simpler access models."
What we already have
- Contract:
AgentPersonaAuthorityPolicylists the seven names, and the definition view carriesdefaultPolicyandallowedPolicies. Both are inpackages/contracts/src/j5/agentPersona.ts:47-56and:223-224. The catalog'spolicyEnforcementreports which drivers enforce each policy. - Provider mapping:
apps/server/src/j5/agents/agentPersonaProviderPolicy.tsmaps each policy to a runtime mode and sandbox, and lists the drivers that enforce it.providerCanEnforceAgentPersonaAuthorityis the check. - Runtime check:
agentPersonaRuntime.ts:43-56refuses a turn whose policy isn't inallowedPolicies, or whose driver can't enforce it. - Editor:
AgentDefinitionFields.tsxshows a Runtime policy picker and lists the providers that can't sandbox it.
Proposal
A persona has exactly one access level: read-only, workspace-write, or full-access. allowedPolicies goes away. Old names map as described in #777.
Which drivers enforce each level today:
| Access | Drivers that enforce it |
|---|---|
| read-only | Codex, Claude |
| workspace-write | Codex only |
| full-access | all drivers |
All 11 live personas are restricted, so in practice they run on Codex or Claude. Agent Setup and the docs should say that plainly, not imply any provider can run any persona.
code-reviewer loses its critic-fix option. Fix rounds go back to the builder, so a reviewer never turns into an author.
Acceptance criteria
- The definition, create, and edit contracts carry one access field with three values.
allowedPoliciesand the default/allowed pair are gone from new writes. - Selection (Personas: an ordered model list #778) only uses entries whose driver enforces the persona's access, matching the table above.
- The runtime no longer checks
allowedPolicies. It maps the assignment's stored policy to an access level (Personas: old personas and running workers survive the upgrade #777) and confirms the driver enforces it. - Agent Setup on web, desktop, and mobile offers the three levels and shows which providers enforce the chosen one.
- Choosing a model whose provider can't enforce the level marks that entry in the editor, the way the runtime-policy picker does today.
-
j5_list_personasreports each persona's access level. -
docs/j5/user/personas.mduses the three levels and includes the enforcement table. - Focused tests cover the enforcement table and the runtime refusing a driver that can't enforce the level.
Out of scope
- Proving instruction delivery on Cursor, OpenCode, Pi, and ACP. A provider only counts as supported for personas once saved instructions, model, and access are proven to reach it. Cursor may need an upstream-divergence decision. I'll track that separately.
- The access cap based on who picked the persona (Personas: agents pick personas, and who picked sets the limits #781).
Activity
feat(j5): personas use three access levels (#923)