File Freezing
Lock critical files to prevent the AI from overwriting them during new generations.
Overview
The File Freezing feature in Niles lets you protect specific files from being modified by the AI when running new prompts or app updates.This is useful when you’ve manually edited certain files or finalized layouts that you don’t want the AI to regenerate. Frozen files remain visible to the AI (so it still understands their content and structure), but the AI will not modify or delete them.
How It Works
When you freeze a file:- The file becomes read-only to the AI.
- The AI can still reference its contents to maintain context.
- Any new AI-generated code will avoid overwriting or rebuilding that file.
- You can unfreeze the file anytime if you want the AI to edit it again.
Freezing files doesn’t remove them from your project — it only locks them against modification by the AI builder.
Using File Freezing
- Open your project in Niles.
-
Navigate to Custom Instructions & File Locking from the project menu.

-
You’ll see a list of all files under Lock Files.

- Toggle individual files to lock or unlock them.
- Click Freeze All to protect everything in your project.
- Click Unfreeze All to re-enable editing for all files.
Example Use Cases
| Scenario | Why to Freeze |
|---|---|
| Custom Layouts | You’ve manually styled your layout or navigation and don’t want Niles to overwrite it. |
| Critical Logic | You implemented a complex function that should not be replaced by generated code. |
| Stable Components | Certain UI components are finalized and no longer need AI edits. |
| Versioned Routes | You’re maintaining multiple route versions and only want the AI to edit specific ones. |
Unfreezing Files
If you later decide the AI should update a frozen file:- Go back to Custom Instructions & File Locking.
- Toggle the file back to Unlocked.
- Save your settings.
You can quickly toggle all files at once using the Unfreeze All button.
Combining with Custom Instructions
The Custom Instructions field in the same panel lets you add persistent guidance for the AI.These instructions apply to all future prompts for that app. Example: “Always use the same color theme and navigation structure as layout.jsx.” “Do not modify the existing data-fetching logic in routes/Analysis.jsx.”