# Labbit Authoring Guide Labbit reads one XML file that defines a lab, quiz, or combined lab-and-quiz workspace. This guide is the canonical specification for generating valid Labbit XML. ## Core Model A Labbit file is XML with Markdown content inside text-bearing elements. Structural Labbit tags are XML elements; prose, lists, tables, code blocks, diagrams, hints, solutions, collapses, and quiz prompt or explanation content can be composed freely wherever the component is allowed. CDATA is not a Labbit component. CDATA is only an XML mechanism for placing Markdown, code, SVG, or base64 text inside an element without escaping every `<`, `>`, and `&`. Labbit components such as ``, ``, ``, and `` must remain real XML tags outside CDATA. Text and visible components can be interleaved: ````xml Read the unit status before changing anything. Service state flow inactive active ]]> Then capture the command output and explain the current state. Focus on `Loaded`, `Active`, and recent log lines. Use `systemctl status`. ```` ## File Structure Use exactly one `` root element. The root must contain one ``. It may also contain one ``, one ``, or both. ````xml # Linux Services Exam Practice service setup, validation, and troubleshooting. Install Samba and make it start at boot. Requirements: - install the required packages - start the service immediately - enable the service for reboot Use the `samba` package and the `smb` service. Which daemon provides SMB file sharing? The `smb` service provides SMB file sharing. ```` Required root content: - `` - `...` Optional root attributes: - `slug="..."`: stable URL slug; use lowercase kebab-case. - `accent="#RRGGBB"`: custom accent color. - `accent="DEFAULT"` or missing: use the default accent. Optional root sections: - ``: contains lab topics and tasks. - ``: contains quiz topics and questions. IDs: - Use stable lowercase kebab-case IDs for `topic`, `task`, `question`, and `option`. - IDs should be unique within their natural scope. - If an ID is omitted, Labbit derives one from the title or surrounding content, but generated files should provide explicit stable IDs. ## Components => `` > The root element for one Labbit document. - Required. - Must wrap the entire file. - Requires a non-empty `title` attribute. - May include `slug` and `accent` attributes. - Must contain one ``. - May contain ``, ``, or both. => `` > The introductory content shown before lab tasks and quiz questions. - Required. - May contain Markdown. - May contain ``, ``, ``, and ``. - Should describe the document scope, prerequisites, context, or orientation material. => `` > The optional section that groups hands-on tasks. - Optional. - Contains one or more lab `` elements when present. - Does not directly contain tasks; tasks belong inside lab topics. => `` > A named group of lab tasks or quiz questions. - Required inside `` and `` when those sections are present. - Requires a meaningful `title`. - Should include a stable `id`. - Inside ``, contains one or more `` elements. - Inside ``, contains one or more `` elements. => `` > One hands-on lab task, including visible prompt content and optional revealable help. - Required inside lab topics. - Requires a meaningful `title`. - Should include a stable `id`. - The visible task body may contain Markdown, ``, ``, ``, ``, and ``. - May contain one ``. - May contain any number of `` elements. - `` elements appear in the visible task flow as reveal controls; their bodies are hidden until revealed. - `` is hidden from the visible task body and is shown through the task solution control. - Do not use the legacy `` tag; it is not supported. => `` > Hidden inline help that is anchored at its exact position in a task. - Optional inside ``. - Requires a `title`; if omitted, Labbit falls back to a generic title. - May include a stable `id`. - May contain Markdown. - May contain ``, ``, ``, and ``. - Use as an inline revealable component within the task sequence. => `` > Hidden task-level solution content. - Optional inside ``. - A task may have no solution or one solution. - May contain Markdown. - May contain ``, ``, ``, and ``. - Represents the task's complete revealable solution block. - Is not part of the visible prompt flow. => `` > The optional section that groups questions. - Optional. - Contains one or more quiz `` elements when present. - Does not directly contain questions; questions belong inside quiz topics. => `` > One quiz question. - Required inside quiz topics. - Should include a stable `id`. - Must contain one ``. - Must contain at least two `