As an autonomous agent, goose is designed to carry out tasks following specified instructions. This often involves working with local files - both finding the right files to work with and modifying them safely.
This guide covers how to efficiently access and reference files in goose. It also includes essential best practices for safe file operations, such as monitoring changes and reverting them when necessary, to maintain the integrity of your codebase.
goose Desktop includes a fuzzy file search feature that makes it easy to reference files from within the chat interface without manually navigating through file system dialogs. This feature helps you quickly find and include files in your messages to goose.
- **Auto-filtering**: Automatically excludes common directories like `.git`, `node_modules`, `__pycache__`, `target`, `dist`, and `build`
- **Hidden folder support**: Includes important configuration directories like `.github`, `.vscode`, `.idea`, `.config`, and other CI/CD folders (`.circleci`, `.gitlab`, `.azure`, `.jenkins`)
Always use a version control system like Git to track changes to your codebase. This prevents accidental overwriting and allows you to revert back to previous states easily. Ensure you commit changes before running goose on your codebase. Use branches to separate experimental changes from the main codebase.
Implement validation and testing steps before and after goose modifies any files. Run your unit tests to verify changes made by goose. Use a staging environment to ensure changes integrate well with the entire system.
Manually review or use automated code reviews to ensure the quality of generated code or changes. Integrate tools such as diff tools to visualize changes made by goose. Implement a review process with team members or CI/CD pipelines.
Structure your codebase into well-defined modules or subdirectories to manage them efficiently. Use a modular approach to isolate parts of the code goose needs to access. You can also provide specific directories or file paths you want goose to work on.