The first rule covers it best: it is crucial that you know what you are doing in order to benefit from these tools.
Regarding the second and third rules, I like to work with two terminals. One is for my agent, isolated in a container, and the other one I use for `git`. This way, I can assess whether my changes are moving in the right direction.
The PLAN.md files have also proven to be a good approach. I'm still trying to figure out the best way to keep them aligned with the application without polluting the context, but they hold significant value for documentation purposes.
I think a properly hand tuned AGENTS.md with proper tooling instructions and a single PLAN.md goes a long way especially if you add directives in AGENTS.md to keep the PLAN.md always updated with journaling.
I built https://github.com/nezhar/claude-container for exactly this reason - it's easy to make mistakes with these agents even for technical users, especially in yolo mode.
Author here. This release adds two features I've found useful for understanding Claude Code behavior:
1. API Proxy - Transparently logs all interactions with the Anthropic API. Every request/response is captured without modifying Claude Code itself.
2. Datasette Integration - Lets you query and visualize the captured API data with SQL. Useful for tracking token usage, analyzing prompt patterns, or debugging unexpected behavior.
The container itself provides isolation from the host system while maintaining persistent credentials and workspace access via bind mounts.
Happy to answer questions about the implementation or use cases.
Regarding the second and third rules, I like to work with two terminals. One is for my agent, isolated in a container, and the other one I use for `git`. This way, I can assess whether my changes are moving in the right direction.
The PLAN.md files have also proven to be a good approach. I'm still trying to figure out the best way to keep them aligned with the application without polluting the context, but they hold significant value for documentation purposes.