|
| 1 | +--- |
| 2 | +name: tutorial-authoring |
| 3 | +description: Use when creating or revising step-by-step tutorials in `docs/tutorials/`. This skill applies Lambda's required metadata, instructional structure, tone, code-snippet rules, and validation expectations for tutorial documents. |
| 4 | +--- |
| 5 | + |
| 6 | +# Tutorial Authoring |
| 7 | + |
| 8 | +Use this skill for tutorial documents that teach a discrete task in the |
| 9 | +repository. It includes the long-lived documentation rules that tutorials |
| 10 | +inherit, plus the additional section and narrative requirements specific to |
| 11 | +`docs/tutorials/`. |
| 12 | + |
| 13 | +## When To Use |
| 14 | + |
| 15 | +- New tutorials in `docs/tutorials/`. |
| 16 | +- Revisions to existing tutorials that change structure, examples, or prose. |
| 17 | +- Documentation tasks that teach a step-by-step workflow with validation and |
| 18 | + exercises. |
| 19 | +- Do not use this skill for generic guides, specs, or roadmaps outside |
| 20 | + `docs/tutorials/`. |
| 21 | + |
| 22 | +## Workflow |
| 23 | + |
| 24 | +1. Place the file correctly. |
| 25 | + Tutorials belong in `docs/tutorials/` and should use kebab-case file names. |
| 26 | + Include the `tutorial` tag in the metadata. |
| 27 | +2. Add the required metadata header. |
| 28 | + Tutorials use the same YAML front matter fields as other long-lived docs: |
| 29 | + `title`, `document_id`, `status`, `created`, `last_updated`, `version`, |
| 30 | + `engine_workspace_version`, `wgpu_version`, `shader_backend_default`, |
| 31 | + `winit_version`, `repo_commit`, `owners`, `reviewers`, and `tags`. |
| 32 | +3. Build the required section layout. |
| 33 | + Tutorials should include a table of contents and these sections: |
| 34 | + `Goals`, `Overview`, `Prerequisites`, `Implementation Steps`, |
| 35 | + `Validation`, `Notes`, `Conclusion`, `Exercises`, and `Changelog`. |
| 36 | +4. Write each implementation step as instruction plus outcome. |
| 37 | + Explain intent and rationale before each code block. After each code block, |
| 38 | + include a short paragraph describing the resulting state and why it matters. |
| 39 | +5. Keep the instructional tone precise. |
| 40 | + Use a book-like instructional narrative while staying professional and |
| 41 | + direct. Imperative phrasing is preferred. Limited second-person phrasing is |
| 42 | + acceptable when it clearly improves the instruction. |
| 43 | +6. Keep terminology and examples consistent. |
| 44 | + Define acronyms on first use, use terms such as `GPU`, `CPU`, `wgpu`, |
| 45 | + `bind group`, and `pipeline layout` consistently, and refer to identifiers |
| 46 | + with backticks. |
| 47 | +7. Keep code snippets minimal and repository-aligned. |
| 48 | + Match repository style: 2-space indentation, line width near 80 columns, |
| 49 | + explicit return statements, and no abbreviations or acronyms in code |
| 50 | + identifiers. Prefer workspace-relative file paths in prose and examples. |
| 51 | +8. Update maintenance metadata on substantive edits. |
| 52 | + Update `last_updated`, bump `version` semantically, set `repo_commit` to |
| 53 | + `HEAD`, and maintain the `Changelog`. |
| 54 | + |
| 55 | +## Required Style Rules |
| 56 | + |
| 57 | +- Use clear, direct, neutral language. |
| 58 | +- Prefer active voice and present tense. |
| 59 | +- Avoid conversational filler, rhetorical questions, emojis, marketing claims, |
| 60 | + speculation, and AI authorship references. |
| 61 | +- Use RFC-2119 keywords in `Notes` when the content is normative. |
| 62 | +- Do not include commentary about internal process documents or guideline |
| 63 | + updates. |
| 64 | + |
| 65 | +## Validation Checklist |
| 66 | + |
| 67 | +- The tutorial lives under `docs/tutorials/` with a kebab-case file name. |
| 68 | +- Metadata header and `tutorial` tag are present. |
| 69 | +- A table of contents is present. |
| 70 | +- All required sections are present and ordered clearly. |
| 71 | +- Each implementation step includes intent before the code and outcome after it. |
| 72 | +- Code snippets are minimal, buildable, and repository-aligned. |
| 73 | +- `Validation` contains exact commands and expected behavior. |
| 74 | +- `Exercises` contains 5 to 7 focused follow-up tasks. |
0 commit comments