(module_tree: dict[str, any], indent: int = 0)
| 265 | Please shortlist the files, folders representing the core functionality and ignore the files, folders that are not essential to the core functionality of the project (e.g. test files, documentation files, etc.) from the list above. |
| 266 | |
| 267 | Reasoning at first, then return the list of relative paths in JSON format. |
| 268 | """ |
| 269 | |
| 270 | logger = logging.getLogger(__name__) |
| 271 | |
| 272 | # codex rejects any turn whose total input exceeds 1,048,576 characters |
| 273 | # (input_too_large, code -32602 — server-side, not configurable). Cap the |
| 274 | # user prompt below that, leaving headroom for the system prompt, tool |
| 275 | # schemas and protocol overhead. |
| 276 | MAX_USER_PROMPT_CHARS = 900_000 |
| 277 | |
| 278 | MODULE_TREE_TRIMMED_NOTE = ( |
| 279 | "NOTE: per-module component listings were omitted because the full module " |
| 280 | "tree exceeds the model input limit. Module names and hierarchy are " |
| 281 | "complete; read the referenced modules' documentation files or use your " |
| 282 | "code-reading tools when you need component-level detail." |
| 283 | ) |
| 284 | |
| 285 | CODE_TRUNCATED_NOTE = ( |
| 286 | "\n... [file contents truncated to fit the model input limit — use your " |
| 287 | "file-reading tools to read the full files]" |
| 288 | ) |
| 289 | |
| 290 | # Appended to the user prompt (after USER_PROMPT) when the dependency graph |
| 291 | # contains artifact nodes. Kept out of USER_PROMPT itself so callers that |
| 292 | # format the template directly (MCP prompt server) keep working. |
| 293 | ARTIFACT_USAGE_NOTE = ( |
| 294 | "* NOTE: when this module's behaviour depends on how the system is built, " |
no outgoing calls
no test coverage detected