Skip to content

Personas: stop appending hidden commit and PR rules; show which providers enforce which policy #439

Done

Description

@Jacksondr5

Problem

Every persona launched from the library gets a block of rules appended after its own instructions (apps/server/src/j5/agents/agentPersonaRuntime.ts:51-60):

## Selected behavior: <policy>
These are operating instructions, not additional sandbox guarantees.
Never commit or push.
Do not mutate pull requests.
Never merge a pull request.

critic-fix adds "Edit only to address the requested review findings." publish-only swaps the first two lines for scoped permission to commit, push and update pull requests.

These are hidden rules that override what the person wrote:

  • The only policy that permits a commit is publish-only, which cannot launch on any provider. So every persona that can run is told never to commit, push or touch a pull request.
  • A persona whose own instructions say "commit your work and open a PR" gets the block appended after that text, contradicting it.
  • A Crew seat the person sets to Full access on the roster card still gets "Never commit or push."
  • Nothing in the persona editor or docs/user/personas.md says this happens. The policy labels are "Read only", "Workspace write", "Review only" and "Targeted fixes".

Decision (Jackson, 2026-10-03)

J5 does not try to enforce an unenforceable runtime policy with a prompt. A runtime policy means what the provider's sandbox enforces, and nothing more. What a persona should or should not do beyond that belongs in its own instructions, where the person can read and change it.

When someone builds a persona, the editor makes clear which providers can enforce which policies.

What changes

  • Remove the appended "Selected behavior" rules from persona runtime instructions. Keep the platform-tools note, which is about J5's tools and not about the policy. Decide whether it still needs to be said.
  • The bundled example personas keep whatever their own instruction text says about commits; that text is visible and editable.
  • The persona editor shows, for the chosen runtime policy, which providers can enforce it, from one source the server owns (providerCanEnforceAgentPersonaAuthority), not a second list in the client.
  • Rewrite the affected parts of docs/j5/product/agent-personas/index.md (the behaviour matrix and the paragraph at line 175 that records the appended instructions) and docs/user/personas.md.
  • Tests that pin the text: agentPersonaPrompts.test.ts, CrewLaunchService.test.ts.

Wanted alongside this: personas that run with full access (#432)

#432 records that a persona cannot run with full access outside a Crew seat: every runtime policy is a sandbox with the network off, and only Codex and Claude can launch any of them. Jackson confirmed on 2026-10-03 that we want what #432 asks for.

The two fit together. Once the appended rules are gone, a policy is only what a sandbox enforces, so a persona that should not be sandboxed needs a real way to say so. An access mode every provider already supports gives it one, with no prompt-based enforcement and no adapter work. It is also what gives providers other than Codex and Claude something they can run.

Related

Activity

  1. bryantderosier commented on Dec 1, 2026

    @bryantderosier
    Collaborator

    Both halves are done. #391 (9745f1b010) took out the appended commit/PR block. agentPersonaRuntime.ts says "J5 appends no hidden rules" now and only adds the platform tools note. #923 finished the other half: the editor shows which providers enforce which policy, using the server's policyEnforcement. The persona docs (agent-personas/index.md, docs/j5/user/personas.md) are rewritten to match. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions