# Study Checklist Framework

**Purpose:** turn any exam scope or topic list into a single-file, brutalist-terminal HTML checklist that mirrors the official syllabus, separates content from cross-cutting tools, and remembers progress locally.

**Canonical example:** `Exam Syllabus/HYE/BM_SL_HYE_Checklist.html`

**Companions:** `NOTES_FRAMEWORK.md` for full notes pages; `DIAGNOSTIC_FRAMEWORK.md` for the topic-by-topic diagnostic that tests the checklist coverage.

Use this for any subject, level, or exam — IB DP HYE, unit tests, language orals, practicals, self-study topics.

---

## 1. Inputs (priority order)

1. Official exam focus / syllabus document (PDF or plaintext).
2. Subject guide or specification.
3. Dated teacher mail or announcement.
4. Exam timetable (date, reporting time, duration, paper components).
5. Existing repo notes.

Rules:

- Newest **dated official** source wins.
- If sources disagree (duration, paper count, level), follow the official syllabus for content and the timetable for logistics; record the conflict in the footer. Do not silently choose.
- Existing repo notes may be stale. Re-verify level, paper format, and scope before reuse.
- For self-study with no syllabus: name the source (textbook, guide, course) in the footer and mark every inferred item.

## 2. Extraction

### Topics and subtopics

- Preserve official numbering and wording. Normalise punctuation and capitalisation only.
- One checklist item = one testable idea.
- Split compound points when the source separates them; keep enumerations together when they are one concept (e.g. "types of costs — fixed, variable, direct, indirect").
- Target 2–8 items per topic. Split a topic above ~8; merge only genuine duplicates.
- Never invent scope. If a standard textbook point is added, mark it as an addition or leave it out.
- Keep AO / command-term tags exactly as published.

### Levels and options

- Gate by level: SL, HL, AHL, options.
- Exclude HL-only content from SL counts; list exclusions once in the footer.
- Cross-check the subject guide for HL-only markers. Teacher focus documents sometimes list HL items without the tag — the latest teacher mail or guide wins.
- Do not mix levels in one checklist unless the exam does.

### Tools, frameworks, formulas, methods

These are separate learnable objects and get their own section — not repeated under every topic.

- Collect every named framework, model, technique, ratio set, formula family, or method in scope.
- De-duplicate across topics.
- One item per tool, with a short dash descriptor of its components:
  `STEEPLE — social, technological, economic, environmental, political, legal, ethical`
- Order tools as the syllabus first introduces them, or alphabetically. Be consistent.
- Concepts / command terms shared by all topics: one line in the tool section, not 20 repeated checkboxes.

### Counts

- Count content items per topic, per unit/section, and per tool section.
- Overall total = content + tools.
- Reconcile every count against the extracted source before styling.

## 3. Output

- One self-contained `.html` file. No external fonts, CDNs, scripts, images, or network calls. Must work from `file://`.
- Location: `Exam Syllabus/HYE/<SUBJECT>_<LEVEL>_<EXAM>_Checklist.html`.
- Structure:
  - Header: context line, `> Subject / LEVEL`, exam title, logistics line, and confirmed paper structure (sections + marks) when known.
  - Status: ASCII progress bar, `done/total`, reset.
  - Cascading dropdowns: each unit is a `<details>` containing topic `<details>`, which contain the items.
  - Tools/frameworks get their own collapsible section at the same level as units.
  - Cross-nav: the shared `.hye-nav` bar immediately inside `<main class="wrap">`, before the header. Link `[ HYE index ]`, then the sibling checklist, notes, diagnostic and topic worksheets for the same subject. Mark the current page with `aria-current="page"`. Use relative links in the same tab; no `target="_blank"`.
  - Footer: exclusions, format caveats, source, persistence note.
- All units and topics closed by default. Never ship with `open` attributes.
- When the page is added, renamed, or deleted, update `Exam Syllabus/HYE/index.html` and every sibling page's nav in the same change. Run `python3 scripts/verify_hye.py`.

## 4. UI spec — brutalist terminal

- **Left-aligned.** `max-width: 900px; margin: 0;` — never centred.
- Monospace system stack only: `ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`.
- Flat and raw: 1px rules, no rounded corners, no shadows, no gradients, no cards, no icons, no emoji.
- Terminal cues:
  - `> ` prompt before the title.
  - ASCII checkboxes: `[ ]` / `[x]`.
  - ASCII progress: `[########................]`.
  - `[+]` / `[-]` dropdown toggles.
  - `//` separators in labels; uppercase micro-labels.
  - Zero-padded counts: `03/51`.
- Cascade must be visible: indent the unit body one level; keep unit and topic toggles independent.
- Tight vertical rhythm: ~16px between collapsed unit blocks, ~16px after the header rule and ~32px before the footer. Do not use tall margins between units — the separator rule does the work. The first unit drops its `border-top` so it does not double the header rule.
- One accent colour, used only for prompt, checked boxes, progress, complete counts.
- Light theme by default. Do not auto-switch to dark; add a dark variant only when explicitly requested.
- Minimum 390px width with no horizontal overflow. Tap targets ≥ 24px.
- Visible `:focus-visible` styles; full keyboard operation (Tab, Space, Enter).
- No decorative motion. If any is added, honour `prefers-reduced-motion`.
- Reset requires confirmation when checks exist.

## 5. State and persistence

- `localStorage` key: `<subject>-<level>-<exam>-<year>` (e.g. `bm-sl-hye-2026`). Append `-v2`, `-v3`, … when the schema or default state changes so old auto-saved state cannot leak in.
- Schema: `{ "checked": { "<id>": true }, "open": { "<nodeId>": true } }`.
- Default state is closed. Store only `true` open states; delete the key when a node closes.
- Stable IDs: units `unit.<n>` / `unit.tools`, topics `topic.subtopic` (e.g. `1.5.3`), tools `tool.<name>` (e.g. `tool.ansoff`).
- Persist on every check and dropdown toggle.
- Read once on load; tolerate blocked/corrupt storage without breaking the page.
- Reset: clear storage, uncheck all, close every unit and topic, re-render.
- Do not persist scroll position or filters unless asked.

## 6. Verification (required before delivery)

1. **Scope:** every source bullet appears once; no extras. Level exclusions correct, including HL-only items hidden in the teacher focus document.
2. **Counts:** per-topic, per-unit, tool section, and overall totals reconcile.
3. **First load:** every unit and topic is closed; no `open` attributes remain.
4. **Persistence:** check → reload → still checked. Open unit → reload → still open. Open topic inside it → reload → both retain their own state.
5. **Reset:** confirm → all unchecked, every unit and topic closed, storage cleared.
6. **Layout:** 390px mobile and ~900px desktop; light theme; zero overflow.
7. **Input:** keyboard toggles checkboxes and both dropdown levels; focus ring visible.
8. **Console:** no errors on load or interaction.
9. **Exam structure:** confirmed duration, sections, and marks match the latest teacher mail; stale caveats removed.
10. **Navigation:** `.hye-nav` is present before the header; `[ HYE index ]` and every sibling link resolve; the current page has `aria-current="page"`; `index.html` links back to this checklist; no external assets or new-tab links.
11. **Index sync:** the HYE index file count and any Math practice links match the files on disk.

Report: file path, item total, unit/tool split, navigation/index status, and any source conflicts.

## 7. Agent prompt (copy-paste)

> Read `CHECKLIST_FRAMEWORK.md`. Build a study checklist for `<subject / level / exam>`.
> Inputs: `<files, mails, timetable>`. Use the latest teacher mail for paper structure and level-specific exclusions. Preserve official scope and numbering; gate by level; de-duplicate tools into their own section; use cascading unit → topic dropdowns, all closed by default; follow the UI and state specs exactly.
> Add the shared `.hye-nav` and update `Exam Syllabus/HYE/index.html` and sibling navs. Run `python3 scripts/verify_hye.py`. Verify counts, persistence, reset, navigation, mobile, and theme. Report totals, index sync, and any source conflicts.

## 8. Anti-patterns

- Centred card layout, rounded corners, soft shadows, gradients, emoji.
- Repeating SWOT/STEEPLE/etc. under every topic.
- Inventing subtopics or "nice to know" content not in scope.
- Hiding paper-format or level conflicts in prose instead of the footer.
- Remote assets, analytics, or dependencies.
- Trusting stale repo metadata over dated official files.
- Shipping without testing reload persistence and reset.
- Shipping a HYE page with no `.hye-nav`, a dead sibling link, or no index entry.
