Write content to a file, replacing existing content.

- Creates parent directories if needed.
- Always read the file first before writing.
- NEVER create files unless absolutely necessary - prefer editing existing files.
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.
