Parse a raw agent file string into an AgentFile.
Returns Err only for fatal parse errors.
Lint warnings are returned via ValidationResult from validate_agent_file.
Like parse_agent_file but uses an explicitly supplied format instead of auto-detecting.
Useful when the file extension is misleading or the user wants to override detection.