This guide documents conventions and the active plan so contributors can add content safely and consistently to this MkDocs textbook.
CRITICAL: Length Management for AI Contributors
Before writing any substantial content, AI contributors MUST:
-
Estimate content length based on learning objectives and code examples required
-
Check if content will exceed reasonable response limits (typically ~8000-10000 lines for comprehensive sections)
-
If content will be large, inform the user BEFORE starting and propose breaking into multiple manageable chunks
-
Plan chunk boundaries logically (e.g., by major topics, not arbitrary cuts)
-
Update todo lists to reflect multi-part approach
Example planning approach:
-
Section covering 5 major topics with extensive code examples = likely needs 3-4 parts
-
Simple section with 2-3 concepts = can likely be done in one response
-
Always err on the side of caution and ask user to confirm multi-part approach
This prevents hitting length limits mid-creation and ensures consistent, complete content delivery.
Before running Python code, contributors should activate the project virtual environment with .venv\Scripts\activate.
The repository uses uv for environment and dependency management where applicable.
Links are used across the textbook to reduce duplic## Diagrams (PlantUML)
- Each Section includes
index.mdandquiz.md. Place images/code alongside or inassets/.
- Important: In class diagrams, escape double underscores in method names (e.g.,
\_\_init\_\_instead of__init__) as underscores interfere with Markdown formatting.
Example:
@startuml
skinparam monochrome true
skinparam shadowing false
class Student {
- name: string
- student_id: string
+ \_\_init\_\_(name, student_id)
+ get_average(): float
}
actor Student
participant "Textbook Site" as Site
Student -> Site: Open Section
Site --> Student: Rendered page
@enduml
Links are used across the textbook to reduce duplication and maintain a single source of truth for terms and concepts.
Pages should be clear and concise and focus on a single learning goal. It should be specific on topics and go in depth into areas for students.
Examples should be progressive: begin with REPL-sized snippets, grow to small scripts, and avoid heavy frameworks for introductory material.
The project maintains a consistent writing style: third-person neutral voice, plain language, and Australian spelling are preferred.
Accessibility considerations: provide alt text for images and diagrams, avoid conveying meaning using colour alone, and maintain high contrast.
Cross-linking is recommended so that each new term points to its first introduction or the glossary.
Quizzes belong in a separate quiz.md adjacent to each section’s index.md. The Markdown-only quiz pattern from docs/demo/quiz-demo.md is preferred.
Traditional admonitions (using !!!) should be used for:
-
Quiz containers:
!!! quiz "Title" -
Important warnings or notes that should always be visible
-
Key concepts that require immediate attention
Details blocks (using ///) should be used for:
-
Exercise solutions that can be expanded/collapsed
-
Optional deep-dive content
-
Extended examples or explanations
-
Any content that benefits from being collapsible
H4 headings (####) are not allowed - use details blocks with /// syntax instead for collapsible content sections.
Exercise and solution pattern:
/// details | Exercise 1: Problem Analysis
type: question
open: false
**Scenario**: A local coffee shop wants to calculate daily revenue.
**Task**: Complete the problem identification phase.
1. Identify the primary stakeholders
2. Define the core problem statement
/// details | Sample Solution
type: success
open: false
**Primary stakeholders**: Coffee shop owner, employees, accountant
**Problem statement**: The coffee shop lacks an automated system...
///
///
A curated set of pymdownx extensions is enabled in mkdocs.yml to improve readability and interactivity. Usage should remain conservative and accessible.
Guidelines and common patterns:
-
Tabs: Use the
/// tab | Titlesyntax for alternate views (for example, pseudocode, Python, or a worked example). Each tab is a separate collapsible block that can be expanded independently.Example (correct syntax):
/// tab | Python ```py print('hello')
///
/// tab | Pseudocode
OUTPUT "hello"///
Notes:
-
Tab labels should be brief and descriptive (for example, "Python", "Pseudocode", "Explanation").
-
Limit tab sets to 3–4 items to preserve discoverability.
-
The first tab should present the most common or simplest representation for accessibility.
-
detailsblocks are suitable for extended answers or worked solutions that readers may expand.
-
-
Collapsible/Details:
pymdownx.blocks.detailsis appropriate for optional deeper reading or extended worked solutions. Use the new details syntax instead of traditional admonitions for collapsible content:/// details | Summary title type: note open: false attrs: {class: class-name, id: id-name} Content goes here ///Available types:
note,warning,info,success,question,failure,danger,bug,example,quote,tipUse
open: trueto show content by default,open: falseto keep collapsed.For exercise solutions, prefer
type: successwith descriptive summaries. -
Superfences:
pymdownx.superfenceshandles fenced blocks such as PlantUML, shell, and multi-language examples. Explicit language labels (for example,plantuml,sh,py) improve rendering and tooling. -
Task lists:
pymdownx.tasklistcan be used for interactive checklists in exercise instructions. Quizzes should remain in the dedicated quiz pattern rather than using tasklists for grading. -
Inline highlights, keys and marks:
-
pymdownx.inlinehiliteenables inline emphasis without colour reliance; use sparingly. -
pymdownx.keysis useful for keyboard shortcuts (for example,Ctrl+S). -
pymdownx.markhighlights brief important terms; prefer this over bolding long passages.
-
-
Snippets:
pymdownx.snippetscan include shared examples or notes fromdocs/_snippets/to avoid duplication. -
Emoji:
pymdownx.emojiis available for small visual cues; however, emoji should not be the sole carrier of meaning.
Accessibility rules:
-
Do not rely on colour alone for meaning when using tab, mark, or inlinehilite.
-
Ensure collapsible content is discoverable from headings and summaries.
-
Keep tab labels explicit and keyboard-friendly.
When a new pymdownx-powered pattern is added, a one-line example and rationale should be recorded here to explain why it benefits the learning flow.
-
Syllabus outcomes should not appear inside Chapter or Section headings. Outcomes belong in Module or Chapter overview documents.
-
IMPORTANT: Do not add "Outcomes: SE-XX-XX" lines to individual section files. This information belongs in module plans and chapter overviews only.
-
Cross-references: Include pointers to related sections using phrases like "See also [section reference]" or "This builds on [concept] from [section]". Help students connect concepts across the module.
-
Header structure in
index.mdfiles follows this preferred pattern:-
H1: Section title (short and numbered, for example "1.1 Software development steps")
-
H2: Why it matters
-
H2: Concepts
-
H3: Concept name (short)
-
H3: Guided example
-
-
H2: Try it (or an alternative activity label appropriate to the audience)
- Note: For introductory sections where coding is deferred, prefer the activity heading
Practiceinstead ofTry it.
- Note: For introductory sections where coding is deferred, prefer the activity heading
-
H2: Recap
-
-
Content organisation should leverage
pymdownxpatterns where appropriate:-
/// tab | Titlefor alternate views such as code vs pseudocode -
detailsfor optional deep dives and worked solutions -
tasklistfor guided tasks -
superfencesfor PlantUML, shell, and multi-language fences
-
-
Paragraphs should be short (1–3 sentences). Lists must be indented using spaces rather than tabs.
Formatting example (in index.md):
## 1.1 Software development steps
## Why it matters
Short 2–3 sentence justification.
## Concepts
### The steps (brief)
Content here.
### Guided example
/// tab | Python
```py
print('tiny example')
```
///
/// tab | Pseudocode
```
OUTPUT "tiny example"
```
///
## Try it
- [ ] Small task 1
- [ ] Small task 2
## Recap
Short summary.
-
Quizzes are placed in a co-located
quiz.mdfile next toindex.md. Raw HTML is not required. -
Questions are authored with plain lists and the attr_list marker
{ data-correct }on the correct option. Example:!!! quiz "Check your understanding"
-
A good specification describes…
-
implementation details
-
clear, testable requirements { data-correct }
-
UI styling
-
deployment scripts
-
-
-
IMPORTANT: Do NOT use HTML divs, scripts, or complex structures. Stick to the Markdown-only format above.
-
Format rules:
-
Use
!!! quiz "Title"for the quiz container -
Use numbered lists (1., 2., etc.) for questions
-
Use bulleted lists (- option text) for answer choices
-
Mark correct answers with
{ data-correct }at the end of the option text -
No HTML tags, no
<div>, no<script>, no complex structures
-
Rules and tips:
-
Options must be direct child
lielements under the question's nestedulorol(no extra wrappers). -
Use one
quiz.mdper section. Keep quizzes to 3–8 questions. -
Avoid blockquote authoring for quizzes — use the admonition-style
!!! quizor the attr_list class{ .quiz }as indocs/demo/quiz-demo.md. -
Prefer spaces over tabs in Markdown lists so the renderer produces the correct
ul > listructure. -
The site includes
assets/quiz.jswhich:-
converts
{ data-correct }markers into attributes, -
injects Check/Reset/Score controls when missing,
-
supports keyboard (Space/Enter) and mouse selection,
-
grades by matching selected options to the marked correct options.
-
Behaviour notes:
-
Score is initialised to
0/N(N = question count) before grading. -
A question is marked correct only when all and only the correct options are selected.
Debugging and troubleshooting
If answers appear as "Try again" even when highlighted:
-
Hard-refresh the page (Ctrl+F5) to ensure latest
quiz.jsloads. -
Open the browser Console and set
window.__quiz_debug = trueto see debug logs (orfalseto silence). -
After selecting answers, paste the following snippet into the Console and send the output when asking for help (it shows which
lihas thedata-correctattribute and whether it is selected):
const container = document.querySelector('.admonition.quiz');
const qs = container.querySelectorAll('[data-question]');
qs.forEach((q, qi) => {
console.log('Q', qi, q.querySelector('p')?.textContent.trim());
const opts = Array.from(q.querySelectorAll('ul > li'));
opts.forEach((li, i) => console.log(i, {
text: li.textContent.trim().replace(/\s+/g,' '),
hasDataCorrectAttr: li.hasAttribute('data-correct'),
datasetCorrect: li.dataset && Object.prototype.hasOwnProperty.call(li.dataset,'correct') ? li.dataset.correct : undefined,
innerHTML: li.innerHTML.trim(),
classList: Array.from(li.classList)
}));
});To temporarily enable verbose logs in the page Console:
window.__quiz_debug = true; // or false to silence
location.reload();If you need me to debug, paste the Console output showing quiz:marker, quiz:toggle, quiz:question state and quiz:grade result lines.
Diagrams: include the PlantUML source fence above any generated SVG. Prefer one concept per diagram.
File hygiene: build artefacts should not be committed (for example, site/, __pycache__/, .obsidian/, .vscode/).
Navigation: docs/.nav.yml is the single source of truth for navigation; avoid adding nav: to mkdocs.yml.
Navigation conventions: module overviews should live at docs/YearYY/ModuleName/index.md. Do not use bracketed labels such as "(Overview)" in titles or nav labels.
Local development: uv or editable installs are the recommended flow. A typical sequence is:
- Activate the virtual environment:
.venv\\Scripts\\activate - Install dependencies in editable mode:
uv pip install -e .(orpip install -e .) - Serve locally:
mkdocs serve
Linting: Markdown headings should be sequential. Lines should be reasonably short (~100 characters). Run scripts/simple_md_lint.py before commits.
Names: chapter and section numbers are zero‑padded (for example, Chapter-03, Section-07-...). H1 titles should use numbered labels such as “1.2 …”.
Content updates: when a new concept is added, include at least one small runnable Python snippet and a 2–3 line "Why it matters" explanation.
Create a NSW HSC Software Engineering textbook for Years 11–12. Audience is beginners; code is Python only. Content hierarchy: Year → Module → Chapter → Section. Each Section has a co-located quiz.
-
Beginner-first. Introduce one idea at a time; use tiny runnable examples.
-
Python only. Avoid external packages unless essential and introduced gently.
-
Mechatronics: defer device-specific coding until a platform is chosen; prefer simulations and diagrams first.
-
Diagrams: use PlantUML for all new diagrams. Keep Mermaid only for legacy content until migrated. Keep diagrams simple and not crazy complicated to ensure that the concepts are easily understood.
-
Titles: short and numbered (e.g., 2.3). Display names avoid dashes and never use “Part” prefixes.
Content must align with the module plan terminology and the syllabus outcome labels. Use the exact terms from docs/Year11/ProgrammingFundamentals/ModulePlan.md when naming headings and listing learning points so readers and teachers can map content back to outcomes easily.
Rules:
-
Use the SDLC vocabulary where applicable: requirements, specifications, design, development/implementation, testing/debugging, integration, installation, maintenance.
-
Use
Practiceas the activity heading for learner tasks unless a coding task is explicitly required, in which case label the activityTry itand indicate the required language (e.g., "Try it — Python"). -
Where the ModulePlan specifies an Outcome (e.g.,
Outcomes: SE-11-01) include that line near the top of the section'sindex.md. -
Prefer concise lists of bullet learning points that mirror the ModulePlan phrasing.
Example (map for Section 1.1):
-
Outcomes: SE-11-01
-
Learn: requirements, specifications, design, development/implementation, testing/debugging, integration, installation, maintenance.
-
Practice: map a simple "Grade Calculator" through each step.
-
Diagram: PlantUML activity diagram of SDLC.
Following this pattern keeps content consistent with teaching goals and assessment mapping.
docs/
Year11/
ProgrammingFundamentals/
ModulePlan.md
Chapter-01-Software-Development/
Section-01-Software-Development-Steps/
index.md
quiz.md
Section-02-Tools-and-Collaboration/
index.md
quiz.md
Section-03-Documentation-and-Code-Style/
index.md
quiz.md
Section-04-Project-Management-Models/
index.md
quiz.md
Chapter-02-Designing-Algorithms/
Chapter-03-Data-for-Software-Engineering/
Chapter-04-Developing-Solutions-with-Code/
Conventions:
-
Chapters:
Chapter-XX-Name(zero-padded). -
Sections:
Section-YY-Short-Slug(zero-padded) under a Chapter. -
Each Section includes
index.mdandquiz.md. Place images/code alongside or inassets/.
- Prefer fenced PlantUML blocks. If rendering isn’t enabled yet, include a static SVG and keep the source fence for later.
Example:
@startuml
skinparam monochrome true
skinparam shadowing false
actor Student
participant "Textbook Site" as Site
Student -> Site: Open Section
Site --> Student: Rendered page
@enduml
-
Title (H1): succinct, action-oriented.
-
Outcomes covered: e.g., SE-11-02.
-
Why it matters (2–3 sentences).
-
Concepts (progressive mini-sections).
-
Guided example (short Python).
-
Try it (1–3 tiny tasks).
-
Diagram(s) (PlantUML or SVG fallback).
-
Recap and glossary (if needed).
Quiz (quiz.md): 3–8 questions (mix of multiple-choice and short-answer). Mark correct choices with { data-correct } and use grade/reset buttons with data-quiz-action.
Use a single admonition block for the entire quiz:
## Section Title - Quiz
!!! quiz "Check your understanding"
1. Question text here?
- Option A
- Option B { data-correct }
- Option C
2. Another question?
- First choice
- Second choice { data-correct }
- Third choice
Indentation Rules:
-
Question numbers (1., 2., etc.) start at the beginning of the line
-
Options are indented with 4 spaces (each starts with
-) -
Code blocks within questions must be indented to align with the question content
-
Correct answers are marked with
{ data-correct }at the end of the option line
- Use
.nav.ymlto add pages once they exist. Keep labels human‑readable; no bracketed suffixes like "(Overview)".
-
Programming Fundamentals Chapter 2 must explicitly include: I/O and purpose; desk and peer checking; connections to subroutines/functions; identifying procedures/functions; and a brief paradigms overview.
-
Programming Fundamentals Chapter 4 must explicitly include: arrays (1-D/2-D), lists, trees, stacks, hash tables; debugging tools (breakpoints, stepping, watches, function interfaces, debug prints, IDE tools); test data (boundary, path coverage, faulty/abnormal); and typical errors (syntax, logic, runtime).