The author proposes a method for managing AI-generated code by isolating it into a dedicated directory named 'vibecode/'. This approach treats AI-generated code similarly to third-party dependencies, allowing developers to skip manual code reviews for non-critical components while maintaining control over the rest of the project.
Code inside the 'vibecode/' directory must be isolated behind simple interfaces. This allows developers to verify the logic from the outside without inspecting the implementation. The author emphasizes that this code should not be used as a reference for other parts of the project, a rule enforced by documentation in 'AGENTS.md'.
To ensure safety, the author uses 'depguard' linters in '.golangci.yml' to restrict direct I/O operations within the 'vibecode/' zone. If the AI attempts to import forbidden packages like 'database/sql' or 'os', the linter fails, prompting the developer to either refactor the code or move it out of the isolated zone.
The author successfully applied this method to the 'tomlmerge' package, which consists of approximately 1800 lines of code and 1400 lines of tests. By moving this package into the 'vibecode/' directory, the author avoided the need for a full manual review while maintaining project stability through external tests.





