Do people have sets of code generation instructions for AI that they use:
I’ve been using claude 3.7 sonnet thinking quite successfully after setting up definitions for framworks etc.
Of course I’m new to this, so some of what we’re using is below, any suggestions are welcome.
- For cfml in general ( for tags or for cfscript )
- For frameworks ( coldbox, fw1, teamcfml, etc)
- Code Formatting.
For example I use this for global settings:
Code Generation
when language is cfml (
always write code with cfscript with no tags,
default engine is lucee
always use member functions instead of functions when possible
use cflint rules from https://github.com/cflint/CFLint/blob/master/RULES.md and as implemented in this java code https://github.com/cflint/CFLint/tree/4a5d8a2ed57e51aa041f43a0640399cac488202e/src/main/java/com/cflint/plugins/core
ignore cflint rules for ()
generate javadoc like comments any functions generated
)
Test Generation
when language is cfml (
include code generation instructions for cfml.
use testbox bdd testing which has source code at the github repo: https://github.com/Ortus-Solutions/TestBox and has documentation and examples at: https://testbox.ortusbooks.com/ .
example great bdd uses are here https://github.com/Ortus-Solutions/TestBox/blob/development/tests/specs/BDDTest.cfc and here https://github.com/ColdBox/coldbox-platform/tree/development/tests for the coldbox framework
)
and then use a framework specific ones for a framework specific workspace (making sure I save a workspace file to do this) - i put the documentation for our teamcfml framework on a local repo so just point to that:
Workspace settings for teamcfml framework project
Code Generation
when language is cfml(
default cfml engine is using lucee engine
the cfml framework used is teamcfml
use the documentation from https://local.teamcfml.io/framework/docs/folder-structure/ to understand the framework component and component versioning structure for extensions
)
Test Generation
use https://local.teamcfml.io/docs/test-spec-structure/ for test spec generation