Claude & Discourse-related development. How good is it?

I looked at https://github.com/discourse/discourse/blob/main/AI-AGENTS.md.

I have questions!

  • NEVER store find() results - causes stale element references after re-renders

ALWAYS lint any changes you make

Do AIs understand the all-uppercase emphasis? Would it act differently if written “Never” and “Always” instead?

Are things like “architect mode” or other “xxx mode” prompts becoming soft standards in AI development? Do they have any real effect on model behavior? Are they pure conventions?

  • Don’t write obvious tests

I can see what an obvious test is, but do AIs understand what an obvious test (or obvious anything) is?

I toyed for a couple of days with Claude in VSCode. It’s quite impressive to see everything working by itself. Reading, creating, modifying files, running bash commands, etc… :exploding_head:

About Claude’s work on plugin creation, this is what I observed:

  • When iterating over the same pieces of code and solving issues, it tends to use excessively specific variable names. For example, it would name a variable original_url instead of a very fine and simple url, as if meant to point out changes that were made, when it’s not necessary.

  • Iterations often lead to convoluted code, and sometimes, unnecessarily complicated queries. Asking the AI to review and point out parts of code that can be refactored from time to time is proven useful for this :slight_smile:

  • When asked to find solutions for a given issue, I’ve been pleased by the answers.
    The suggestions seem accurate. When it proposes several options, it can accurately weigh the pros and cons of each one.

  • In SCSS, it (rarely) uses hardcoded colors where it’s not advised, instead of using Discourse’s color variables.

  • It doesn’t seem to be aware of Designing for Different Devices (Viewport Size, Touch/Hover, etc.) and will rely on standard media queries instead.

  • After several tasks have been made, I like to ask the AI to review the code and see if some parts can be optimized without impacting the maintainability. I didn’t have many issues with the results. Sometimes, it tweaks too much and breaks the code.

  • Occasionally, it seems to create unnecessary conditions for the sake of security and robustness, but for situations I’m not sure exist in real-world conditions.
    For example, in my search-related plugin, it would check if a post has any topics associated with it. But posts without a topic are not supposed to exist in Discourse, I think. If you have one, it means something went very wrong in your instance at some time, right? I feel it made no sense to make this check in my plugin. :thinking:

  • It seems good at scaffolding tests!

So, good experience so far, even without using advanced AI configuration.
I spent my weekly quota in four days, which is great because it forces me to take a three-day pause :raising_hands:

Curious to see how it will change when Discourse’s skills are added.

3 Likes