| 14 | load_dotenv() |
| 15 | |
| 16 | class Task(BaseModel): |
| 17 | id: int |
| 18 | title: str |
| 19 | |
| 20 | goal: str = Field( |
| 21 | ..., |
| 22 | description="One sentence describing what the reader should be able to do/understand after this section.", |
| 23 | ) |
| 24 | bullets: List[str] = Field( |
| 25 | ..., |
| 26 | min_length=3, |
| 27 | max_length=5, |
| 28 | description="3–5 concrete, non-overlapping subpoints to cover in this section.", |
| 29 | ) |
| 30 | target_words: int = Field( |
| 31 | ..., |
| 32 | description="Target word count for this section (300–450).", |
| 33 | ) |
| 34 | section_type: Literal[ |
| 35 | "intro", "core", "examples", "checklist", "common_mistakes", "conclusion" |
| 36 | ] = Field( |
| 37 | ..., |
| 38 | description="Use 'common_mistakes' exactly once in the plan.", |
| 39 | ) |
| 40 | |
| 41 | |
| 42 | class Plan(BaseModel): |