Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

Repository files navigation

compassion-agent-toolkit

Compassion Switzerland's shared setup for AI coding agents on our Odoo work, for Claude Code, plus a translation glossary for anyone writing in Compassion's languages. Two layers:

  1. Guardrails, enforced for everyone through managed settings: no reading credentials, no force-push.
  2. Optional plugins in the compassion marketplace, visible in /plugin → Discover. Install all, some or none; remove any whenever you like.
Plugin What it gives you
compassion-bundler All the Compassion plugins in one install
find-docs Current docs for any library through Context7, and Odoo docs pinned to your repository's version
agent-browser The agent checks its work in your local Odoo through a real Chrome: screenshots, console errors, forms
assisted-by Every commit the agent makes ends with Assisted-by: <model id>, <effort>, <harness>
ticket /ticket T#### takes an Odoo ticket from report to staged fix on your local Odoo; plus /ticket-list, /ticket-explore, /ticket-stats, and /t for short. Personal data in tickets is masked before the agent sees it
code-rules Compassion's code rules, one file per subject, opened only when a change needs it; records architecture decisions (ADRs); a read-only rules review before each PR
odoo-rules The Odoo rules on top of code-rules: access rights, side effects in transactions, translations. Installs code-rules too
translation-glossary Compassion's agreed words in each language (sponsorship, gifts, donations, form of address), for translating or writing interface text, letters, emails, newsletters and web copy. Also in the Claude desktop app, see below

The catalog is a common floor, not anyone's personal setup.

Install

Before you start: Claude Code, logged in with the organization's account, plus what your plugins need:

  • find-docs, agent-browser: Node.js 22.13+ and npm (on Debian and Ubuntu, npm is a package of its own)
  • assisted-by: Node.js 18+
  • ticket: Python 3 with venv (on Debian and Ubuntu, python3-venv)

A plugin missing its Node.js warns when a session starts.

1. Choose your plugins

Everything, in one install (recommended)

/plugin install compassion-bundler@compassion

Or only what you want, from /plugin → Discover, or one at a time:

/plugin install find-docs@compassion
/plugin install agent-browser@compassion
/plugin install assisted-by@compassion
/plugin install ticket@compassion
/plugin install code-rules@compassion
/plugin install odoo-rules@compassion
/plugin install translation-glossary@compassion

Or let your agent do it. Paste this into a new Claude Code session; it asks before each step:

Set me up with the compassion-agent-toolkit, following ONBOARDING.md from the CompassionCH/compassion-agent-toolkit repository.

2. Restart Claude Code

/exit

then start claude again. The plugins load in the new session.

3. Optional: log in to Context7, for find-docs

Higher rate limits. Run it once, in a terminal:

npx ctx7@latest login

4. First use of agent-browser

Nothing to do now: the first time the agent needs the browser, it offers to install the CLI and its Chrome, asking before each step.

5. First use of ticket

The first /ticket tells you what's missing and gives the exact command for each step:

  • Connection: you run odoo_ticket.py setup in your own terminal. It asks for the Odoo URL, database, the shared bot account (Enter keeps [email protected]), its API key (in the team key vault: search for claudecode), and your own Odoo login. It writes ~/.config/compassion-odoo/config.ini: the API key never goes through the chat, and the agent is denied reading that file.
  • Name detection: a one-time install of Presidio and spaCy models (about 1 GB, into ~/.local/share/compassion-odoo/venv). The agent offers to run it. Until then, ticket reads stop rather than risk showing names.
No compassion marketplace in /plugin? (machine without the organization's settings)

Add it once:

/plugin marketplace add CompassionCH/compassion-agent-toolkit

Then turn on its updates: /plugin → Marketplaces → compassion → Enable auto-update.

Using ticket

Type /ticket T1234 (or /t T1234 for short) in Claude Code. The agent reads the ticket, reproduces it locally and proposes a fix, then stops for your approval. After fixing, it stages the files and proposes a commit message: you commit and push. /ticket-list shows your open tickets, /ticket-explore unassigned ones worth picking up, /ticket-stats some numbers.

Updates and changes

  • Updates are automatic. Claude Code fetches new versions when a session starts, and the next session loads them (or run /reload-plugins).

  • With the bundler, new plugins arrive on their own. When a plugin joins the catalog, the bundler's update installs it; nothing to do. If you picked plugins one by one, install new ones from Discover when you want them.

  • Remove or pause a plugin: /plugin → Installed → Uninstall or Disable. Remove a plugin only after the plugins that depend on it: the bundler depends on all the others, and odoo-rules on code-rules.

    • With the bundler: uninstall the bundler first, then the one you don't want. Its plugins stay installed; skip the claude plugin prune it then suggests, which would remove them all.
    • code-rules: keeping odoo-rules means keeping code-rules. To drop code-rules, uninstall the bundler if you have it, then odoo-rules, then code-rules.
  • For a whole repository: run this in the repository, then commit .claude/settings.json. Everyone opening the repository is offered the plugin.

    claude plugin install <plugin>@compassion --scope project

In an Odoo repository

Put the Odoo version on line one of the repository's CLAUDE.md (draft one with /init) or AGENTS.md, plus your local Odoo URL. find-docs pins the docs to that version, and agent-browser uses that URL.

Using translation-glossary

Ask for the translation or the text as usual ("translate this newsletter into Italian", "add the new strings to the Polish catalog"): the agent opens the glossary for that language on its own. It holds the words only; how a file or tool carries the text stays with the project's own rules (odoo-rules for Odoo catalogs).

Glossaries ship for German, Swiss French and Italian; Swedish, Norwegian, Danish and Finnish; and Polish. For another language the agent first drafts a glossary from the existing ones and stops for your approval before translating.

The glossary improves itself: when the work settles a term the glossary lacked, or a reviewer corrects the wording, the agent offers to open a pull request on this repository with the change, and opens it once you agree. It needs git and gh logged in to GitHub; without them (in the desktop app's chat, for example) it gives you the change as text for a maintainer.

translation-glossary in the Claude desktop app

  • Code tab: the desktop app shares Claude Code's plugins. Install as above, or + → Add plugins.
  • Chat and Cowork: Customize → Plugins → Add marketplace, enter CompassionCH/compassion-agent-toolkit, then install translation-glossary on its own. Install it directly: the bundler relies on plugin dependencies, which only Claude Code supports. Nothing else in the Install section applies there: no Claude Code, Node.js or restart needed.

find-docs and Context7

Context7 works without an account, at lower rate limits. For higher ones, log in once (install step 3) or set CONTEXT7_API_KEY. Never paste a key into the chat; if you do, revoke it and make a new one. ctx7 setup would install Context7's generic find-docs too: keep one, ideally this one, which pins Odoo versions.

Personal data in tickets

With ticket, every ticket read goes through a sanitizer before the agent sees it: last names, emails, phones, IBANs, AHV numbers, IPs and addresses become tokens like {{NAME_1}}; first names stay. It knows everyone linked to the ticket, and name detection catches the others. Tokens are numbered per run, so people can't be linked across tickets. The plugin never writes to Odoo, and unmasked reads (--raw) only run in your own terminal, never in the agent's. To see what the agent would get, in your own terminal:

python3 <plugin path>/scripts/sanitizer.py --dry-run T1234

(<plugin path> is in the message setup printed, or the newest folder in ~/.claude/plugins/cache/compassion/ticket/.)

Masking lowers the risk, it doesn't remove it: an unusual name in free text can still slip through.

The agent can reach the API key, so what keeps it read-only is the claudecode account itself: an internal user with no app roles and technical features off. It can still do what every internal user can (post messages, upload attachments, edit events and registrations); the CLI never does.

The commit trailer

With assisted-by, every commit the agent makes ends with, for example:

Assisted-by: claude-opus-5-5, high, claude-code

It says AI helped while a human stays the author, in line with the OCA's AI policy. A hook adds it from what Claude Code records, so it never depends on the agent remembering. It costs nothing in context and never blocks a commit. Unknown values read unknown.

When another agent drafted part of the change, have the committing agent pass that agent's line too, with the values its own tool recorded, for example --trailer "Assisted-by: gpt-5-codex, high, codex". The hook keeps it and still adds its own, unless that exact line is already in the commit. Reviews and test runs get no line.

To count trailers per line (model, effort and harness):

git log --format='%(trailers:key=Assisted-by,valueonly,separator=%x0a)' | grep . | sort | uniq -c

For the workspace owner

Paste admin/managed-settings.json in claude.ai → Admin settings → Claude Code → Managed settings (Owner role). It:

  • registers the compassion marketplace with auto-update, installing no plugin;
  • blocks the retired all-in-one compassion-agent-toolkit plugin (0.3 and earlier);
  • denies reading credentials: odoo.conf, .odoorc, ~/.pgpass, .env*, private SSH keys, *.pem, *.key, the ticket config;
  • denies force-pushes; plain pushes stay allowed;
  • switches off Claude Code's Co-Authored-By line;
  • makes Claude Code read each repository's AGENTS.md together with its CLAUDE.md (Project instructions = claude-md-and-agents-md, set under cc-plugin-agents-md@builtin, and under agents-md@builtin for clients before v2.1.285). Without it, a CLAUDE.md or CLAUDE.local.md hides the repository's AGENTS.md. It overrides each developer's own choice in /config, and needs Claude Code v2.1.277 or later;
  • sets managedSourcesBehavior to merge: a machine that also has an MDM profile or a local managed-settings.json applies those too, combined with this policy (lists union, the strictest lock wins), instead of ignoring them. Needs Claude Code v2.1.242 or later.

These rules are guardrails, not a vault: keep production credentials off development machines and use anonymized databases (Odoo's neutralize is not anonymization).

Coming from toolkit 0.3

The single compassion-agent-toolkit plugin is retired. Follow Install to get the same tools back with compassion-bundler. The Context7 key from the old plugin's options is no longer used: log in again (step 3).

Feedback to Anthropic

/feedback, and thumbs up or down on claude.ai, send the whole conversation to Anthropic, kept up to 5 years. Check it holds no personal data, credentials or confidential code first.

Maintaining the catalog

claude plugin validate .                                  # the marketplace
for p in plugins/*/; do claude plugin validate "$p"; done # each plugin
claude --plugin-dir ./plugins                             # try them locally

Releasing = bump that plugin's version and push. Without a new version, nobody receives the change. Changes to admin/managed-settings.json apply once the workspace owner pastes them.

The translation glossary grows by pull requests that agents open, one point each, with the patch version bumped. Have the communication team review the wording before merging. Two pull requests opened from the same version both bump to the same number and merge without a conflict, so before merging, check that the pull request's version is higher than main's, and raise it if not.

Plugins that other tools read from main (code-rules, odoo-rules, and translation-glossary, which odoo-rules points to): the repositories' AGENTS.md have agents without the plugins clone this repository, or read the files online, so a merge reaches those agents at once. Merge a change to them with its version bump, so Claude Code users receive it too.

Adding a plugin:

  1. Create plugins/<name>/.claude-plugin/plugin.json (name, version, a one-line description), with its skills or hooks beside it.
  2. Add it to .claude-plugin/marketplace.json: source: "./plugins/<name>".
  3. Add it to compassion-bundler's dependencies and bump the bundler's version, or bundler users never receive it.
  4. Add a row to the table above.

One job per plugin, each useful on its own.

License

MIT, see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages