I guess it is tool-dependent, but do you pass in that enormous prompt on each request?
Yes, I inject multiple documents like that before every session. The documents I inject are relevant to the upcoming task.
The one I shared is a variant of the “Base” document, I have specific documents per use case. If I know I’m adding features (controller actions), I inject a prompt containing documentation how to add routes, controllers, controller actions, views, etc and how to format views, what helpers are commonly used.
If I’m working on APIs, I have API specific prompts. If I’m working on syncs with specific external services, I have prompts containing the details about these services.
Basically I consider every session a conversation with a new employee. I give them a single task and include all the relevant documentation and guidelines and wish them good luck.
Sometimes it takes a while, but I generally have a second issue to work on, in parallel. So while one agent is fixing one issue, I prepare the other agent to work on the second. Very occasionally I have 3 sessions running at the same time.
I barely write code anymore. I think I’ve not written a single line of code in the last few work days. Almost everything I submit is written by AI, and every time I have to guide the LLM and I expect the mistake to be repeated, I expand the relevant prompt document.
Last few days I also had the LLM update the prompt documents for me since they’re getting pretty big.
I do thoroughly review the code. The generated code is different from how I would write it, sometimes worse but sometimes better.
I also let it write tests, obviously, and I have a few paragraphs to write happy flow tests and “bad flow” tests.
I feel like I’m just scratching the surface of the possibilities. Im writing my own tools to further automate the process, including being able to generate code directly on production and have different versions of modules running based on the current user, so I can test new versions and deploy them instantly to a select group of users. This is just a wild fantasy I have and I’m sure I will find out why it’s a terrible idea, but it doesn’t stop me from trying.
Thanks!
Sorry to belabor the question, when you say "before every session", how many "things" do you do in a session? You say you give them a single task, but do you end up chatting back and forth with the agent in that session? I guess I'm unsure how far back the "context" goes in a conversation and if would drift from your directives if the conversation went back and forth too much.
One task per session, sometimes split into multiple smaller tasks in the same session if they’re closely related.
Usually it’s like “implement a worker/class/module for x” (which will act as a model) and when it did that successfully (with tests and such) I commit everything and I continue the session building the GUI, since the GUI requires deep knowledge of the thing it just made.
If I tell it to make the GUI and worker at the same time, it will usually be poorly written with logic in the views rather than in a model, and it will be tested through views while I want dedicated tests for the model