AI and GNOME Shell Extensions

EGO Review Guidelines For AI

Since I joined the extensions team, I’ve only had one goal in mind. Making the extension developers’ job easier by providing them documentation and help.

I started with the port guide and then I became involved in the reviews by providing developers code samples, mentioning best practices, even fixing the issue myself and sending them merge requests. Andy Holmes and I spent a lot of time writing all the necessary documentation for the extension developers. We even made the review guidelines very strict and easy to understand with code samples.

Today, extension developers have all the documentation to start with extensions, a port guide to port their extensions, and a very friendly place on the GNOME Extensions Matrix channel to ask questions and get fast answers. Now, we have a very strong community for GNOME Shell extensions that can easily overcome all the difficulties of learning and changes.

The number of submitted packages to EGO is growing every month and we see more and more people joining the extensions community to create their own extensions. Some days, I spend more than 6 hours a day reviewing over 15,000 lines of extension code and answering the community.

In the past two months, we have received many new extensions on EGO. This is a good thing since it can make the extensions community grow even more, but there is one issue with some packages. Some devs are using AI without understanding the code.

This has led to receiving packages with many unnecessary lines and bad practices. And once a bad practice is introduced in one package, it can create a domino effect, appearing on other extensions. That alone has increased the waiting time for all packages to be reviewed.

At the start, I was really curious about the increase in unnecessary try-catch block usage in many new extensions submitted on EGO. So I asked, and they answered that it is coming from AI.

Just to give you a gist of how these unnecessary code might look:

destroy() {
    try {
        if (typeof super.destroy === 'function') {
            super.destroy();
        }
    } catch (e) {
        console.warn(`${e.message}`);
    }
}

Instead of simply calling `super.destroy()`, which you clearly know exists in the parent:

destroy() {
    super.destroy();
}

At this point, we have to add a new rule to the EGO review guidelines. So the packages with unnecessary code that indicate they are AI-generated will be rejected.

This doesn’t mean you cannot use AI for learning or fixing some issues. AI is a fantastic tool for learning and helping find and fix issues. Use it for that, not for generating the entire extension. For sure, in the future, AI can generate very high quality code without any unnecessary lines but until then, if you want to start writing extensions, you can always ask us in the GNOME Extensions Matrix channel.

Comments

5 responses to “AI and GNOME Shell Extensions”

  1. DegenerativeAi Avatar
    DegenerativeAi

    I am grateful for your work. That should be said first and foremost. Thank you. Honestly. I love Gnome and some Gnome extensions I use to make it just right for me.

    Please consider adding markings for “AI assisted” and “vibe coded” and mandatory disclosure. I have stopped installing Gnome extensions that first appeared after 2023 because these markings are missing. I personally prefer not to use any piece of code that was written with these predatory and erosive products. I personally choose not to use it even for auto-complete in the IDE. I don’t want anything to do with it. Or as little as possible. Or at least to be well informed when I do. I think I’m not alone in this. Would really appreciate this simple information on the extension.

    1. jrahmatzadeh Avatar
      jrahmatzadeh

      Thanks!

      For markings, I don’t think we can easily tag these, since AI is always learning and they cannot be easily detected in the future. Maybe these unnecessary code lines are easy to detect now but who knows what is going to happen in the future.

  2. Stephan Wenderlich Avatar

    I really appreciate this decision. A tool is a tool, but once it becomes a replacement for actual understanding and basic quality control, it turns into a risk rather than a help.

  3. Alexander Avatar
    Alexander

    Anyone at the receiving end of the slop machines quickly realizes that the time “saved” for one side is often wasted manifold on the other side. Good on you for protecting yourself!

    (And then there’s the incredible ecological, social, and economic harm “AI” is causing, oh well…)

  4. Joseph DiGiovanni Avatar
    Joseph DiGiovanni

    I would much rather see a deduplication of extensions than this. There are about a half dozen “maximize to new workspace” extensions because the developer fails to update the extension to the latest version of GNOME, so it gets forked and uploaded with a slightly different name.

Leave a Reply

Your email address will not be published. Required fields are marked *