|
| 1 | +--- |
| 2 | +name: create-lab-guide |
| 3 | +description: > |
| 4 | + Create a guide page for a Labspace. This includes writing the markdown content for the guide, |
| 5 | + structuring it according to Docker docs conventions, and ensuring it provides clear instructions |
| 6 | + and information about the Labspace. Includes learning about the lab itself, extracting out its |
| 7 | + learning objectives, and combining all of that into a well-structured guide markdown file. |
| 8 | +--- |
| 9 | + |
| 10 | +# Create Lab Guide |
| 11 | + |
| 12 | +You are creating a new guide page for a labspace. The guide should be structured according to Docker docs conventions, |
| 13 | +with clear sections, learning objectives, and instructions for users to get the most out of the lab. |
| 14 | + |
| 15 | +## Inputs |
| 16 | + |
| 17 | +The user provides one or more guides to migrate. Resolve these from the inventory below: |
| 18 | + |
| 19 | +- **REPO_NAME**: GitHub repo in the `dockersamples` org (e.g. `labspace-ai-fundamentals`) |
| 20 | + |
| 21 | +## Step 1: Clone the labspace repo |
| 22 | + |
| 23 | +Clone the guide repo to a temporary directory. This gives you all source files locally — no HTTP calls needed. |
| 24 | + |
| 25 | +```bash |
| 26 | +git clone --depth 1 https://github.com/dockersamples/{REPO_NAME}.git <tmpdir>/{REPO_NAME} |
| 27 | +``` |
| 28 | + |
| 29 | +Where `<tmpdir>` is a temporary directory on your system (e.g. the output of `mktemp -d`). |
| 30 | + |
| 31 | +## Step 2: Learn and extract key information about the lab |
| 32 | + |
| 33 | +The repo structure is: |
| 34 | + |
| 35 | +- `<tmpdir>/{REPO_NAME}/README.md` — the main README for the lab |
| 36 | +- `<tmpdir>/{REPO_NAME}/labspace/labspace.yaml` — a YAML document outlining details of the lab, including the sections/modules and the path to their content |
| 37 | +- `<tmpdir>/{REPO_NAME}/labspace/*.md` — the content for each section/module (only reference the files specified in `labspace.yaml`) |
| 38 | +- `<tmpdir>/{REPO_NAME}/.github/workflows/` — the GHA workflow that publishes the labspace. It includes the repo URL for the published Compose file, which will be useful for the "launch" command |
| 39 | +- `<tmpdir>/{REPO_NAME}/compose.override.yaml` - lab-specific Compose customizations |
| 40 | + |
| 41 | +1. Read `README.md` to understand the purpose of the lab. |
| 42 | +2. Read the `labspace/labspace.yaml` to understand the structure of the lab and its sections/modules. |
| 43 | +3. Read the `labspace/*.md` files to extract the learning objectives, instructions, and any code snippets. |
| 44 | +4. Extract a short description that can be used for the `description` and `summary` fields in the guide markdown. |
| 45 | +5. Determine if a model will be pulled when starting the lab by looking at the `compose.override.yaml` file and looking for the any top-level `model` specifications. |
| 46 | + |
| 47 | + |
| 48 | +## Step 2: Write the guide markdown |
| 49 | + |
| 50 | +The markdown file must be located in the `guides/` directory and have a filename of `lab-{GUIDE_ID}.md`. |
| 51 | + |
| 52 | +Sample markdown structure, including frontmatter and content: |
| 53 | + |
| 54 | +```markdown |
| 55 | +--- |
| 56 | +title: "Lab: { Short title }" |
| 57 | +linkTitle: "Lab: { Short title }" |
| 58 | +description: | |
| 59 | + A short description of the lab for SEO and social sharing. |
| 60 | +summary: | |
| 61 | + A short summary of the lab for the guides listing page. 2-3 lines. |
| 62 | +keywords: AI, Docker, Model Runner, agentic apps, lab, labspace |
| 63 | +aliases: # Include if the lab is an AI-related lab |
| 64 | + - /labs/docker-for-ai/{REPO_NAME_WITHOUT_LABSPACE_PREFIX}/ |
| 65 | +params: |
| 66 | + tags: [ai, labs] |
| 67 | + time: 20 minutes |
| 68 | + resource_links: |
| 69 | + - title: A resource link pointing to relevant documentation or code |
| 70 | + url: /ai/model-runner/ |
| 71 | + - title: Labspace repository |
| 72 | + url: https://github.com/dockersamples/{REPO_NAME} |
| 73 | +--- |
| 74 | + |
| 75 | +Short explanation of the lab and what it covers. |
| 76 | + |
| 77 | +## Launch the lab |
| 78 | + |
| 79 | +{{< labspace-launch image="dockersamples/{REPO_NAME}" >}} |
| 80 | + |
| 81 | +## What you'll learn |
| 82 | + |
| 83 | +By the end of this Labspace, you will have completed the following: |
| 84 | + |
| 85 | +- Objective #1 |
| 86 | +- Objective #2 |
| 87 | +- Objective #3 |
| 88 | +- Objective #4 |
| 89 | + |
| 90 | +## Modules |
| 91 | + |
| 92 | +| # | Module | Description | |
| 93 | +|---|--------|-------------| |
| 94 | +| 1 | Module #1 | Description of module #1 | |
| 95 | +| 2 | Module #2 | Description of module #2 | |
| 96 | +| 3 | Module #3 | Description of module #3 | |
| 97 | +| 4 | Module #4 | Description of module #4 | |
| 98 | +| 5 | Module #5 | Description of module #5 | |
| 99 | +| 6 | Module #6 | Description of module #6 | |
| 100 | +``` |
| 101 | + |
| 102 | +Important notes: |
| 103 | + |
| 104 | +- The learning objectives should be based on the content of the labspace as a whole. |
| 105 | +- The modules should be based on the sections/modules outlined in `labspace.yaml`. |
| 106 | +- All lab guides _must_ have a tag of `labs` |
| 107 | +- If the lab is AI-related, it should also have a tag of `ai` and aliases for `/labs/docker-for-ai/{REPO_NAME}/` |
| 108 | +- If the lab pulls a model, add a `model-download: true` parameter to the `labspace-launch` shortcode to show a warning about model downloads. |
| 109 | + |
| 110 | + |
| 111 | +## Step 3: Apply Docker docs style rules |
| 112 | + |
| 113 | +These are mandatory (from STYLE.md and AGENTS.md): |
| 114 | + |
| 115 | +- **No "we"**: "We are going to create" → "Create" or "Start by creating" |
| 116 | +- **No "let us" / "let's"**: → imperative voice or "You can..." |
| 117 | +- **No hedge words**: remove "simply", "easily", "just", "seamlessly" |
| 118 | +- **No meta-commentary**: remove "it's worth noting", "it's important to understand" |
| 119 | +- **No "allows you to" / "enables you to"**: → "lets you" or rephrase |
| 120 | +- **No "click"**: → "select" |
| 121 | +- **No bold for emphasis or product names**: only bold UI elements |
| 122 | +- **No time-relative language**: remove "currently", "new", "recently", "now" |
| 123 | +- **No exclamations**: remove "Voila!!!" etc. |
| 124 | +- Use `console` language hint for interactive shell blocks with `$` prompts |
| 125 | +- Use contractions: "it's", "you're", "don't" |
| 126 | + |
0 commit comments