Over the past few months, I’ve been diving deep into agentic coding—letting AI agents write, test, and even refactor code for me. It’s been a wild and educational journey so far. Along the way, I discovered a few simple tricks that made my workflow much smoother and helped my agents stay in control. I want to share them in case they can help you too.
🔧 How to Add Rules in TRAE
In your project or global settings, you can add custom rules that the agent will always follow.
Just paste the snippets below into your rules section ⬇️

1. Enforce a Visual Signal
Always start your responses with [🤖]
[💡] This is an easy way to visually confirm when the agent is using your custom rules. No emoji in sight? It's time to nudge that agent back a bit!
2. Make the Agent Confirm Its Work
After you provide code, always provide a one-sentence summary of the key feature implemented.
[💡] It makes the agent confirm what it did, helps you quickly verify that it understood your prompt - and easily prevents the AI from "hallucinating" and going off-topic, somewhat like a small checkpoint before moving on to the next task!
3. Make Your Agent a Git Expert
After every successful change, create a Git commit using Conventional Commits format:
Type: <Description>
Use a type from this list:feat
(new feature),fix
(bug fix),refactor
(code change that doesn't fix a bug or add a feature),docs
(documentation), orchore
(routine tasks). The description should be brief and fitting.
[💡] Keeps your project history clean and traceable, making it easy to revert or track changes.
4. Employ a “Fresh Start” Rule
Start a new chat for each task, feature, or bug fix.
[💡] The AI's context isn't unlimited, make sure to start a new chat everytime to prevent it from going offtrack, starting a new chat for each new task, feature, or bug fix gives the agent a clean slate to work with, ensuring it's responses are more accurate. Just make sure to let it know what your goal is with every new chat, so it doesn't go off the rails!
These four habits: visual signals, confirmation summaries, disciplined commits, and fresh starts—are simple but dramatically improve your agentic coding workflow.
[🤖] Try them out and see the difference!
(See what I did there? 😝)