|
| 1 | +# Content Generation Guidelines — Beginning Python |
| 2 | + |
| 3 | +This file defines rules for generating student-facing content in this course. |
| 4 | +All AI agents and human authors creating lessons, labs, quizzes, or other |
| 5 | +student-facing pages must follow these guidelines. Instructor-facing content |
| 6 | +(teacher's guide, course description) does not need to use the mascot. |
| 7 | + |
| 8 | +--- |
| 9 | + |
| 10 | +## Learning Mascot: Monty the Python |
| 11 | + |
| 12 | +### Mascot File Index |
| 13 | + |
| 14 | +The canonical files for this mascot. When editing any of these, update the |
| 15 | +others in the same turn so they stay in sync. |
| 16 | + |
| 17 | +| File | Purpose | |
| 18 | +|------|---------| |
| 19 | +| [`docs/img/mascot/neutral.png`](docs/img/mascot/neutral.png) | Default / general-purpose pose | |
| 20 | +| [`docs/img/mascot/welcome.png`](docs/img/mascot/welcome.png) | Chapter-opening pose | |
| 21 | +| [`docs/img/mascot/thinking.png`](docs/img/mascot/thinking.png) | Key-concept pose | |
| 22 | +| [`docs/img/mascot/tip.png`](docs/img/mascot/tip.png) | Hint / helpful-guidance pose | |
| 23 | +| [`docs/img/mascot/warning.png`](docs/img/mascot/warning.png) | Common-mistake / pitfall pose | |
| 24 | +| [`docs/img/mascot/encouraging.png`](docs/img/mascot/encouraging.png) | Difficult-content / struggle pose | |
| 25 | +| [`docs/img/mascot/celebration.png`](docs/img/mascot/celebration.png) | End-of-chapter / achievement pose | |
| 26 | +| [`docs/css/mascot.css`](docs/css/mascot.css) | Custom admonition styles for the seven pose contexts | |
| 27 | +| [`docs/learning-graph/mascot-test.md`](docs/learning-graph/mascot-test.md) | Rendering test page that exercises every admonition style | |
| 28 | + |
| 29 | +### Character Overview |
| 30 | + |
| 31 | +- **Name**: Monty |
| 32 | +- **Species**: Python snake |
| 33 | +- **Personality**: Curious, encouraging, patient, playful, never sarcastic or intimidating |
| 34 | +- **Catchphrase**: "Let's code it together!" |
| 35 | +- **Visual**: Friendly cartoon python with bright emerald-green scales, oversized round wire-rim |
| 36 | + glasses, large sparkling blue-green eyes, two small expressive arms, and a curling tail. |
| 37 | + Flat vector style, transparent background, consistent across all poses. |
| 38 | + |
| 39 | +### Voice Characteristics |
| 40 | + |
| 41 | +- Uses simple, encouraging language appropriate for ages 10–14 |
| 42 | +- Celebrates small wins — never dismisses a question as "easy" |
| 43 | +- Refers to students as "coders" or "programmers" |
| 44 | +- Occasionally uses Python puns ("Let's uncoil this problem!", "I've got a hiss-tory of coding!") |
| 45 | +- Never uses jargon without defining it first |
| 46 | +- Signature phrases: "Let's code it together!", "You've got this!", "Great question!" |
| 47 | + |
| 48 | +### Mascot Admonition Format |
| 49 | + |
| 50 | +**Always** place mascot images in the admonition body, never in the title bar. |
| 51 | +Use the Markdown image syntax with the `mascot-admonition-img` class: |
| 52 | + |
| 53 | +```markdown |
| 54 | +!!! mascot-welcome "Welcome to This Lesson!" |
| 55 | + { class="mascot-admonition-img" } |
| 56 | + Admonition text goes here after the image. Keep it to 1–3 sentences. |
| 57 | +``` |
| 58 | + |
| 59 | +**Image path depth:** The path `../../img/mascot/` is correct for pages two |
| 60 | +directories deep (e.g., `skulpt/02-simple-square/` or `trinket/04-loops/`). |
| 61 | +For pages at the root of `docs/`, use `img/mascot/`. |
| 62 | +For pages one level deep (e.g., `docs/strategy/index.md`), use `../img/mascot/`. |
| 63 | + |
| 64 | +### Placement Rules |
| 65 | + |
| 66 | +| Context | Admonition Type | Image | Frequency | |
| 67 | +|---------|----------------|-------|-----------| |
| 68 | +| Lesson opening | `mascot-welcome` | `welcome.png` | Once per lesson — always first | |
| 69 | +| Key concept or insight | `mascot-thinking` | `thinking.png` | 1–2 per lesson | |
| 70 | +| Helpful hint or shortcut | `mascot-tip` | `tip.png` | As needed | |
| 71 | +| Common mistake / pitfall | `mascot-warning` | `warning.png` | As needed | |
| 72 | +| Difficult content | `mascot-encourage` | `encouraging.png` | Where students may struggle | |
| 73 | +| End of lesson / experiments | `mascot-celebration` | `celebration.png` | Once per lesson — always last | |
| 74 | +| General sidebar | `mascot-neutral` | `neutral.png` | As needed | |
| 75 | + |
| 76 | +### Hard Limits |
| 77 | + |
| 78 | +- **Maximum 6 mascot admonitions per lesson** — more than this interrupts reading flow |
| 79 | +- **No back-to-back mascot admonitions** — always separate with at least one paragraph of content |
| 80 | +- **One `mascot-welcome` maximum per lesson** — always at the very start |
| 81 | +- **One `mascot-celebration` maximum per lesson** — always at the very end |
| 82 | +- Do not use mascot admonitions purely for decoration — every use must add instructional value |
| 83 | + |
| 84 | +### Do's and Don'ts |
| 85 | + |
| 86 | +**Do:** |
| 87 | +- Use Monty to introduce new topics warmly at the start of every lesson |
| 88 | +- Include the catchphrase "Let's code it together!" in welcome admonitions |
| 89 | +- Keep dialogue brief (1–3 sentences maximum) |
| 90 | +- Match the pose image to the content type (tip pose for tips, warning pose for warnings) |
| 91 | +- Write in Monty's encouraging, kid-friendly voice |
| 92 | + |
| 93 | +**Don't:** |
| 94 | +- Use Monty more than 6 times in a single lesson |
| 95 | +- Put mascot admonitions back-to-back without intervening content |
| 96 | +- Change Monty's personality or make him sound sarcastic or intimidating |
| 97 | +- Use `<img>` HTML tags — always use Markdown image syntax with `{ class="mascot-admonition-img" }` |
| 98 | +- Place images in the admonition title bar |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## Skulpt Lab Format |
| 103 | + |
| 104 | +All Skulpt interactive labs share a common structure. When generating a new |
| 105 | +Skulpt lab page, follow this template exactly: |
| 106 | + |
| 107 | +### Page Structure |
| 108 | + |
| 109 | +```markdown |
| 110 | +# Lesson Title |
| 111 | + |
| 112 | +Brief intro paragraph (1–2 sentences about what the lesson covers). |
| 113 | + |
| 114 | +!!! mascot-welcome "Welcome to This Lesson!" |
| 115 | + { class="mascot-admonition-img" } |
| 116 | + 1–3 sentences from Monty introducing the lesson in his encouraging voice. |
| 117 | + |
| 118 | +## Sample Code |
| 119 | + |
| 120 | +[fenced code block with Python] |
| 121 | + |
| 122 | +## Try It Now |
| 123 | + |
| 124 | +Edit the code below and click **Run** to see the result right on this page. |
| 125 | +No account needed — everything runs in your browser. |
| 126 | + |
| 127 | +[Skulpt lab HTML block — see below] |
| 128 | + |
| 129 | +## How It Works |
| 130 | + |
| 131 | +Explanation of the key concepts in the code. |
| 132 | + |
| 133 | +[optional mascot-thinking or mascot-tip admonition here] |
| 134 | + |
| 135 | +## Explanation Table |
| 136 | + |
| 137 | +| Line | What it does | |
| 138 | +|------|-------------| |
| 139 | +| ... | ... | |
| 140 | + |
| 141 | +[optional mascot-warning admonition if there are common mistakes] |
| 142 | + |
| 143 | +## Experiments |
| 144 | + |
| 145 | +1–5 numbered experiments for students to try. |
| 146 | + |
| 147 | +!!! mascot-celebration "Great Work!" |
| 148 | + { class="mascot-admonition-img" } |
| 149 | + Congratulations! You've completed this lesson. Try the experiments above to go further! |
| 150 | +``` |
| 151 | + |
| 152 | +### Skulpt HTML Block |
| 153 | + |
| 154 | +Every Skulpt lab uses this exact HTML block. The CDN scripts load Skulpt; |
| 155 | +`skulpt.js` (via `extra_javascript`) and `skulpt.css` (via `extra_css`) |
| 156 | +provide the shared functions and styles. |
| 157 | + |
| 158 | +```html |
| 159 | +<script src="https://skulpt.org/js/skulpt.min.js"></script> |
| 160 | +<script src="https://skulpt.org/js/skulpt-stdlib.js"></script> |
| 161 | + |
| 162 | +<div id="skulpt-lab"> |
| 163 | + <div id="editor-container"> |
| 164 | + <textarea id="code" spellcheck="false">PYTHON CODE HERE |
| 165 | +</textarea> |
| 166 | + <div id="button-row"> |
| 167 | + <button id="run-btn" onclick="runSkulpt()">▶ Run</button> |
| 168 | + <button id="reset-btn" onclick="resetSkulpt()">↻ Reset</button> |
| 169 | + </div> |
| 170 | + <pre id="output"></pre> |
| 171 | + </div> |
| 172 | + <div id="canvas-container"> |
| 173 | + <div id="turtle-target"></div> |
| 174 | + </div> |
| 175 | +</div> |
| 176 | +``` |
| 177 | + |
| 178 | +**Rules:** |
| 179 | +- The Python code inside `<textarea>` must match the Sample Code block exactly |
| 180 | +- Do not add inline `<style>` or `<script>` tags — all CSS/JS is centralized |
| 181 | +- The element IDs (`skulpt-lab`, `editor-container`, `code`, `button-row`, |
| 182 | + `run-btn`, `reset-btn`, `output`, `canvas-container`, `turtle-target`) must |
| 183 | + not be changed — `skulpt.js` depends on them |
| 184 | + |
| 185 | +--- |
| 186 | + |
| 187 | +## General Writing Style |
| 188 | + |
| 189 | +- **Audience**: Kids ages 10–14, just after learning Scratch |
| 190 | +- **Tone**: Friendly, encouraging, never condescending |
| 191 | +- **Sentences**: Short and clear — aim for a 6th-grade reading level |
| 192 | +- **Code comments**: Use `#` comments in Python code to explain non-obvious lines |
| 193 | +- **Experiments section**: Every lesson must end with 3–5 open-ended experiments |
| 194 | + that invite students to modify the code and explore |
| 195 | +- **No external links to Trinket** in new Skulpt lessons — these labs are self-contained |
0 commit comments