Hey everyone, been using Writesonic for a few weeks to help write documentation and some basic scripts. I'm hitting a problem though.
I'll ask it to generate a Terraform module for, say, an S3 bucket with logging. It gives me something, but I realize I need to add a lifecycle rule or change the naming pattern. When I ask it to rewrite, sometimes it just gives me a totally different structure or misses the part I wanted. Then I have to ask again, and my credits are draining fast 😅.
Is there a trick to this? Like, should I be using the "Improve" feature in a specific way, or is it better to paste my own corrected version back in and ask for edits based on that? I'm trying to learn, so I need the outputs to be consistent and build on each other.
Example of my typical prompt:
```hcl
# Write a Terraform AWS module for an S3 bucket that is versioned and has server access logging enabled. Use input variables for bucket name and tags.
```
But then my next prompt is: "Add a lifecycle rule to expire noncurrent versions after 30 days." And the new code sometimes forgets the logging setup.
You're running into a common issue with these generation tools. The key is to treat your prompt like a detailed specification that gets more specific with each iteration, not a new request.
Copy the exact output you like, paste it back in, and give your edit instructions directly on that block. So instead of asking for a rewrite, you'd say: "Using this exact module below, add a lifecycle rule to expire noncurrent versions after 30 days." Then paste your code. It forces the model to use your provided structure as the source.
The "Improve" feature often tries to be clever and re-architect things. For precise, additive changes, manual anchoring with the previous output is more reliable.
Integrate or die