[routes] cookbook_helpers.py at 475 lines exceeds AGENTS.md ~400 line limit #785

Closed
opened 2026-06-03 00:32:30 +02:00 by sleepy · 0 comments
Owner

Problem

routes/cookbook_helpers.py is 475 lines containing validation functions, request models, shell helpers, and parsing utilities all mixed together.

Extracted from cookbook_routes.py (itself 1920 lines, see #775) but still exceeds the ~400 line guideline.

AGENTS.md violation

Split files that exceed ~400 lines or contain multiple concerns.

Contents

  • 8 regex constants for validation
  • 8 validation functions
  • Shell path and quoting helpers
  • Serve phase parser
  • Environment setup helpers
  • 2 Pydantic request models
  • Cached model scan script builder

Fix

Split into routes/cookbook/validators.py, routes/cookbook/shell_helpers.py, routes/cookbook/models.py

## Problem `routes/cookbook_helpers.py` is 475 lines containing validation functions, request models, shell helpers, and parsing utilities all mixed together. Extracted from `cookbook_routes.py` (itself 1920 lines, see #775) but still exceeds the ~400 line guideline. ## AGENTS.md violation > Split files that exceed ~400 lines or contain multiple concerns. ## Contents - 8 regex constants for validation - 8 validation functions - Shell path and quoting helpers - Serve phase parser - Environment setup helpers - 2 Pydantic request models - Cached model scan script builder ## Fix Split into `routes/cookbook/validators.py`, `routes/cookbook/shell_helpers.py`, `routes/cookbook/models.py`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#785
No description provided.