#!/usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
"""Reproducible source for the five Year 4 optional subject menus."""
from __future__ import annotations

import argparse
from dataclasses import dataclass
from pathlib import Path

ROOT = Path(__file__).resolve().parent


@dataclass(frozen=True)
class Card:
    title: str
    codes: str
    prepare: str
    notice: str
    task: str
    show: str
    choices: str
    home: str
    evidence: str
    next_: str


S = Card
CARDS: dict[str, list[Card]] = {
    "science": [
        S("A slide that slows", "AC9S4U03 AC9S4I01 AC9S4I03", "Two clean paper strips, one smooth folder and one cloth scrap; if objects are unavailable use MODEL Card S1.", "Slide the same paper square gently across the two surfaces. Ask what moved and what might have affected it.", "Try the paper square on both approved surfaces with the same gentle start. Record which went farther and label REAL if you actually tried it, MODEL if you read Card S1. Predict what a third surface might do.", "State one observed or modelled difference and one question a repeat could answer.", "Point and speak; mark two lines; direct an adult to move the square.", "Use two safe paper surfaces already at home, or just compare the labelled model card; no purchase.", "Evidence is a recorded motion comparison with source label; one slide does not isolate friction or prove a universal material rule.", "Repeat with the same start and a simple distance marker before saying one surface causes more slowing."),
        S("Keep the test fair", "AC9S4I02 AC9S4U03", "Paper square, smooth/cloth surfaces and a start mark; clear tabletop.", "Ask whether changing both the surface and paper square would tell which made a difference.", "Plan and run two gentle slides: use the same square, start line and push method; change only the surface. Record what stayed the same and what changed. If no materials, arrange a PLAN-only test with tokens.", "Name the changed factor, two controls and whether the test actually happened.", "Move variable cards; write a same/change table; describe to a partner.", "Make a paper plan on a table; household materials are optional and adult-approved.", "Actual fair-test evidence requires the two real trials and controlled starts; a token plan is planning evidence only.", "If two factors changed, reset one at a time and retest or label the result inconclusive."),
        S("Read the ruler from zero", "AC9S4I03 AC9S4I04", "School ruler with clear zero, paper slider and start/stop marks; optional tactile ruler.", "Place zero on the start mark, not at the ruler's physical edge if that edge is offset.", "Make two approved gentle slides of the same paper square on one surface. Measure start-to-stop travel to the nearest whole centimetre, record both readings and the unit. If no real trial, use MODEL Card S2 and label it.", "Say both values and whether they match; name the source of the values.", "Read a ruler; use raised centimetre marks; direct a partner's alignment.", "Measure a safe paper move or read the model distances; keep the source label.", "A model number is not actual instrument-use evidence. A real reading needs correct zero alignment, unit and what was measured.", "If a child reads from the ruler edge, align zero together and repeat on a fresh mark."),
        S("Three trials in a table", "AC9S4I04 AC9S4I05", "Fictional MODEL Card S3 with six distances, blank table and two labelled columns.", "Point out that one number can be unusual; the printed values are invented, not class results.", "Copy MODEL S3 into smooth/cloth columns. Circle the greatest and least in each, then compare the typical size cautiously. Say one condition not listed that would matter in a real test.", "Give a limited pattern claim and one missing control.", "Use movable number tiles; dictate cells; draw two labelled columns.", "Use the six printed numbers on scrap paper; no sliding required.", "The model smooth values 18,20,19 cm exceed the cloth values 9,11,10 cm in this invented record only; do not claim actual material performance.", "If a learner states a universal law, add 'in this model' and ask for real repeated observations."),
        S("A downward change", "AC9S4U03 AC9S4I01", "Crumpled scrap-paper ball and shallow empty tray on a clear table; model arrow card if movement is unavailable.", "Let the paper ball move a short safe distance down a tilted tray. Ask what direction changed without saying a push continued.", "Try an adult-approved gentle tray tilt and record the paper ball's direction, or use the labelled MODEL arrows. Predict what may happen if the tray is flat; keep observed and predicted statements separate.", "Name the motion and one force question that the single trial does not settle.", "Point to arrows; trace with a finger; speak or sign the sequence.", "Tilt a paper folder over a table with an adult, or use the arrow model; no dropping objects.", "Actual motion supports direction; identifying gravity or friction as a sole cause needs a controlled comparison, not a confident guess.", "Retest on a level tray or ask how a changed slope could isolate the cause."),
        S("A magnet claim needs a test", "AC9S4U03 AC9S4I02", "Only a school-approved, adult-managed large magnet and a sealed large metal object, or MODEL Card S4; no loose small magnets.", "Show the source label first. Ask whether every shiny object must respond to a magnet.", "If staff have an approved sealed setup, predict then observe whether the object moves without direct contact. Keep distance and barrier the same for a second trial. Otherwise sort Card S4's invented notes as MODEL and propose a safe test.", "Report what actually happened or was only described; name one safer control.", "Draw position arrows; point to yes/no card; dictate a test plan.", "Use MODEL S4 only at home; no magnet or small metal object is required.", "A paper card does not demonstrate magnetic force. Even one real object response does not show that all metals behave alike.", "If learner generalises to every metal, compare another staff-approved material or phrase a narrower claim."),
        S("Materials and a paper drop", "AC9S4U04 AC9S4I02 AC9S4I03", "Clean paper and washable cloth scraps; optional adult-controlled small water drops on a tray; MODEL Card S5 otherwise.", "Ask what 'absorb' might look like and how to keep drop size similar.", "Plan and, only if approved, test one equal water drop on each scrap over a tray; record whether it spreads/soaks at the same observation time. A no-water route reads MODEL S5 and marks it clearly.", "State the observed or modelled property without ranking every cloth or paper.", "Sketch droplets; use tactile wet/dry tokens without touching liquid; dictate a table.", "Use the model notes with paper only; no sink, water or purchase is necessary.", "An actual safe comparison supports only those two tested scraps; a printed note supports data-reading, not observation or a property of all materials.", "If timing/drop sizes differ, plan a fair repeat before choosing a material."),
        S("Fold, flex, return", "AC9S4U04 AC9S4I03", "Clean paper, card and cloth scraps; no sharp tools or snapping test.", "Show that 'bends' and 'returns to shape' are two different observations.", "Gently fold each approved scrap once, release, and record whether it bends and whether it returns near its prior shape. If no material is handled, use MODEL S6 and state that route.", "Choose one scrap for a paper label flap and cite an observed feature plus a limit.", "Use word labels; raised bend/return cards; direct a partner's gentle fold.", "Try a safe scrap already at home or read MODEL S6; do not tear household items.", "Evidence is a specific handling observation or clearly labelled model, not proof of a product's strength or lifetime.", "If 'best' lacks criteria, ask what the flap must do and test only that feature."),
        S("Compare two records", "AC9S4I04 AC9S4I05", "REAL class record if an approved test occurred, plus clearly marked MODEL S3; keep sources separate.", "Ask why two records should not be merged when one is invented.", "Compare the class result with MODEL S3 only as two labelled sources. Mark any agreement or difference, note changed conditions, and say what additional fair trial would be useful. If no class test, compare MODEL S3 and MODEL S6 as different questions, not a joint data set.", "State a cautious comparison and one further question.", "Two source columns; verbal comparison; tactile source tokens.", "Use only printed model notes and ask what a real trial would add.", "No pooled average or actual class claim may be made from invented data. Real and model values remain visibly distinct.", "If the learner combines sources, colour/label them REAL and MODEL and rebuild the table."),
        S("A material recommendation with limits", "AC9S4U04 AC9S4I05 AC9S4I06", "Earlier records and a fictional paper-card-holder need; no actual manufacturing decision.", "Ask which evidence can support a recommendation and which real-use question is still open.", "Make a short note to a fictional designer: name one tested or MODEL material property, choose a possible card-holder material, say what a real prototype would still need to test, and label the evidence source.", "Read, show or AAC-select the evidence, choice and next test.", "Three sentence cards; small labelled sketch; dictated explanation.", "Use MODEL S5/S6 to explain a possible choice on paper; no making or purchase.", "A recommendation from a model is provisional. Do not claim real strength, safety, sustainability or commercial fitness without additional evidence.", "If the claim outruns data, replace 'will work' with 'might work because...; we still need...'"),
    ],
    "hass": [
        S("Ask before you map", "AC9HS4S01", "Fictional Source H1: paper Share Shelf plan; not a real local map.", "Show H1's legend and ask what a map can answer versus what people use it for.", "Write two investigation questions about H1: one answerable by its labels and one needing another source. Name who could help check the second without asking for anyone's private details.", "Read one useful question and why the map alone is insufficient.", "Question cards; oral/AAC; two-column sketch.", "Use H1 on paper; no local outing or address required.", "Questions are inquiry evidence; H1 cannot establish real local geography, community use or accessibility.", "If a child asserts a place fact, add 'in this fictional plan' and identify a current approved map needed."),
        S("Record a source, not a guess", "AC9HS4S02", "Original fictional H1 map and H2 note, each with title/date/source label.", "Point to the source line before any feature. Explain that a date can matter.", "Locate H1's entrance arrow and two baskets; record each feature with source title and date. Compare with H2's written note and mark a question where information is missing.", "Show one annotated map label and a proper source note.", "Trace H1; movable labels; dictate source metadata.", "Use the fictional sheets only; no real place search.", "Copying a feature without its fictional source/date cannot support a local-world claim.", "If source is omitted, add a simple title/date/what-it-shows strip before discussing conclusions."),
        S("Map and table tell different things", "AC9HS4S03", "Fictional H1 map and H3 proposal table; no actual council data.", "Ask which format shows position and which shows counts/choices.", "Find the proposed location of the reading mat on H1 and the three proposal options in H3. Explain why H3 cannot locate a route and H1 cannot show an option's stated cost.", "Name a useful question each format answers and one it cannot.", "Point between formats; tactile grid; spoken comparison.", "Compare the two printed sources; no web access.", "Interpretation is of original models only, not an Australian place or real service.", "If the learner swaps roles of map/table, physically place one location token and one count token on the suitable source."),
        S("Two readers, two priorities", "AC9HS4S04", "Fictional H4 note A and B with different preferences; names invented.", "Read both viewpoints with no winner announced.", "Sort each note into a source-supported fact about H1 and a preference. Explain how the same planned entrance could lead to different priorities and what evidence would test each concern.", "Name both viewpoints fairly and one shared fact.", "Two voice cards; write F/V labels; partner reads a note.", "Use the fictional note pair; no personal family opinion requested.", "Perspective analysis does not tell what actual community members think. One letter is not a representative survey.", "If a child labels one writer 'wrong', ask for the exact words and separate preference from a checkable fact."),
        S("What source is missing?", "AC9HS4S01 AC9HS4S04", "Fictional H1/H4; a blank source request slip.", "Offer the claim 'everyone can reach the shelf' and ask which source proves it; none does.", "Choose two missing-source requests: a measured path and a voluntary access test are possibilities. Explain who should authorise real data collection and why no classmate must disclose an access need.", "Give one specific source request and one privacy boundary.", "Write a request; arrange evidence tokens; speak a question.", "Draft a paper source request only; no contacting anyone.", "A proposed source is not collected evidence; local participation needs permission and safeguarding.", "If the request asks for personal disclosure, replace it with a nonpersonal measure or school-approved consent process."),
        S("An invented timeline", "AC9HS4S02 AC9HS4S03", "Fictional H5 timeline cards dated 2022, 2024, 2026; not actual local history.", "Put source dates in chronological order before asking what changed.", "Order H5's three notes and build an annotated mini-timeline. Explain the documented change in the invented plan and name one thing the timeline cannot explain about why it changed.", "Point to earliest/latest and cite the exact note for the change.", "Move date cards; draw line; dictate a timeline caption.", "Use H5 cards at home; do not research a family or place.", "Ordering fictional dates is a history-inquiry skill, not evidence of actual local events or motives.", "If causation is invented, separate 'after' from 'because' and request another source."),
        S("A proposal table needs a key", "AC9HS4S03 AC9HS4S04", "Fictional H3 table with three options and a missing unit note.", "Ask if a bare 12 in a table means dollars, minutes or people; it does not.", "Read H3's stated columns and identify which cells have clear units. Compare two proposal viewpoints without deciding from an unlabeled number. Add a question for the author of H3.", "Explain one ambiguity and what cannot yet be concluded.", "Large table; unit tokens; verbal annotation.", "Use H3 on paper; no real purchase or service data.", "An unlabeled number cannot establish cost or popularity; invented table is not council evidence.", "If a learner chooses a plan from 12 alone, ask '12 what?' and revise the claim."),
        S("A conclusion with two citations", "AC9HS4S04 AC9HS4S05", "Fictional H1/H2/H4; source tags ready.", "Model a limited statement: H1 places the mat beside the shelf; H2 reports no use data.", "Write or say a two-source conclusion about what the paper design shows and does not show. Attach H1 and H2/H4 tags to the exact claims; do not infer actual community preference.", "Give the conclusion and one missing source.", "Sentence strips; oral citation; annotated sketch.", "Use the fictional sources only; no local claim.", "A conclusion must follow the cited model sources; fictional design cannot certify real accessibility.", "If one source does all the work, ask what the second genuinely adds or withdraw the extra claim."),
        S("An action and a possible effect", "AC9HS4S06", "Fictional H3 proposals and H4 perspectives; no actual council request.", "Ask whose need an action might help and who could face a new barrier.", "Propose a change to the paper Share Shelf plan, name one possible benefit and one possible cost/barrier, and state what evidence would be needed before a real decision. Do not use personal disclosures.", "Present the action, both possible effects and the evidence gap.", "Three-card plan; drawing with labels; AAC sequence.", "Make the proposal on paper for an imaginary design team.", "Considering effects is inquiry practice, not proof the action would work for an actual community.", "If only a benefit appears, invite a second perspective and an unintended effect."),
        S("Tell a source-bound story", "AC9HS4S05 AC9HS4S07", "Fictional H1–H5 cards; choose only claims the sources support.", "Show a short explanation structure: model, two sourced details, uncertainty.", "Present a 30-second or written explanation of how the fictional plan changed and what remains unknown. Name at least two original source labels and avoid a real local-government or Country/Place claim.", "Give the explanation to a teacher/partner and answer one source question.", "Speech/AAC; short note; tactile timeline with source tags.", "Use printed model cards; no filming or posting.", "An explanation using invented sources is not evidence about a real place, community or First Nations knowledge.", "If a detail has no source, delete or qualify it and rehearse with a clear citation."),
    ],
    "hpe": [
        S("Permission before a shared game", "AC9HP4P07", "No-touch paper-token game; clear table, stop card and opt-out place.", "Model asking 'May I move the token on your card?' and accepting no without argument.", "In a fictional partner game, rehearse asking, waiting for yes/no, offering a different role and stopping when asked. Swap roles without requiring anyone to disclose a real boundary or personal history.", "Show one respectful request and one response to no.", "Role cards; spoken/AAC exchange; two puppet tokens.", "Practise with two paper characters alone or an adult; no touch required.", "The observed respectful rehearsal is evidence; a written script alone is a plan, not proof of behaviour in every situation.", "If a no is challenged, replay with an accepted alternative role and teach that permission can change."),
        S("A no-touch mirror", "AC9HP4P04 AC9HP4P05 AC9HP4M01", "Clear approved space or seated upper-body route; pairs may choose not to mirror.", "Demonstrate slow arm reach, pause and return with ample space; no competitive matching.", "With consent, one partner makes three gentle movements and the other mirrors at a comfortable range. Swap leader/follower and ask what adjustment made participation easier; a pupil may direct a paper figure instead if movement is declined.", "Name a helpful adjustment and show one revised movement if willing.", "Seated/standing range; AAC direction; paper figure directed by learner.", "Use a paper figure or gentle voluntary arm move at home; no partner necessary.", "Movement-skill evidence requires actual movement observed. Directing a figure still shows inclusion/communication, not bodily performance.", "If a partner is excluded, offer a slower cue, more space or alternative role and observe whether it helps."),
        S("Send a token to a target", "AC9HP4M01 AC9HP4M02", "Soft paper disc or large paper token, table target and no-throw rule.", "Model sliding, not throwing, toward a marked large target.", "Choose a start line and gently slide the paper token three times toward a paper target. Change one thing—distance or hand position—then compare where it stops. A learner may direct a partner's slide if motor access requires it.", "Show the change and what happened in one trial.", "Slide by hand; use a cardboard guide; direct a partner by AAC.", "Slide paper on a clear table or plan with a drawn arrow; no hard object needed.", "Only observed movement supports a movement code; arrow planning supports strategy discussion. Three slides do not establish athletic ability.", "If results vary, keep one change at a time and ask which strategy to try next."),
        S("A fair rule everyone can hear", "AC9HP4M08 AC9HP4P05", "Paper target game with simple start/stop card; no score published by child name.", "Compare 'one point for speed' with 'one point for a clear team cue' and discuss fairness.", "Co-create one rule that supports different movement ranges, play one safe paper-target round, then revise the rule after noticing a barrier. Keep scores anonymous and optional.", "State the rule, who could participate and one revision.", "Rule strip; spoken negotiation; AAC choice cards.", "Use paper-token play or just draft the rule at home; no score contest.", "A paper rule without actual play is design evidence only; fair-play application needs an observed round.", "If a rule rewards only speed, ask how a seated or slow-moving player could contribute."),
        S("Three moves, one idea", "AC9HP4M03 AC9HP4M07", "Approved clear space; alternatives include small seated moves or directing a partner.", "Model a slow reach, pause and turn as a sequence with change in time and space.", "Design three safe movements that communicate 'approach, pause, leave'. Rehearse once and change either timing or direction. A learner can make the sequence with hands, upper body, mobility aid motion under their own plan or a paper figure.", "Show/describe what changed and how it altered the idea.", "Standing, seated, small hand range; AAC-timed cues; paper figure route.", "Try a paper-figure sequence at home; real movement optional and never rushed.", "Actual bodily sequence is performance evidence; a paper figure shows design, not observed movement. No child must perform publicly.", "If the sequence feels unsafe or unclear, reduce range, add a pause and rehearse with choice."),
        S("Who gets to lead?", "AC9HP4P03 AC9HP4P05 AC9HP4M09", "Fictional role cards: 'only fast movers lead' and 'leaders can cue in several ways'.", "Ask what assumption is hidden in the first role card without asking about a child's body.", "Compare the two fictional role cards, choose an inclusive leader rule and run a short token-moving team task with different voluntary roles: cue, move, observe. Rotate roles if everyone agrees.", "Name one stereotype and an observed inclusive choice.", "Point to role cards; speak/AAC; direct without moving objects.", "Use role cards with paper characters; no real team or movement required at home.", "A paper critique supports stereotype/inclusion reasoning; actual respectful team-role evidence needs participation observed.", "If one role dominates, pause and offer a genuine choice of roles without forcing rotation."),
        S("Repair a disagreement", "AC9HP4P04 AC9HP4P07", "Fictional game script: two paper characters both want to move first.", "Model 'stop, hear both, offer a turn choice' without judging personal experiences.", "Role-play a short disagreement about who moves a paper token first. Practise a clear stop signal, hear each view, ask permission for a turn plan, and accept a no. Try another plan if needed.", "Demonstrate one respectful repair phrase or AAC card.", "Puppets; written speech cards; partnered role-play by choice.", "Use two paper characters alone; no real conflict story required.", "Role-play is a rehearsal, not proof of relationship outcomes; follow safeguarding procedure for any real disclosure.", "If the repair becomes a command, change it into a question and leave room for refusal."),
        S("Design an inclusive movement puzzle", "AC9HP4M07 AC9HP4M08", "Paper circles, clear space and a soft-token route; no racing, throwing or touch.", "Give the goal: move three paper tokens from start to finish while every teammate has a role.", "Design two possible ways to complete the tabletop route; choose one fair rule, run a short round, then change the rule if someone cannot participate. A no-movement designer can direct moves and still offer a strategy.", "Describe the strategy, rule and what changed after play.", "Tabletop slide; verbal/AAC directing; drawn route for plan-only.", "Use three scrap-paper tokens on a table; no equipment purchase.", "Movement outcome and fair-play claims require actual observed round. A drawn route alone is a plan.", "If the solution only works for one person, add a cue/observer/decision role with real influence."),
        S("Try, notice, adapt", "AC9HP4M02 AC9HP4M09", "Reuse the approved tabletop route and voluntary roles; staff checks clear space.", "Ask which earlier change helped a teammate, not who was 'best'.", "Run two short rounds of the token route, changing one agreed strategy such as start position or cue timing. Each willing participant takes a role; compare the rounds without naming a loser.", "Name the change, an observed outcome and a respectful role action.", "Slide/direct/observe roles; AAC timing cue; private reflection.", "Use solo paper rounds or explain a possible adaptation; no score or witness required.", "Actual strategy and teamwork evidence requires observed participation; solo planning is useful but not team-performance proof.", "If a child is waiting without influence, give them a meaningful cue or design decision before a repeat."),
        S("An inclusive invitation", "AC9HP4P04 AC9HP4P05 AC9HP4M09", "Fictional next-round invitation; no personal health or identity disclosure.", "Model an invitation with choice: move, direct, observe, or pass.", "In a final brief cooperative round, invite others without pressure, accept a changed choice and use one helpful cue. Then create a paper invitation for an imaginary new player naming two possible roles and a stop option.", "Show the observed cue/invitation and one next improvement.", "Speech/AAC invitation; voluntary movement; labelled paper card.", "Make only the imaginary invitation at home; no gathering people required.", "The actual round can evidence respectful participation; an invitation alone cannot prove someone felt included.", "If a child assumes a role for another, replace with an open choice and observe the response."),
    ],
    "technologies": [
        S("Test a paper holder need", "AC9TDE4K02 AC9TDE4P01", "Scrap paper and card, a medium paper label; safe folding only.", "Show a fictional need: a reusable tabletop label should stand for ten seconds without glue.", "Test one fold in paper and one in card. Place the same label in each, observe whether it stands for ten seconds, and note how material stiffness affects function. If no materials are handled, mark PLAN and do not claim a test.", "Name a tested difference and one design question.", "Fold/direct a partner; tactile crease card; annotated sketch.", "Use clean scrap paper already available, or plan the test on paper.", "Actual prototype/property evidence needs making and the label test; paper plan only suggests a possibility.", "If both fall, change the fold rather than declaring the material useless."),
        S("Two designs, one criterion", "AC9TDE4P02 AC9TDE4P04", "A4 design mat and fictional holder brief.", "Compare an A-frame and a folded pocket sketch without deciding from appearance alone.", "Draw, describe or arrange two holder ideas with labelled folds. Choose criteria: holds a paper label, folds flat, uses one reusable scrap. Predict which idea might fit and what test would decide.", "Explain one criterion and one test, not a claimed winner.", "Two labelled sketches; tactile paper shapes; AAC design decisions.", "Sketch two ideas with any paper; no making required at home.", "Generating/evaluating ideas is not evidence that a product functions until tested.", "If 'best' rests on colour alone, return to the stated function and propose a fair test."),
        S("Make a safe small prototype", "AC9TDE4P03 AC9TDE4P05", "Approved scrap paper/card; fold-only process, no blades, hot glue or sharp tools.", "Sequence 'fold base, add support, insert label' and show how to stop if a fold fails.", "Choose one design, safely fold a small tabletop holder and insert the same paper label. Keep a three-step making record; a learner can direct a partner's hands while retaining design decisions.", "Show the made holder and one step you changed.", "Independent fold; partner-directed fold; large pre-scored safe card.", "Make a paper-only holder if desired, or plan the sequence; no purchase or tool required.", "Making evidence needs an actual assembled prototype; directing a maker can evidence design decisions, with support recorded.", "If the holder collapses, keep the first version as evidence and revise one fold."),
        S("Test against criteria", "AC9TDE4P04 AC9TDE4P01", "Two made holder versions and one paper label; ten-second timer optional.", "Remind the class a success claim needs the agreed test, not praise.", "Place the same label in both versions for the same ten-second interval. Record stands/falls and whether each folds flat. Use these observations to compare the criteria; do not make a product-safety promise.", "State what each version met and one uncertainty.", "Observe and point; tactile status tokens; dictation of test table.", "Use a safe paper test or read a clearly labelled MODEL result if no prototype exists.", "Only real tested versions support function evidence. A MODEL table supports evaluation practice, not actual product performance.", "If tests used different labels or time, repeat fairly before ranking."),
        S("Revise one fold", "AC9TDE4P03 AC9TDE4P04 AC9TDE4P05", "Earlier version, spare scrap paper, same label/test.", "Ask what exactly failed and which single fold could change it.", "Revise one fold or base width, remake safely and retest with the same label for ten seconds. Mark first and second results and whether the revision improved the chosen criterion.", "Show before/after and one next improvement.", "Fold; direct adult; use large card/tactile crease guide.", "Make a small paper revision or write a plan only, labelled honestly.", "A revised sketch is not a tested solution; observed function and criteria need an actual remake/retest.", "If the child changes several things at once, record them and try a one-change follow-up."),
        S("One data item, two displays", "AC9TDI4K03", "Fictional tokens labelled RETURN, BORROW, HOLD; paper icon/word table.", "Show RETURN as a word and as a clearly labelled arrow icon; ask what information must stay the same.", "Represent the same three fictional token states as written labels and simple symbols. Make a legend so another reader can recover the exact state; note that a colour-only symbol may be inaccessible.", "Ask a reader to decode one new symbol and repair ambiguity.", "Large-print words; raised-shape icons; AAC selections.", "Draw word/symbol pairs on paper; no device or account.", "This shows representation choices, not a live digital system or a real person's borrowing data.", "If two symbols mean the same thing, redesign one and retest with a reader."),
        S("A branch with a reason", "AC9TDI4P02", "Three fictional token cards and a two-way paper branch mat.", "Trace: IF label is RETURN, choose left; ELSE choose right. Show one counterexample.", "Run each token through the paper decision rule and say the comparison aloud or by AAC. Swap one token label and predict how the output changes. Keep the input, decision and output visible.", "Trace one RETURN and one non-RETURN case correctly.", "Move cards; speak each condition; tactile two-path mat.", "Use three paper scraps with labels; no screen.", "Unplugged tracing supports algorithm-following, not implemented visual-program evidence.", "If the branch is treated as an action order, pause at the comparison and test both cases."),
        S("Repeat without losing your place", "AC9TDI4P02", "Three numbered fictional tokens and branch rule from Day 17.", "Model 'repeat for each token' as a loop with a clear stop after the third.", "Trace the branch for tokens 1, 2 and 3 in order. Put a tally after each iteration; explain how many decisions ran and what would happen if a fourth token arrived.", "Show the loop start, repeated step and stopping condition.", "Numbered cards; tactile tally; spoken step-by-step trace.", "Repeat the paper rule for three scraps; no device.", "A drawn loop is evidence of describing/tracing an algorithm; it is not yet an implemented program.", "If a token is skipped, restart with an input counter and require one output per input."),
        S("Run a tiny visual program", "AC9TDI4P04 AC9TDI4P02", "School-approved offline [Rule Lab](../interactive/rule-lab.html) on a device if available; paper branch remains a fallback.", "Show visible IF/ELSE/REPEAT blocks and name the input token sequence before pressing Run.", "Choose a token sequence and a branch destination in the offline visual block lab. Run the program, compare output with your paper trace, then change one block and rerun. If no device, trace on paper and mark UNPLUGGED only.", "Explain how the changed block changed or did not change the output.", "Keyboard/button controls; screen reader text; adult-operated device directed by learner.", "Use paper branching at home; a device/account is not required.", "AC9TDI4P04 evidence requires actual student-controlled program run and change; unplugged tracing supports P02 only. No user data is collected.", "If output is surprising, step through one token at a time and inspect the IF comparison."),
        S("Test the user's story", "AC9TDI4P01 AC9TDI4P05", "Fictional user story: 'As a reader, I want RETURN tokens clearly separated so I can put them away.'", "Ask what success would look like for that user without using personal data.", "Define two criteria for the sorting rule, test two input sequences on paper or in offline Rule Lab if available, and compare which design satisfies the fictional user's story. State one limit of your test.", "Give a source-bound recommendation and a next test.", "Paper trace; keyboard program; AAC criteria cards.", "Use paper tokens; no account or purchase.", "Testing a program requires an actual run; paper comparison supports algorithm/design evaluation but not implemented-code performance.", "If the recommendation ignores a failed case, revise a block or criterion and test again."),
    ],
    "arts": [
        S("Dance: a near-far phrase", "AC9ADA4D01 AC9ADA4C01", "Clear approved space or small seated range; original movement cue cards, no copied cultural dance.", "Show two movements with different space levels and a safe pause.", "Create a four-count phrase meaning 'near, far, pause, return'. Use voluntary small/large movements, mobility-aid movement or a directed paper figure. Rehearse and change the use of space so the idea becomes clearer.", "Show the phrase privately if willing and name the changed element.", "Seated/standing movement; hand dance; directed figure with performance label kept separate.", "Arrange paper arrows at home; actual dancing is optional.", "A paper path evidences choreography ideas, not bodily dance practice or performance; observed safe movement supports development evidence.", "If movement is uncomfortable, reduce range and let the learner direct/compose without making a performance claim."),
        S("Dance: tempo changes meaning", "AC9ADA4C01 AC9ADA4P01", "Reuse the original four-count phrase; audience may be teacher only and opting out of showing is accepted.", "Perform the same safe phrase once slowly and once with a changed tempo, without demanding speed.", "Choose a tempo that communicates 'careful arrival' or 'excited discovery'. Rehearse and perform once for an agreed informal audience, then explain which element changed. A planning-only route remains available but is labelled PLAN.", "Audience names the perceived change; dancer can accept or revise it.", "Whole-body, seated or hand phrase; AAC rhythm cues; private teacher audience.", "Use paper-count marks or a quiet voluntary move; no recording.", "Performance code applies only to actual voluntary performance; a silent plan does not show performed dance.", "If audience misses the idea, change one pause or speed choice and try again only with consent."),
        S("Drama: a missing instruction", "AC9ADR4D01 AC9ADR4C01", "Invented scene: two fictional makers cannot find a labelled box; no personal conflict.", "Model a character's goal, obstacle and one line of dialogue with a paper puppet.", "Improvise a 30-second scene in which one character wants a box and another has only a vague instruction. Use voice, puppet movement, AAC or directed action; shape a clearer turning point by adding a precise label.", "Show or explain how the obstacle changed; keep the conflict fictional.", "Puppets; two-person improvisation by choice; AAC dialogue cards.", "Use two paper shapes as characters; no costume or partner needed.", "A written scene plan does not demonstrate improvised dramatic action; note whether action/voice/puppet enactment occurred.", "If there is no turning point, ask which single phrase could change a character's next action."),
        S("Drama: two possible endings", "AC9ADR4C01 AC9ADR4P01", "Reuse the invented box scene; informal audience may be one teacher.", "Show that a pause before a decision can create tension without shouting or physical contact.", "Devise two endings: one where the label helps and one where the character asks another question. Choose one, rehearse and perform to a consenting small audience or teacher. Explain why the ending changes the audience's view.", "Name the character choice and one performance adjustment.", "Puppet stage; seated actor; AAC/audio-free performance with gesture.", "Plan two paper endings at home; no sharing required.", "Performance code requires actual voluntary enactment; a script alone is creation evidence, not performance.", "If the audience cannot follow, add a clear opening cue or pause and try privately."),
        S("Media Arts: framing a paper object", "AC9AMA4D01", "School-approved offline device/camera and a paper object; no people, names, logos or uploads. Storyboard fallback is PLAN.", "Show how close and wide framing change which feature is prominent; avoid filming children.", "Make two still images of the same paper holder—one wide, one close—on an approved offline device. Compare what each makes salient and choose one for a fictional how-to message. If no device, draw two frames and mark PLAN.", "Show the pair or frames privately and name the changed meaning.", "Keyboard-accessible image choice; adult-operated camera directed by learner; paper storyboard.", "Use paper frames at home; no family camera or account required.", "Paper frames do not demonstrate media-technology production; actual device use and image choices are recorded only if observed under school policy.", "If the chosen image hides a needed feature, change framing and compare again."),
        S("Media Arts: sequence responsibly", "AC9AMA4C01 AC9AMA4P01", "Only school-approved offline images of paper objects or original drawn frames; private display, no posting.", "Model title → action → result as three distinct frames, each with a useful text caption.", "Arrange three frames into a short how-to for the fictional paper holder, add captions and, if an approved offline media tool is available, construct and privately share the sequence. Paper-only storyboard is a valid plan but not digital media construction.", "Explain one caption/sequence decision and check the audience's question.", "Device editing with access support; paper storyboard; AAC caption selection.", "Make a paper sequence and show nobody unless you choose; no device/purchase.", "AC9AMA4C01/P01 evidence requires actual media construction/sharing as described; no child image, voice or identifying data is captured.", "If a frame implies the wrong step, reorder it and test with a reader before private sharing."),
        S("Music: a soft sound pattern", "AC9AMU4D01 AC9AMU4C01", "Quiet paper tap or school-approved soft instrument; silent score option with performance boundary.", "Sound two original four-beat patterns softly, one with a rest; ask what the rest changes.", "Compose a four-beat pattern using tap, clap or quiet voice and at least one rest. Sound it softly if willing; then change tempo or rest position and explain the effect. A silent symbol card remains a composition idea only.", "Perform or point to the changed beat and say what it communicates.", "Soft taps; AAC beat selection with a partner sounding by consent; silent notation.", "Mark beats on paper; sound is optional and no instrument purchase is needed.", "A silent beat card does not show listening, singing or playing; record actual sounded/observed work separately.", "If the four beats are unclear, count 1–4 with a visual/tactile pulse and try a slower soft version."),
        S("Music: call and answer", "AC9AMU4C01 AC9AMU4P01", "Original 2-beat call and 2-beat answer, quiet agreed volume; no recorded song.", "Sound an invented two-beat call, pause, then answer with a contrasting rhythm.", "Create your own two-beat answer to a teacher-made call. Rehearse and sound the four-beat pair informally, or direct a willing partner by AAC. Explain whether the answer repeated or contrasted the call.", "Sound/describe the pair and one deliberate musical change.", "Tap on paper; soft voice; partner plays a child-directed AAC score.", "Use an original quiet tap pattern or make a paper score; no public performance.", "Performance code needs audible or otherwise perceptible intentional playing; a silent paper score is composition planning only.", "If answer simply copies, invite one changed rest or long beat and hear the effect."),
        S("Visual Arts: line and texture trials", "AC9AVA4D01", "Scrap paper and pencil; optional safe rubbing texture under adult approval, no cultural motif copy.", "Make one thick/short and one thin/long line; ask which draws attention first.", "Experiment with three original mark types—straight, curved, broken—plus a paper texture made by repeated marks. Compare how pressure, spacing and line direction change the look; choose a mark for a fictional card-holder label.", "Show one trial and describe the visual effect.", "Large grip pencil; tactile raised-line guide; adult scribe of child choice.", "Use any scrap paper and pencil; no kit or special pigment.", "Actual marks support experimentation; a verbal plan alone does not show material/process trial. Do not copy community-owned motifs.", "If all marks look alike, change one variable at a time and compare side by side."),
        S("Visual Arts: make and share a label", "AC9AVA4C01 AC9AVA4P01", "Original mark trials, blank paper card; sharing can be private teacher-only or declined.", "Show how line weight and empty space can guide a reader to the most important word.", "Create an original paper label for the fictional Share Shelf using your chosen line/texture treatment and a readable word. Decide where a viewer should look first, then share privately if willing and revise after one question.", "Point to the focal choice and one change made for the reader.", "Draw; tactile marks; dictate label placement to a maker.", "Make a paper label at home or just describe it; no public display required.", "Creation evidence needs an actual work or child-directed making; presentation code only when voluntarily shared/displayed, not simply finished.", "If decoration obscures the word, change scale, spacing or placement for the intended reader."),
    ],
}

LABELS = {
    "science": "Science · forces, materials and fair evidence",
    "hass": "HASS · fictional sources, perspectives and cautious conclusions",
    "hpe": "HPE · consent, inclusion and cooperative movement",
    "technologies": "Technologies · a paper holder and an offline sorting rule",
    "arts": "The Arts · two blocks in each of five art forms",
}
LICENSE = "Original SubjectNest lesson text and cards © NeuroForgeIO Pty Ltd 2026, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); credit, link and indicate changes. Curriculum wording keeps separate ACARA terms."


def render(subject: str) -> dict[str, str]:
    cards = CARDS[subject]
    if len(cards) != 10:
        raise ValueError(f"{subject}: expected ten cards")
    teacher = [
        f"# Year 4 {LABELS[subject]} · optional teacher blocks", "",
        "**Ten distinct 12-minute Days 11–20 blocks.** Choose what fits the school timetable; these are optional short sessions, not a full allocation. Every block uses **2 minutes notice + 7 minutes try/make + 3 minutes show**. Read the preparation and evidence boundary first. Give children only the [clean learner cards](LEARNER.md), keeping the [staff evidence/next moves](ASSESSMENT.md) private. [Original shared source cards](../MATERIALS.md) and [A4/text/tactile aid](../print/TEXT-ALTERNATIVES.md) are optional. A plan, invented record or paper score is not automatically an observed investigation, movement, digital program or performance. Record source/action, child choice, access support and the next move.", "",
    ]
    learner = [
        f"# Year 4 {LABELS[subject]} · learner choices", "",
        "Pick the response route that helps you show your own idea: speak, sign, use AAC, point, draw, move a paper piece, make, type or direct a trusted adult where the task allows. You may work quietly or pass on public movement, sound, filming and sharing. The teacher will say when a card is **REAL**, **MODEL**, **PLAN**, or an actual **PERFORMANCE/PROGRAM RUN**. Keep that label with your work. These activities do not ask for private home, health, identity or access information. [Original source cards](../MATERIALS.md) and [text/tactile aid](../print/TEXT-ALTERNATIVES.md) are available; nothing must be bought.", "",
    ]
    assessment = [
        f"# Teacher copy · Year 4 {LABELS[subject]} evidence and next moves", "",
        "This is a formative observation guide, **not** an achievement-standard decision. Record exact action/phrase, whether it was REAL, MODEL, PLAN, PERFORMANCE or a program run, access mode and prompts. A missing response may mean the route or time failed: mark **not yet observed**, adapt and sample again. Keep child work in school-approved private systems. A correctly labelled fictional card is useful reasoning evidence; it cannot prove a real place, tested material, bodily movement, sounded music, media production or digital implementation that did not occur.", "",
        "| Day | What can count in this block, and its limit | Immediate next move |", "| ---: | --- | --- |",
    ]
    for day, card in enumerate(cards, 11):
        teacher += [
            f"## Day {day} — {card.title}", "",
            f"**Codes:** {', '.join(f'`{code}`' for code in card.codes.split())}. **Prepare:** {card.prepare}", "",
            f"1. **Notice · 2 min.** {card.notice}",
            f"2. **Try/make · 7 min.** {card.task}",
            f"3. **Show · 3 min.** {card.show}", "",
            f"**Learner choices:** {card.choices}", "",
            f"**No-purchase home/low-material route:** {card.home}", "",
            f"**Evidence boundary:** {card.evidence}", "",
            f"**Next teaching move:** {card.next_}", "",
        ]
        learner += [
            f"## Day {day} — {card.title}", "", card.task, "",
            f"**Choose a route:** {card.choices}", "",
            f"**Show:** {card.show}", "",
            f"**Home/low-material:** {card.home}", "",
        ]
        assessment.append(f"| {day} | {card.evidence.replace('|', '\\|')} | {card.next_.replace('|', '\\|')} |")
    teacher += [LICENSE, ""]
    learner += [LICENSE, ""]
    assessment += ["", "**Boundaries to revisit:** The national code crosswalk is partial; see [source and rights ledger](../SOURCES-AND-REVIEW.md). Actual Year 4 curriculum decisions, safety approvals, access routes and any real-world investigation belong to the school and relevant local authorities.", "", LICENSE, ""]
    return {
        "TEACHER.md": "\n".join(teacher),
        "LEARNER.md": "\n".join(learner),
        "ASSESSMENT.md": "\n".join(assessment),
    }


def main() -> None:
    parser = argparse.ArgumentParser()
    parser.add_argument("--write", action="store_true", help="write all generated teacher, learner and evidence pages")
    args = parser.parse_args()
    for subject in CARDS:
        for filename, expected in render(subject).items():
            path = ROOT / subject / filename
            if args.write:
                path.parent.mkdir(parents=True, exist_ok=True)
                path.write_text(expected, encoding="utf-8")
            elif path.read_text(encoding="utf-8") != expected:
                raise AssertionError(f"Generated content drift: {path}")
    print(f"PASS: {len(CARDS)} menus · {sum(len(v) for v in CARDS.values())} authored blocks · 15 teacher/learner/staff pages")


if __name__ == "__main__":
    main()
