How are you using AI/LLMs to create themes/components/plugins?

AI-generated summary

The discussion revolves around using AI/LLMs to create themes, components, and plugins for Discourse. jimkleiber inquires about others’ experiences with AI-generated code for Discourse, while Falco shares their experience with Cursor and Claude Code cli, finding the latter to be more effective. Falco notes that providing context and a clear end goal helps the LLM generate better code. Dimava is currently using Cursor and Augment to write complex code, but encounters bugs. awesomerobot agrees with Falco that providing examples of existing components improves LLM performance, a strategy beneficial for both humans and AI. Overall, users are experimenting with different AI models and techniques to create Discourse themes and plugins, with varying degrees of success.

When ChatGPT and LLMs were first getting popular, I tried to create Discourse theme components and plugins using AI and found them severely lacking, but I haven’t tried since.

Have you been using AI to write code to modify Discourse? And if so, which models have you found to be the most helpful for this?

I recently wanted to create a quick and dirty proof of concept and used Cursor in agent mode to create

https://github.com/xfalcox/discourse-video-stream

It struggled a lot with EmberJS .gjs files, and I was surprised that it had an easier time with the Discourse JS API than with EmberJS.

I’ve been doing quite a few tests of the feasibility of vibe coding for Discourse, and so far the best I’ve tested is the Claude Code cli.

Clone our template, and start by telling the LLM they are in a template for a Discourse plugin / theme component and what is your end goal.

I’ve always needed to fix mistakes in the end, but it does a great job at handling boring bootstrap code.

Currently trying to write some difficult stuff with Cursor / Augment
So far I have a lot of bugs :rofl:

(trying to make signatures per-category so that needs a table and new edit field and so on, oneshotting didn’t work)

Yeah on its own LLMs don’t do great with modern Ember, but results are so much better if you provide an example of an existing component from Discourse — this is a good strategy for humans too :grin: