## Prerequisite Checks (BLOCKING) Run sequentially before any planning step: ### Prereq 1: Data Gate 1. `_docs/00_problem/acceptance_criteria.md` exists and is non-empty — **STOP if missing** 2. `_docs/00_problem/restrictions.md` exists and is non-empty — **STOP if missing** 3. `_docs/00_problem/input_data/` exists and contains at least one data file — **STOP if missing** 4. `_docs/00_problem/problem.md` exists and is non-empty — **STOP if missing** All four are mandatory. If any is missing or empty, STOP and ask the user to provide them. If the user cannot provide the required data, planning cannot proceed — just stop. ### Prereq 2: Finalize Solution Draft Only runs after the Data Gate passes: 1. Scan `_docs/01_solution/` for files matching `solution_draft*.md` 2. Identify the highest-numbered draft (e.g. `solution_draft06.md`) 3. **Rename** it to `_docs/01_solution/solution.md` 4. If `solution.md` already exists, ask the user whether to overwrite or keep existing 5. Verify `solution.md` is non-empty — **STOP if missing or empty** ### Prereq 3: Workspace Setup 1. Create DOCUMENT_DIR if it does not exist 2. If DOCUMENT_DIR already contains artifacts, ask user: **resume from last checkpoint or start fresh?**