# RULES-COVERAGE — ATO role-view preview

This lists every ATO, review and member rule from DECISIONS-MASTER.md and Rules-RULES-MASTER.detailed.md that belongs on an ATO page, and where it appears in this preview layer (or why it does not).

**DECISIONS-MASTER wins** on any clash with older RULES-MASTER text. Newest MT decision wins.

The original generator in `../ato-generator/` is not modified. Coverage below refers to files in this folder: `render.py`, `template/ato.html.j2`, `template/parts/*.j2`, `template/directory.html.j2`, `static/roles.css`, `static/roles.js`, `static/directory.css`.

This is a static SAMPLE preview. It shows the rules in the page. It does not run the live API, D1, Turnstile, PayFast, or Super Admin queues.

---

## How school states are shown (exporter bug corrected)

`tools/reviews/export_for_generator.mjs:30` is **wrong** and is not used here:

- It marks a lapsed school (`suffix === ".official"` without `ato_gold`) as `"verified"`.
- It marks a claimed-but-unpaid school (no `.official` yet) as `"unclaimed"` and would show a Claim invite.

Canonical flags live in `render.py` (`school_state()`). After the original `page_model()` runs, this layer overwrites `paid`, `verified`, `lapsed`, `official`, `gold_tick` and `show_claim_invite`. Official replies are stripped on `claimed_unpaid` and `unclaimed` (they could never have been posted). They are kept on `lapsed`.

| State | Verified | Gold tick | `.official` | Claim invite | Official replies | Extras |
|---|---|---|---|---|---|---|
| unclaimed | no | no | no | yes (`/ato/claim?slug=`) | none | locked |
| claimed_unpaid | no | no | no | no (already claimed) | none | locked |
| paying (incl. gifted) | yes | yes | yes | no | yes, on own page | unlock after 30 days paid |
| lapsed | **no** (not verified) | no | kept | no | no new ones; old ones stay | private again; can still vote |

Gold tick = claim approved **and** currently paying (paid or gifted). An approved claim is necessary, not sufficient. Shown in `parts/hero.j2` with `svg.tick_ato` and on directory cards as a simple gold tick.

Sign-in is `/signup/?next=/ato/{slug}/` (`render.py` `SIGNIN`, used by the guest gate and empty state). The original generator's `/signin/?return=` is not used.

---

## Clashes — DECISIONS-MASTER wins

| Topic | Older rule | What this preview follows |
|---|---|---|
| Anonymous who | REV-012, U-26, N-01 include Trial | **Pro and Founding only.** Not Free, not Trial. `review_form.j2`, `can.anonymous` in `render.py`. Trial page (`member-trial.html`) explains this. |
| Review / vote periods | REV-007, U-21: SAST calendar month | **Rolling cycles** from the day the plan starts. Quota line in `review_form.j2` says "in this cycle". |
| Guest reviews | REV-018: top 2 | **Top 3** written reviews by upvotes, ties to newest (REV-029 and DECISIONS). Then a real lock, not a blur. `parts/reviews.j2`. |
| Sign-in method | U-01: Google only | Superseded. DECISIONS: no Google sign-in at launch. This preview only links to `/signup/?next=`. |
| Delete | Some older text waits 15 minutes | **Anyone can delete their own review or reply any time.** Confirm copy in `reviews.j2` + `roles.js`. |
| `.official` / verified | Exporter and original `page_model` treat lapsed as verified; B-11 wording is looser | **Verified and gold tick only while paying.** `.official` starts after the first payment and is kept after lapse. |
| Reply rights | REV-040 vs REV-041 vs REV-049 | Paid (Trial / Pro / Founding) may reply on any thread. Free may reply only on their own review. School official reply is separate and only while paying on their own page. |
| Staff reviews | Some older conflict rules | School **login** cannot write a star-review. A person who also flies uses a member account. Staff reviews are not marked "Staff". |

---

## ATO-01 … ATO-21

| Rule | Where it appears, or why it does not |
|---|---|
| ATO-01 Lapse, Standard fallback, paid restoration | Lapsed owner page: no gold tick, `.official` kept, extras private, no new official replies, "Premium has ended" banner (`status_banners.j2`, `hero.j2`, `premium.j2`). Paying restoration is the paying owner page. |
| ATO-02 Official attribution | Official replies labelled `{handle}.official` with gold tick when paying, in `review_card.j2`. Lapsed: no new official composer. |
| ATO-03 Announcements | `parts/premium.j2`, unlocked only after 30 days paid. SAMPLE layout. |
| ATO-04 Course prices + "Updated \<date\>" | `premium.j2` (wording is "Updated", not "Last updated" — also REV-045). Locked until 30 days. |
| ATO-05 Jobs / vacancies | `premium.j2`. Locked until 30 days. |
| ATO-06 Fleet types and counts | `premium.j2`. Locked until 30 days. |
| ATO-07 Fleet feature, no review manipulation | Fleet is a Premium module only. Reviews are a separate board. No "boost reviews" control. |
| ATO-08 Intake dates and seats | `premium.j2`. Locked until 30 days. |
| ATO-09 Contact and booking links | Booking CTA in `premium.j2` when unlocked. Contact on the Basic page stays in `about_contact.j2`. |
| ATO-10 Owner control of modules; no FAQ; photos later | Owner sees the modules when unlocked. No FAQ block. No photo gallery. Module edit UI is not in this page preview (owner console). |
| ATO-11 Basic page is approved; Premium design later | Basic page (courses, About, rating card, bases) follows the locked v6 / 2-column design. **Premium extras here are a proposed layout**, labelled SAMPLE, because ATO-11 still says design later. |
| ATO-12 6/12-month bonuses | Billing, not this page. Not shown. |
| ATO-13 Owner gifts of Founding ATO / Premium | Super Admin / billing. Paying-state shots include gifted Premium as the same gold tick + `.official`. Gift UI is not on this page. |
| ATO-14 Neutral invitations; no review gating | No "review to unlock" or "refund for removal" copy. Claim invite is a quiet link on unclaimed pages only. |
| ATO-15 Payment never overrides Banned or reviewer rights | Ban / charging is Super Admin. Not simulated here. School login still cannot write a star-review (`reviews.j2` school branch). |
| ATO-16 Paid-badge disclosure, no regulatory endorsement | Gold tick only. No "Verified by SACAA" or similar. "Pilot" is not used as a paid-badge label. |
| ATO-17 Truthful dated course prices | SAMPLE prices in `premium.j2` carry an "Updated" date. |
| ATO-18 One ATO account; no staff seats | One school login in the owner chrome (`parts/chrome.j2`). No staff-subaccount UI. |
| ATO-19 Link scheme `/ato/{slug}`, base `/ad/{CODE}` | Pages are under `/ato/{slug}/`. Role filenames are preview-only. Base ICAO still links as in the original body. |
| ATO-20 Generator makes the page body; top bar is shared | Preview chrome in `parts/chrome.j2` is a **stand-in** so shots do not depend on live `topbar.js`. Guests get logo only (no app nav). Members / owners get a simple nav; Weather and Calculators are marked LOCKED for Free and for a non-paying school. |
| ATO-21 Public pages for every school, including expired | All three schools have a public guest page. Reviews are allowed on expired certificates (REV-036) — the form does not block them. |

---

## REV-001 … REV-061

| Rule | Where it appears, or why it does not |
|---|---|
| REV-001 Stars first; text optional | `review_form.j2`: categories required (at least one), text optional. |
| REV-002 Stars-only may add text later; stars locked; no extra quota | "You reviewed this ATO" in `reviews.j2` has a stars-only path and "Text added \<date\>". Form is hidden while a live review exists (replace after 6 months). |
| REV-003 / REV-025 One review per member per parent ATO; replace after 6 calendar months | Replace date in `reviews.j2` ("You can post a new one from …"). |
| REV-004 15-minute edit, then Edited | Edited tag on cards (`review_card.j2`). Edit control is shown only when `can.edit` is true (Pro/Founding/Trial inside the window in the mock). |
| REV-005 Free cannot edit; reply only on own review | `member-free.html`. No edit on the published card. Copy: "Free members may reply only in the thread of their own review." |
| REV-006 / U-20 Only signed-in members write; guests cannot write, reply or vote; guests can report | Guest: no form, no vote buttons, Report still on the three cards. Gate after the top 3. |
| REV-007 Quota 5 / 20 | Shown as a rolling-cycle count (`review_form.j2`). Calendar-month wording is not used. |
| REV-008 / REV-037 Seven locked categories, exact order | Organisation, Fleet, Ground school, Instructors, Safety culture, Value, Availability — form and member "By category" (`review_form.j2`, `rating_categories.j2`). |
| REV-009 / REV-032 Skip any category; overall = average of rated categories | Live average in `roles.js`; "Overall — average of the categories you rate" in the form. |
| REV-010 / D1 Page overall is the average of review overalls, not the mean of category averages | `render.py` computes the 4.4 (CFA) / 3.5 (Bucephalus) that way. |
| REV-011 Rating and each category show from 3 reviews; never invent | Directory lede and category rows: stars, or a dash, until 3. Lowveld is "No reviews yet". |
| REV-012 / N-01 Anonymous optional, never forced | Checkbox off by default. Who may use it: **Pro / Founding only** (DECISIONS). |
| REV-013 / N-30 Agreement tick before Post is enabled | `review_form.j2` + `roles.js` (Post stays blocked until the agreement is ticked). |
| REV-014 / N-32 Label is "Anonymous"; never "Anonymous pilot"; no "pilot" in review UI | `badges.j2`. Course names and About may still say "pilot" (decision D4). |
| REV-015 / N-20 / N-21 Anonymous forever; no switch-off | Copy: "Posted as Anonymous · locked". Agreement text says it stays Anonymous forever. |
| REV-016 / N-10 Own anonymous thread stays anonymous; other threads may choose again | Reply toggle copy: "locked for this thread once posted". |
| REV-017 / N-11 / REV-033 Per-reply toggle if no review on that ATO; OPEN until MT says otherwise | Reply composer still has the anonymous toggle for Pro/Founding when `can.anonymous`. Flagged as the standing OPEN rule, left on. |
| REV-018 Top 2 | **Not followed.** Superseded by REV-029 / DECISIONS (top 3). |
| REV-019 / U-28 Any signed-in tier can vote, including on anonymous; not on your own | Vote buttons on member/owner/admin cards. Not on guest. Not on `mine`. |
| REV-020 / REV-050 Report: name, cell, reason, plus private email | Report control on cards (guests included). Full report form UI is not a separate modal in this preview — the control is there, the live form is the production board. |
| REV-021 / REV-056 School cannot star-review itself or edit/delete member reviews; may official-reply on its own page | Owner: no write form. Official reply composer only when `can.official_reply` (paying, own page). |
| REV-022 No fake sample reviews in live school data | Every mock card and the preview chrome are labelled **SAMPLE**. This folder is not the live generator. |
| REV-023 One public slug | CFA, Bucephalus, Lowveld slugs from the master. |
| REV-024 / REV-031 Pages are public for SEO | Guest pages are the public body. Preview itself is `noindex` so this test branch cannot be confused with live pages. |
| REV-026 No 20-character minimum | Form has no minimum, only the 150-word / 1,500-character cap. |
| REV-027 Gold/glass at 4.0+; flat below | CFA 4.4 glass; Bucephalus 3.5 flat. Category rows glow at 4.0+. |
| REV-028 Nested replies with indent | Member replies under the official reply in `review_card.j2`. |
| REV-029 Guest top 3 + sign-in gate | `reviews.j2`. Button goes to `/signup/?next=`. |
| REV-030 150 words, live count, server also rejects > 1,500 characters | `roles.js` word count; `maxlength="1500"` on textareas. |
| REV-034 Six-month replace does not use quota | Described on the "You reviewed this ATO" card; not a live quota engine. |
| REV-035 Delete own review after edit window — **DECISIONS: any time** | Delete + confirm in `reviews.j2`. Stars stay in the rating (REV-055 / D5). |
| REV-036 Reviews allowed on expired certificates | No expiry block on the form. |
| REV-038 Anonymous card: Anonymous, stars, text, month-level date; no badges | Guest and member anonymous cards (e.g. "Jun 2026"). `nice_month`. |
| REV-039 Votes from accounts older than 7 days; 20/day cap toward rankings; rating from 3 distinct aged reviewers | Server rule. Preview assumes the SAMPLE ratings already qualify. Caps are not simulated in the browser. |
| REV-040 / REV-041 Comment requires a review vs written review | See clash table. Paid members may reply anywhere (REV-049 / DECISIONS). Free stay in their own thread. Stars-only authors in the mock do not get a visible public card until text is added (REV-043). |
| REV-042 Free can vote on everything; reply only in own thread | `member-free.html`. |
| REV-043 Stars-only counts in the average; card hidden from others until text is added | CFA has 23 ratings / 8 written cards. Count-only ratings are in the score, not listed as cards. |
| REV-044 One form; text optional; Overall above the seven categories | `review_form.j2`. |
| REV-045 "Updated \<date\>", not "Last updated" | Bases / certificates keep the original generator wording; Premium prices use "Updated". |
| REV-046 / REV-053 Shared star system; pyramid + Clash Display number | Hero and rating summary use the original generator star helpers (unchanged). Directory cards use a simpler 13px compact row because the glass SVG at 11px read as a "1". |
| REV-047 / REV-058 / REV-060 Course pills, groups, More | Copied original `courses.j2` behaviour, including "More". |
| REV-048 Write-form stars match the top score, one column | `review_form.j2` + `roles.js` overall-from-categories. |
| REV-049 Trial / Pro / Founding may reply anywhere; Free stay in own thread | Card composer branches in `review_card.j2`. |
| REV-051 Guests and members see the same rating card | Same hero / summary card; members additionally get "By category". |
| REV-052 Category rows: stars only; Overall keeps its number | `rating_categories.j2`. |
| REV-054 Quiet Edit on the card | Rendered when `can.edit`. |
| REV-055 Deleted: text and card go; stars stay | Delete confirm copy. Already-deleted ratings in the CFA 23 are count-only. |
| REV-057 / REV-059 / REV-061 Locked visual design (smaller card stars, 2-column desktop, Overall not clipped) | Role template keeps the original body layout and tokens, then adds the member board. Desktop 1280 member shot shows the 2-column page. |

---

## U, N, B (on this page)

**U (members)**

| Rule | On this page? |
|---|---|
| U-01 Google-only sign-in | No. Superseded. Link is `/signup/?next=`. |
| U-02–U-07, U-10–U-16, U-30–U-35 | Sign-up, plans, billing, chat, bans, deletion — not this page. Plan *rights* that affect the board are applied (Free / Trial / Pro quotas, anonymous, tools locked). |
| U-20 Write / vote / reply / report | Yes — see REV-006. |
| U-21 Quota | Yes, as a rolling cycle. |
| U-22 Free: no edit, named only, reply only on own review | Yes, `member-free.html`. |
| U-23 15-minute edit, then Edited | Yes, when `can.edit`. |
| U-24 / U-25 One review; stars-only; text later; no extra quota | Yes, `reviews.j2`. |
| U-26 Anonymous | Yes, but **Pro / Founding only** (not Trial). |
| U-27 No reviewing your own / employer school | School login has no write form. A personal conflict check is a server rule, not a guest-visible control. |
| U-28 Votes, including on anonymous | Yes, for signed-in roles. |

**N (anonymous)**

| Rule | On this page? |
|---|---|
| N-01 Who may post anonymously | **Pro / Founding only** (DECISIONS). Trial page states this. |
| N-02 When a plan ends, old anonymous stays anonymous | Shown as locked Anonymous cards; no "reveal" control. |
| N-03 Schools cannot post anonymously | Official reply has no anonymous toggle. |
| N-10 / N-20 / N-21 / N-30 / N-31 / N-32 | Yes — thread lock, forever, agreement, "Anonymous" only, no badges, no "pilot". |
| N-11 OPEN per-reply toggle | Left on for Pro/Founding. |
| N-12, N-13, N-24 | Replaced / dropped. Not shown. |
| N-22 Server projection, not CSS-only | Preview HTML already emits "Anonymous" with no author id. Live enforcement is `publicReview` in production, not this static layer. |
| N-23 / SA-04 Private Super Admin lookup | Admin banner states identity of an anonymous author stays in the private owner console, not on this page. No reveal UI. |
| N-33 Clearing a spam hold never restores badges on anonymous | Moderation queue, not this page. |

**B (badges)**

| Rule | On this page? |
|---|---|
| B-01 / B-03 / B-10 Gold ATO tick, `#F5B83D`, means paid or gifted Premium | `hero.j2` uses `svg.tick_ato` only when `gold_tick` (claim approved and paying). Directory uses a simple gold tick. Lapsed and claimed-unpaid have none. |
| B-02 / B-05 / B-12 DFE blue tick | Member cards (e.g. James K.dfe). |
| B-04 Official handle, blue `.official`, no "Verified ATO" pill | `hero.j2` when `official`. Lapsed adds a "Lapsed" pill, not a "Verified" pill. |
| B-06 / B-13–B-16 Founding compass; DFE wins; never on ATO | Lerato's card has the compass. No compass on the school name. |
| B-07 Pro badge (design later); Trial none | No Pro badge invented. Trial has none. |
| B-11 `.official` = verification (paid or not) | **Qualified by DECISIONS:** `.official` starts after the first payment and is kept after lapse. Claimed-unpaid is claimed, but has no `.official` yet. |
| B-17 Unverified schools never show Official or gold tick | Unclaimed and claimed-unpaid: neither. Lapsed is not verified and has no gold tick, but keeps `.official`. |
| B-18 Super Admin badge superseded | Admin chrome has no plan badge. |

---

## DEC, SA, UR, and other rules

| Family | On this page? |
|---|---|
| DEC-001… (older packed decisions) | Where they still stand they are already folded into DECISIONS-MASTER (D1 score, D3 tools, D4 "pilot", D5 deleted stars). Followed as above. |
| SA-01… — most Super Admin queues, gifts, prices, bans, logs | Not this page. Build those screens elsewhere. |
| SA hide / remove of a review | **Yes**, on the admin role: Hide and Remove on every card (`review_card.j2` + `roles.js`). That is the only admin control on the public ATO page. |
| SA-04 anonymous identity lookup | Not on this page (see N-23). |
| UR-01…UR-98 (identity, chat, appeals, storage) | Not the ATO page. Only the rights that change the board (plans, anonymous, votes) are applied. |
| Payments, grace, refunds, Founding seats, email, VAT | Not this page. |
| Chat / messages (`feature_messages = 0`) | Not sold, not shown. Official review replies stay. |
| "Never contact SACAA" | No SACAA contact CTA. Certificates are shown as already in the master. |

---

## What this preview deliberately does not do

- No live `GET /api/ato/{slug}/view` and no D1. Mock objects follow the `getSchoolView` shapes (`can`, `mine`, `my_votes`, categories, official replies).
- No Turnstile, no real Post / Vote / Report / Hide.
- No `/ato/claim` implementation (the invite link is present on unclaimed pages).
- No production top bar. Preview chrome only.
- Premium extras are a proposed SAMPLE layout (ATO-11: design later).
- One URL per school in production; separate HTML files here are only so each role can be opened without a session.

See `README.md` for how to render and take shots.
