by Dustin Miller • Reddit • Substack
License: Attribution-NonCommercial-ShareAlike 4.0 International
Want to support these free prompts? My Substack offers paid subscriptions, that's the best way to show your appreciation.
Important
This requires a ChatGPT professional subscription, as it needs both GPT-4 and Advanced Data Analysis!
You can alter the verbosity of the code written by ChatGPT by prefixing your request with V=[0–3]
.
V=0
: code golf (really terse)V=1
: concise, but not overly cleverV=2
: simple (the default)V=3
: verbose, paying even more attention to DRY principals
Once autodev.py
has been uploaded, you'll have some new functionality accessible through the use of Slash Commands:
Slash Command | Description |
---|---|
/help | Shows what slash commands are available |
/install_ctags | If attaching a ctags release from ctags-nightly-build, will extract and install it to the sandbox (experimental) |
/ctags | If ctags has been installed, builds a ctags file for your saved code (experimental) |
/memory | Saves files, session history, etc. and zips them up for download |
/stash | Prepares to stash some text, to be recalled later with /recall |
/recall | Recalls text, using a key or description that appears after the command, that was previously stored with /stash |
Before ending your session, use the /memory
slash command to zip up all your hard work. The next time you start a session, attach the zip file in the same message as autodev.py
, and AutoExpert will automatically extract your zip file and restore its memory of the work that was done in the last session.
Once the custom instructions have been set (and the autodev.py
file has been uploaded), you should notice that ChatGPT's responses to your coding requests are a lot smarter. Why?
Every time you ask ChatGPT to code something, it is instructed to create a preamble at the start of its response. This preamble is designed to automatically adjust ChatGPT's "attention mechnisms" to pay more attention to your requirements, the type of code it will need to write, and the plan it should follow when writing it.
Me:
Show me a sample JavaScript file that has a couple of classes with methods, and a couple of top-level functions. Don't use the sandbox yet.
ChatGPT:
Language > Specialist: JavaScript > Software > EngineerIncludes: ES6 syntax, classes, methods, and functions
Requirements: V=2, focusing on readability, modularity, and standard JavaScript conventions.
- Create a JavaScript file outline in text form.
- Define two classes with methods.
- Add two top-level functions.
It tries its best not to elide or omit any code, and will also attempt to break down its tasks to occur over several chat turns, asking you to continue when it needs to. It'll even throw in some // TODO:
comments where it knows it'll be editing something on the next chat turn.
The epilogue section at the end of each response keeps important things in memory no matter how long your chat context gets. Things like:
- The stuff ChatGPT has done so far
- A list of every file it has written
- An outline of any classes and/or functions and methods in those files
History: Provided a sample JavaScript file with two classes (
Calculator
andAdvancedCalculator
) and their methods, along with two top-level functions (add
andsubtract
).Source Tree:
⚠️ sample.js
- 📦 Calculator
- ✅ add
- ✅ subtract
- 📦 AdvancedCalculator
- ✅ multiply
- ✅ divide
- ✅ add (global function)
- ✅ subtract (global function)
Next Task: No pending tasks. Would you like to implement this sample in a real JavaScript file?
Emoji | Meaning |
---|---|
💾 | File was saved to the sandbox (the filename is linked for download) |
ChatGPT created a code snippet with a filename, but it hasn't been saved | |
👻 | ChatGPT created a file snippet, but it doesn't have a filename |
📦 | Class name (if classes are being used) |
✅ | Symbol (function/method) is finished |
⭕️ | Symbol (function/method) is not finished yet, and has a TODO comment |
🔴 | Symbol (function/method) is not finished yet, but doesn't have a TODO comment |
ChatGPT AutoExpert (Developer Edition) is intended for use in the ChatGPT web interface, and with a Pro subscription. To activate it, you'll need to do a few things!
- Download the latest release
- Expand Assets, then download the file titled "Source Code (zip)"
- Extract the downloaded .zip file
- Sign in to ChatGPT
- Select the profile + ellipsis button in the lower-left of the screen to open the settings menu
- Select Custom Instructions
[!WARNING] You should save the contents of your existing custom instructions somewhere, because you're about to overwrite both text boxes!
- Copy and paste the text from
developer-edition/chatgpt__about_me.md
to the first text box, replacing whatever was there - Copy and paste the text from
developer-edition/chatgpt__custom_instructions.md
to the second text box, replacing whatever was there - Select the Save button in the lower right
- Continue with the per-chat installation steps
- Start a new chat
- Select GPT-4 at the top of the new chat
- Select Advanced Data Analysis from the menu
- Attach
autodev.py
by selecting the (+) button to the left of "Send a message" at the bottom of the chat - Without entering any other text in the input text box, select the paper airplane icon to send the empty text and upload the
autodev.py
file - If all went well, you should see a heading "ChatGPT AutoExpert (Developer Edition)" along with an introduction to the tool