Making database_schema and compiled_route_id optional in CodeValidator, and route_errors_as_todo, raise_validation_error in CodeValidator.validate_code, would allow using it as a stand-alone code validation module. Like this:
https://github.com/Significant-Gravitas/AutoGPT/blob/7f6b7d6d7e5fd92c8816e7c39912c5a72b8e93c2/autogpt/autogpt/agents/prompt_strategies/code_flow.py#L297-L300
A stripped-down version is currently included here: forge/utils/function
but it would be much better for maintainability if we could just import from codex.develop.