A.I. Category for Wiki
I know AI is controversial in creative circles, but how would we feel about adding a section to the Wiki specifically dedicated to leveraging AI to help with system/module development?
As a relatively novice developer, I've found AI to be absurdly essential to accelerating the speed at which I learn and improve, and I'm often coming across new ways to benefit from this new technology. Pages within this section might include: - Migrating to Cursor --- Cursor is a free fork of Visual Studio Code that is identical to VSC in every way, except with AI integration in virtually every area, including contextual understanding of your entire project workspace, as well as the ability to train it with new API documentation, such as the Foundry API. - Project Setup --- Using AI to assist in the creation of new projects, creating build processes and workflow tasks, as well as installing necessary dependencies. - Prompt Engineering --- A series of prompt templates developers can use, plug-and-play style, either in Cursor or another LLM (like ChatGPT) to perform specific tasks. I just posted an example of the latter over in the main Foundry server ("AI Pro Tip: Analyze Your
As a relatively novice developer, I've found AI to be absurdly essential to accelerating the speed at which I learn and improve, and I'm often coming across new ways to benefit from this new technology. Pages within this section might include: - Migrating to Cursor --- Cursor is a free fork of Visual Studio Code that is identical to VSC in every way, except with AI integration in virtually every area, including contextual understanding of your entire project workspace, as well as the ability to train it with new API documentation, such as the Foundry API. - Project Setup --- Using AI to assist in the creation of new projects, creating build processes and workflow tasks, as well as installing necessary dependencies. - Prompt Engineering --- A series of prompt templates developers can use, plug-and-play style, either in Cursor or another LLM (like ChatGPT) to perform specific tasks. I just posted an example of the latter over in the main Foundry server ("AI Pro Tip: Analyze Your
package.json
!"), which is what gave me this idea in the first place. I'll repost that example in the attached thread so as not to spam the channel too much!4 Replies
AI Pro Tip: Analyze Your
package.json
!
AI is growing more capable of complex project management tasks by the day; here's the latest way AI was a huge help to me: by analyzing all of the dependencies in my package.json
, telling me what they're for, what packages they depend on, and things I need to know before removing that package from my project. All you need to do is:
1. Paste the following prompt into ChatGPT
2. Copy the listed property values from package.json
and paste their contents where indicated.
3. Delete any unused properties (e.g. "engines"
and "peerDependencies"
, most likely)
3. Replace the two sets of '''
's with backticks appropriate for defining a code block (I couldn't figure out how to properly escape them in Discord, this was the best I could do!)
You'll get a nicely formatted code block with entries that look like:
... and so on, followed by a concluding section containing an overall analysis of your dependencies:
This example of the AI's final analysis comes from running the above prompt on my own very cluttered package.json
file, which was in the process of migrating from gulp to vite after just pasting in all of the dependencies from the system I was building a module for wholesale 🙂
Final Analysis Errors or Issues - No explicit errors or missing dependencies were identified based on the provided JSONC content. However, the presence of both Gulp and Vite as build tools may indicate redundancy or an ongoing migration between build systems. It's advisable to consolidate to a single build system to simplify the project structure and reduce complexity. Version-Specific Insights - The use ofMoreover, as with all LLMs, you can continue the conversation after reading the analysis to ask for clarifications or for the AI to expand on specific aspects of its reply, for example, here's my follow-up to the AI's final analysis of my"^"
in version numbers ensures that minor updates and patches are automatically included. This is generally a good practice for maintaining up-to-date dependencies, but it can occasionally introduce breaking changes if a package does not follow semantic versioning accurately. Regularly updating and testing dependencies is recommended to mitigate this risk. Potential Alternative Packages - For projects heavily relying on TypeScript, replacinggulp-typescript
with direct use of the TypeScript compiler (tsc
) or integrating TypeScript compilation into Vite's build process could streamline the build system. - If the project is moving towards a more modern stack with Vite and away from Gulp, consider migrating all Gulp tasks to Vite plugins or npm scripts to centralize the build process and reduce dependency on multiple build systems. - For CSS processing, if there are performance issues or specific needs not met bysass
andpostcss
, exploring alternatives like Less or Stylus might offer benefits. However, this would require evaluating the compatibility and features against the project's requirements. - Given the focus on functional programming patterns indicated by the use offp-ts
andio-ts
, projects not already doing so might benefit from exploring additional functional programming libraries likeramda
orlodash/fp
for more general utility functions that are optimized for functional programming.
package.json
:
You're right, I'm migrating from Gulp to Vite. In addition to the packages you've marked as depending on Gulp and that I can safely uninstall, please list any dependencies that may be there because of their use in Gulp tasks and that may not be necessary unless they are also used by my Vite build process.... and the AI's reply:
Certainly! If you're fully migrating from Gulp to Vite, here's a refined list of dependencies that might have been used in conjunction with Gulp tasks but could be unnecessary for Vite, depending on how you've set up your new workflow. These are the dependencies you should review carefully to determine their necessity in your Vite setup: 1.Pretty good, no? Disclaimer AI is not perfect, especially if you use it with GPT3.5. It will make mistakes, and occasionally hallucinate entire fictional text that sounds as persuasive as the real thing. But in the context of this prompt, hallucinations tend to be relatively easy to spot, so I consider it one of the safer tasks for AI. It's definitely a good starting point if you want to better understand what's going on in yourautoprefixer
: Often used in Gulp via PostCSS for adding vendor prefixes to CSS. Vite can handle this with its PostCSS integration. 2.cssnano
: A CSS minifier that might have been part of a Gulp-based PostCSS workflow. Vite also supports CSS minification through PostCSS. 3.postcss
: A tool for transforming CSS with JavaScript plugins. While used in Gulp for various CSS processing tasks, Vite supports PostCSS natively in its configuration. 4.sass
: Whilegulp-sass
was used for compiling SCSS/Sass files in Gulp, Vite has built-in support for these pre-processors without needing a Gulp plugin. 5.yargs
: Used for parsing command-line arguments in Gulp tasks. Vite's configuration and command-line interface might eliminate the need for this package. 6.del
: Commonly used in Gulp workflows to clean directories before building. Vite's build process might not require a separate package for cleaning, as it handles output directory management internally. 7.browser-sync
or similar packages for live-reloading might have been used alongside or within Gulp tasks. Vite provides its own development server with hot module replacement (HMR), making external live-reload tools unnecessary. For each of these dependencies: - Verify whether they were specifically used in yourgulpfile.js
for tasks that have now been migrated to Vite. - Check yourvite.config.js
and other configuration files to see if the functionality provided by these packages is either directly supported by Vite or has been integrated through Vite plugins. - Consider the overall architecture of your project and whether any custom scripts or legacy workflows might still rely on these packages before deciding to remove them.
package.json
.Just check because training AI using Foundry's API is a violation of the license agreement
No. Your post on the main discord has been deleted by a moderator, for good reason. Foundry staff has pointed out correctly that training LLMs on the foundry api is a violation of their license. Training LLMs on strong-copyleft code is a violation of those licenses. LLMs can be prompted to replicate code verbatim, but stripped of attribution and license info. LLMs output is harder to debug and often confidently incorrect. I don't know if you're just a rube or are getting cheques to constantly boost this stuff, but stop.
Holy crap, sorry! I literally thought I'd discovered something helpful, and came to share it. And I certainly didn't repost after a previous one had been removed, look at the timestamps --- I thought it might be a useful addition to the Wiki after posting in the other server, and came to post it here (I even said as much in my original post).
I realize AI is controversial, but showing such hostility for a well-intentioned, if misguided, attempt to help is not the way to go about things.
Additionally, I misused the word "train" in my original post. If I knew this was such a hot topic I would have been more precise. All I meant was that you can provide it with a link to the Foundry API documentation, and it is equipped with the tools to search it for answers. That's all; no training on actual code, only web searching on publically-available API documentation. Moreover, this particular suggestion had very little to do with Foundry at all --- its focus was on helping to explain the nature of dependencies in a package.json file.
In short, I think you've assumed a hell of a lot about my intentions, and overreacted as a result. But no worries, I promise to never, ever mention AI in here ever again.
Additionally, I misused the word "train" in my original post. If I knew this was such a hot topic I would have been more precise. All I meant was that you can provide it with a link to the Foundry API documentation, and it is equipped with the tools to search it for answers. That's all; no training on actual code, only web searching on publically-available API documentation. Moreover, this particular suggestion had very little to do with Foundry at all --- its focus was on helping to explain the nature of dependencies in a package.json file.
In short, I think you've assumed a hell of a lot about my intentions, and overreacted as a result. But no worries, I promise to never, ever mention AI in here ever again.