http://coldfusion.com logo
Join Slack
Powered by
# ai-code-generation
  • d

    dawesi

    05/05/2025, 10:46 AM
    copiolot with claude 3.7 sonnet (thinking), as long as you setup the coding and testing instructions in the workspace settings. Code is better than chatGPT provided. Posted my setup on lucee dev site : AI Code Generation In Vscode / AI - Tools and Libraries - Lucee Dev (edited)
  • d

    dawesi

    05/05/2025, 10:46 AM
    The best bit of ai so far (other than generating testbox bddd testes which then generate code (that is 'ok')... is asking about implementation. We are just rewriting our cfml framework and gettting AI to check best practices and describe what we are doing and asking better approached to do it is invaluable. The other cool thing is after describing the framework and how it works in a workspace for our framework we can just ask AI to generate new modules/extensions, and it builds it out, testbox bdd test suite and all (we've also given links to docs, sourcecode in code generation instructions for ai) That way it fully understands the context of different items, and even understands the dependancy injection, and other custom attributes we use in tags and properties to decorate factories. (edited) There is clearly not enough public good cfscript out there at the moment because most of these engines need a whole stack of instructions in settings just to get good code. So just put that you use fw/1 in your copilot or oather ai code generation instructions and give testbox or other instructions for test generation instructions and you're away. We also have a github gist now with AI instructions and just say 'instructions are at {gisturl} I just created the #C08QZDKHN9G channel so we can continue there
  • s

    salted

    05/20/2025, 12:45 AM
    @dawesi I’ve had several blocks from copilot in vscode about not being able to get a response due to public code
  • s

    salted

    05/20/2025, 12:45 AM
    even with facile queries that shouldn’t involve any complicated solutions
  • s

    salted

    05/20/2025, 12:46 AM
    many of my current projects are fw/1 based both old and new so I’m a bit stuck asking it for help
  • s

    salted

    05/20/2025, 12:46 AM
    (this is using claude of any version)
  • d

    dawesi

    05/25/2025, 1:47 PM
    It would be great to have a gist for each framework that can be included in a workspace. (hopefully framework writers can come up with one each) I would as a starting point create a vscode workspace for any work done with a particular framework, then in the instructions settings, point to a gist url with a paragraph of text describing where to find framework docs, source code, and secondly setup instructions in settings for testing with another gist and links to where the ai can get docs and examples from and if necessary also explain testing style. I have a textbox blurb with source url, docs and a couple of good blog post explaining how to use it for bdd for example.
  • d

    dawesi

    05/25/2025, 1:47 PM
    something like:
    Copy code
    This workspace uses cfml in cfscript, using the lucee engine version 6 ( docs at : <https://rorylaitila.gitbooks.io/lucee/content/> and <https://docs.lucee.org/guides/cookbooks.html> and <https://docs.lucee.org/reference/functions.html> ), we use the fw/1 cfml framework ( source at : <https://github.com/framework-one/fw1> and docs at <https://framework-one.github.io/documentation/> ) using AOP ( <https://framework-one.github.io/documentation/4.2/using-aop-one/> ) ...
    then go on to describe any major options in your setup (like AOP/DI/etc) so that it can get the nuances of how you do things. I also like to put a directory structure description and/or point to a doc page that has that also.
  • d

    dawesi

    05/25/2025, 1:59 PM
    I've had no blocks, I don't ask for public code, with AI you need to ask questions about code generation, not code copying... I ask questions like:
    Copy code
    build me a component to send events to clickhouse
    or
    Copy code
    use rereplace to convert a version from `v12-0` to 12.0
    or
    Copy code
    in this workspace, look at all modules in the /modules folder, and ensure they all have "tc:schema" parameter in the component attributes, of not set a default of version 4.3, and report back to me a list of changed files.
    or
    Copy code
    analyse my code and find any code that is inconsistent with our coding standards at : {url}
  • d

    dawesi

    05/25/2025, 2:11 PM
    You can now also store your instuctions in
    copilot-instructions.md
    files for copilot. Customize chat responses in VS Code
  • d

    dawesi

    05/25/2025, 2:27 PM
    I'd love to see someone sync all of the frameworks to a single github account and turn on the
    Allow GitHub to use my data for AI model training
    and
    Allow GitHub to use my data for product improvements
    checkbox under 'privacy' so that their repo can be added to training models for cfml. Unfortunately you can only turn this on at 'account' level from what i can see, wish I could find a per-repo setting on this.
    g
    • 2
    • 1
  • a

    aliaspooryorik

    06/05/2025, 1:14 PM
    I'm finding AI useful (some areas more than others!) but you can not trust it, everything needs to be reviewed. So it's a bit like a very keen computer science graduate has just joined who knows a heck of a lot of theory but in hasn't got any real world experience of working with code that has evolved over years if not decades! Good article via Stack Overflow newsletter which isn't too far off from my own thoughts https://alonso.network/the-recurring-cycle-of-developer-replacement-hype/?lid=ufkcltqfo3xc
    💯 1
    m
    j
    • 3
    • 4