DEV Community

Cover image for My AI agent's guardrails are written in Spanish. They work exactly the same in English.
Peterson Andres Sena Arias
Peterson Andres Sena Arias Subscriber

Posted on

My AI agent's guardrails are written in Spanish. They work exactly the same in English.

A couple of weeks ago I wrote (in Spanish) about Senzu, the toolkit I built to stop repeating myself to my coding agents. Same rules in every project: don't commit to main, check the page on a phone before saying it's done, write down what you did and why, pick the palette before the third component, not after.

The short version of that post: rules in a CLAUDE.md are suggestions. The agent reads them and almost always follows them. "Almost always" isn't good enough for a real project, so I turned every rule that could be executed into something that executes: hooks that block, not paragraphs that advise.

Since then Senzu has gone from v2.7 to v2.19. That's a lot of new walls, a guided start for new and existing projects, a memory that keeps itself up to date, and a website. And the question I got the most after that first post was not about any of that. It was this:

"It's all in Spanish. Does it work if I don't speak Spanish?"

Yes. This post explains why, and then shows you everything that's new.

Why Spanish, and why it doesn't matter

Senzu is written in Spanish on purpose. There's a mountain of tooling for coding agents in English and almost nothing designed for people who work in Spanish, so I built the thing I wanted to use.

But here's what took me a while to see clearly: almost nothing in Senzu is written for you. It's written for the agent.

Who reads what: Spanish for the agent, your language for you

Think about what Senzu actually is:

  • Skills are instructions the agent loads when a task needs them: how to design a UI, how to audit a backend, how to plan a feature. The agent reads them. You never do, unless you're curious.
  • Hooks ("walls", muros in Spanish) are small Node scripts that run before and after the agent acts. They inspect the command or the file and either let it through or block it with a reason. The reason goes to the agent.
  • Commands like /plan or /adoptar are prompts with a name. You type the name; the agent reads the prompt.

Claude and GPT read Spanish as well as they read English. An instruction like "el dominio no conoce el framework" lands exactly the same as "the domain doesn't know about the framework". The model doesn't translate it into a weaker rule, it just understands it.

What you see is the conversation, and the conversation happens in your language. The hook that runs at the start of every session tells the agent, literally: "respond in Spanish, or in the language the user writes to you in". Write in English, get English back.

Your code doesn't become Spanish either. When you adopt an existing project, Senzu learns its conventions, including the language of its identifiers and comments, and seals them (more on that below). An English codebase stays English.

There are three places where Spanish leaks through, and I'd rather tell you than have you find out:

  1. The rules file installed in your project (CLAUDE.md / AGENTS.md) opens with "Comunícate en español". The session hook overrides it with "or the user's language", but if you want to remove any doubt, tell Senzu once and it will remember for every project:
   /recordar always answer me in English, and write the devlog and plan in English
Enter fullscreen mode Exit fullscreen mode

That line goes to your user memory (~/.config/senzu/memoria.md), which is injected at the start of every session in every project, with the instruction that it beats the agent's own habits.

  1. When a wall blocks something, the raw message is in Spanish. You'll see it scroll by in the tool output. The agent reads it, understands it, and explains it to you in English. Here's a real one, so you know what to expect:

A real wall: no commits on main, with the English translation
Real output of the guard hook. The "In English" box is my translation for this post; in a session, the agent explains it to you.

  1. Automatic capture of your corrections listens for Spanish. One of the new features (below) notices when you say things like "no vuelvas a…" ("don't do that again") and makes the agent write it down. The phrases it listens for are Spanish, so "from now on, never…" in English slips past it. The workaround is the same command: when you want something remembered, say /recordar … and it's stored, in any language. English phrases for the detector are on my list.

That's it. Everything else is the same as if Senzu were written in English: the same walls fire, the same commands run, the same skills load.

Quick recap: what Senzu is

If you didn't read the first post:

  • A package for Claude Code and Codex (Codex runs the same hooks since v1.5).
  • 43 skills: mine, plus the best ones I found from other people (with their author and license credited), with a layer on top that makes them work together. A router decides which one to load, so the context isn't flooded with things you don't need.
  • 24 hooks that block or remind.
  • 22 commands for the workflows I repeat in every project.
  • 9 stacks with their own rules: Laravel, Next, Nuxt, Astro, SvelteKit, Vue + TypeScript, Node APIs, WordPress and Python with LangGraph.
  • MIT licensed.

Now, what's new.

New: a guided start, for new projects and inherited ones

The biggest change since the first post is that Senzu now has an opinion about the order of things, and enforces it.

The method: one command per step, and a wall if you skip one

When you open a session, the start hook figures out where you are and tells the agent the next step of the method:

  • Empty or new project: /brief (a plain-language interview: what the business does, what visitors should do, what sites you like), then /propuestas (two genuinely different mockups you can open in a browser and vote on piece by piece), /design-system, /plan, and /siguiente to execute one task at a time.
  • Existing project with code but no sealed conventions: /adoptar first. Before the agent writes a single line, it studies how the project is actually written and agrees the rules with you.

And it's not a suggestion. The arranque-guard hook blocks the first attempt to write code if the missing step hasn't happened. No plan? The agent has to ask you what you're building before it starts.

The new website has a section for exactly this:

The two paths on the Senzu website
Each step links to its command page. The descriptions come straight from the Senzu repo at build time, so they never drift.

/adoptar: the agent writes like your project, not like itself

This is the one I'm proudest of, because it fixes the thing that annoyed me most.

Drop an agent into a three-year-old Laravel project and it will happily write code in its style: different naming, a different validation approach, a different folder layout. Every PR becomes a style argument.

/adoptar (adopt) reads the real code: naming, structure, how validation is done, how tests are named, what the git history looks like, which language identifiers and comments are in. It proposes the conventions, with a real example from your code for each one. You agree or correct. Then it seals them in senzu/conventions.md.

From then on:

  • The conventions-guard hook blocks code that breaks the sealed conventions.
  • The agent can't edit, move or delete the sealed file, not with an edit, not from the terminal, not by sneaking it into a commit. In v2.14 I found it could be bypassed if the path came in a different format (C:/ vs /c/) and fixed it as a security issue.
  • The project's convention beats Senzu's own preferences. Always.

New: declared architecture, enforced by a wall

v2.18 adds something I wanted for a long time. You declare your architecture once: MVC with services, hexagonal, or DDD. There are templates for Laravel, Node and Python. A wall makes the code respect it.

It checks layers, bounded contexts, controllers that talk to the ORM directly, DTOs and folders. It reads the real import map of your project (PSR-4, tsconfig aliases, Python modules), so it knows that App\Models\Order lives in infrastructure.

Here's what happens when the agent tries to put Eloquent in a controller of a hexagonal project:

A real wall: the controller can't use infrastructure

And when it tries to import the framework into the domain:

A real wall: the domain can't import the framework
Both are real outputs, produced by running the hook against a throwaway Laravel project for this post.

Notice the last line of each message: it doesn't just say no, it says where the code should go instead. That's what turns a wall into something the agent can act on in its next attempt. If you really need an exception, you approve it and it's written down with a reason, right on that line.

New: a feature isn't done until the backend says so

v2.17 extended the "no 'done' without proof" rule from the frontend to the backend. The feature-guard hook won't let the agent close a backend feature if:

  • there's no test for it,
  • there's a migration that was never run, or one without a working down,
  • a new config key was added but not to .env.example.

And every command now ends by saying what the next step is, so the chain from /brief to a deployed feature doesn't break in the middle.

Related: plan cards can't be marked as done without evidence (tarjeta-guard), and when the agent says it verified something, verifying means real output: lint, types, tests, build, and the mobile check for UI work. v2.19 taught the build verifier more languages (Rust, Ruby, Java, .NET, Deno, Makefiles) and what to do in projects with no manifest at all, instead of asking for a fake verification.

New: memory that maintains itself

The first post described the project memory: a short file with the decisions in force (D-012 · We do X because Y · see entry 063), injected at the start of every session. If the agent wants to contradict a decision, it has to quote it and ask.

v2.11 made it alive:

  • Your corrections are written down automatically. When you correct the agent with a rule ("don't do that again", "from now on…"), the memoria-viva hook notices and makes the agent write it down before going on; if it forgets, it can't close the session. (As mentioned above, it listens for the Spanish phrasing for now; in English, use /recordar.)
  • User memory: rules that apply to all your projects (language, git habits, how you like to be spoken to) live in one file outside any project. That's the /recordar trick from the language section.
  • Per-file memory: when the agent opens a file that has history ("this file broke twice because of X"), it gets reminded.
  • /retomar (resume): picks up where the last session left off, with what was done, what's pending and what was decided.

New: two agents, one repo, no mess

I often have Claude Code and Codex working on the same repository. That used to end badly: one agent committing the other's half-finished files, or finishing its session with a pile of uncommitted changes.

  • Clean exit (cierre-limpio, v2.10): the agent can't end a session leaving its own files uncommitted, and it can't touch files another agent is working on.
  • Protected branches (v2.12, refined in v2.19.2): no commits or pushes to main, develop, staging or production. Pushing to your own work branch (feat/…, fix/…) is allowed out of the box.
  • "Quoting isn't doing" (v2.16): walls used to fire when a commit message, a heredoc, an echo, a grep or a comment merely mentioned something forbidden. Now they look at what actually runs. Fewer false positives means fewer reasons to turn a wall off.

New: install profiles, and it tells you when it's out of date

  • Profiles (v2.9): instead of "everything or pick one by one", /instalar offers profiles: web, backend, frontend, AI agent, library. Each one brings the skills, walls and commands that make sense for that kind of project.
  • Out-of-date warning (v2.15): at the start of a session, if your installed Senzu is older than the latest release, the agent tells you, along with the two or three changes that matter most to you. No changelog reading required.

New: a website, with docs generated from the repo

Senzu has a home now: getsenzu.vercel.app.

The Senzu website

The part I like most is invisible. The documentation is never written by hand. On every build, the site fetches the latest tagged release of the Senzu repo and generates a page per skill, per command and per hook from the real files. The numbers on the home page (skills, hooks, commands, stacks) come from the same place. If a hook is added upstream, it shows up on the next deploy; if a command is removed, its page disappears.

Every hook has its own page, generated from the repo

The site and its docs are in Spanish too. If you're reading in English, your browser's translate button does a good job, and so does the agent itself: ask it "what does the feature-guard hook do?" and it'll read the docs and answer in English.

How to try it

In Claude Code:

/plugin marketplace add petersonsenadevs/senzu
/plugin install senzu-all@senzu
Enter fullscreen mode Exit fullscreen mode

In Codex, add the same marketplace from the app. Then, inside your project, open a session and type:

/instalar
Enter fullscreen mode Exit fullscreen mode

It detects the stack, asks what you want (a profile, everything, or à la carte) and sets it up. Then, if you want everything in English:

/recordar always answer me in English, and write the devlog and plan in English
Enter fullscreen mode Exit fullscreen mode

From there, if the project already has code, start with /adoptar. If it's a new one, /brief. The agent will tell you anyway.

What it isn't

It's opinionated. These are my working rules, not everyone's. You can turn walls off per project and change permissions, but only you can: the agent can't switch off its own walls, and that's by design.

It doesn't make the agent stop making mistakes. It still makes them. The difference is that now it finds out before I do, and the explanation of what to do instead arrives in the same message.

And it's in Spanish, which, as it turns out, matters a lot less than I thought. The agent doesn't care. Hopefully you won't either.

If you try it, tell me which wall you'd add. There's always one I missed.

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.