🌱 Eco-design for any AI coding assistant
RGESN, GR491, Opquast and RGAA turned into rules an assistant applies as it writes code, and an agent checks on the diff. One source, eleven assistants.
View on GitHub Install for your assistant
An assistant writing a query, an image tag or a loop has no default knowledge of your organisation's eco-design framework. Once the code ships, every run repeats that initial choice, for every user, for as long as the service lives. This repository closes that gap: it turns RGESN, GR491, Opquast and RGAA into instructions the assistant loads automatically, in its own native format.
Two moments, one set of rules
The rule
Injected into the assistant's context, it steers what gets produced before you even read it back.
-- prompt: "the operations report for a client"
SELECT * FROM operations;
SELECT id, client_id, date_operation, montant
FROM operations
WHERE client_id = :id
ORDER BY date_operation DESC
LIMIT 50;
GR491_Backend_1
The agent
Reads back what was committed and cites the source criterion on every finding, for the review and for the team's own learning.
$ cn review --review-agents eco-check.md
[Medium] client-report.sql:9
SELECT * on an unfiltered table, GR491_Backend_3
→ explicit columns + pagination
1 finding, 0 regressions
GR491_Backend_3
One source, eleven assistants
Rules are written once, scoped by language. A script (scripts/generer-versions.py) generates them in each assistant's native format. No manual copies, no version quietly falling behind the others.
Four frameworks, brought down to something actionable
RGESN v2
French general eco-design framework (ARCEP, ARCOM, ADEME). Official framework →
RGAA 4
French accessibility framework, carried by the dedicated review agent. Official framework →
Thirteen languages, each with its own reflexes
An N+1 query does not look the same in JPA, in Entity Framework or in ActiveRecord. Each rule names the patterns specific to its language rather than generic principles, which makes it checkable and fixable.
What about green-claude?
green-claude, another INR project, answers the same question: getting an AI coding assistant to respect RGESN and GR491. The design choices differ on three points.
green-claude is a Claude Code skill: it installs once into ~/.claude/skills/ and targets that harness only, with hooks specific to that product (local cache, peak-hours warning). This repository starts from a single source and generates eleven declinations. A team working in Gemini CLI or Continue has no access to green-claude's rules; it does have access to these.
On detection, both projects now share the same deterministic layer. green-claude's eco-audit.sh inspired ours, which reuses its patterns, adds the HTML/CSS coverage green-claude does not have, then ties every finding back to a criterion verified in referentiels/. That layer matters: measured on our verification corpus, a local model catches 16 gaps out of 18 but attributes them correctly only once out of eighteen, and invents criterion identifiers. Grep finds fewer (12 out of 18) and traces every one. Neither is enough on its own.
On coverage, the roles reverse. green-claude keeps 35 rules out of the 78 RGESN criteria, with a strong anchor on the Algorithms/AI family and on the frugal use of Claude Code itself (14 practices inspired by Boris Cherny). This repository covers that last point in the usage-sobre-assistant.md rule, and adds thirteen languages with anti-patterns specific to each, plus a framework green-claude does not use, Opquast.
A team running both would get the best of the two mechanisms: green-claude's script for a fast first pass over known patterns, this repository's rules for what grep cannot see.
Going further
- Developer guide (in French): install, use day to day, run a review, troubleshoot.
- Deployment guide (in French): roll the rules out to teams (git, Hub, CI).
- Writing a skill (in French): author and test a rule or an agent.
- Full README in English: per-assistant install instructions, verification, troubleshooting.