Skip to content

Developer tools

One YAML persona, rendered for four coding agents

4 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Coding agents →
Image: github.com

Edward Fry’s Personetta, an MIT-licensed Python CLI shared on August 19, takes a coding persona written once in YAML and generates three files for each of four agents: Cursor, GitHub Copilot, Claude Code and Cline. Personas are built from layers, merged under explicit conflict rules and validated against schemas, and the project reports 1,641 passing tests.

The project’s README on GitHub describes the problem it targets: every assistant has “its own rules format, its own file locations, and its own quirks.” A team that wants the same “senior Python reviewer” or “C# architect” in all four tools ends up maintaining four copies by hand. Personetta keeps one YAML source and generates the tool-specific files from it.

How a persona is assembled

A persona in Personetta is a recipe, and a recipe is a stack of reusable layers kept in separate folders. data/base/ holds foundational roles such as engineer, reviewer and tester. data/language_specific/ adds language and framework layers. data/recipes/ defines each composition: which layers it uses, in what order, and with what overrides. The shipped recipes cover four tasks for each language (design, implement, review and test), which gives names like implement-python and review-python.

Two more folders govern how the stack fits together. data/config/merge-config.yaml sets a merge strategy for each field, along with explicit rules for which value wins when two layers disagree. data/schemas/ holds JSON Schemas that every YAML file is checked against, and personetta validate runs that check on demand.

The merge step is the main difference from keeping one Markdown file and copying it around. Claude Code, according to its documentation, loads instruction files from several scopes, from broadest to most specific, so a project instruction lands in context after a user one. Its memory files are concatenated, not overridden, and when two instructions conflict the model may follow either. Personetta settles conflicts between its own layers before anything is written, using rules kept in one config file.

What lands on disk

The generator in src/generator/ loads, validates, composes and renders each recipe through a formatter for each tool. The output is Cursor rules, Copilot instructions, Claude Code memory and Cline rules, installed into user-level folders in the home directory: ~/.cursor/rules/, ~/.copilot/instructions/, ~/.claude/rules/ and ~/Documents/Cline/Rules/.

Each tool gets three files: an always-on baseline, a router index listing every persona, and the full active recipe. Recipes are pre-generated and kept in a local cache, so switching personas never regenerates anything.

The README’s five steps

Personetta needs Python 3.11 or later. Alongside pip, it can be installed as an isolated CLI with pipx install personetta, and the repo ships convenience scripts that set up PATH and verify the install: Setup-Personetta.ps1 for Windows and install-personetta.sh for Linux and macOS. The README’s 60-second demo has five steps:

  • pip install personetta installs the package.
  • personetta list shows the available roles and recipes.
  • personetta install '*' --format claude installs every recipe for one tool. The format flag takes cursor, copilot, claude or cline, and wildcards such as 'test-*' or '*python*' narrow the set.
  • personetta set-active implement-python --format claude activates a persona for that tool.
  • personetta verify checks install health: version, PATH and recipe data.

Switching later takes one line, for example personetta set-active review-python --format claude. There are three more commands: personetta current shows the active recipe, personetta recipe <name> --format <tool> prints one composed recipe, and personetta remove '<pattern>' --format <tool> removes installed recipes. The active persona is set per tool.

The demo’s final check is still a question to the model: open the tool, ask “What role are you playing?”, and it should describe the active persona. That matches how Claude Code treats such files. The docs describe CLAUDE.md and auto memory as context, not enforced configuration, and recommend a PreToolUse hook for any action that must be blocked whatever the model decides. Personetta controls what the agent is told across all four tools. Whether the agent follows it is still up to the agent.

The guards on the code

The 1,641 passing tests span unit, integration and quality suites. Pytest also enforces a set of limits: cyclomatic complexity of 10 or less, functions of at most 25 lines, files of at most 400 lines, caps on method and import counts, and checks for workspace conventions. The code is linted with ruff and type-checked with mypy, and CI runs on every push.

The packaging guards go one step further: they build a real wheel and prove that every recipe ships inside it.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.