Write concept/theory lessons for workshops
Purpose: Write concept/theory lessons that introduce 1-2 new concepts in 3-5 minutes.
When to use: Workshop lesson requires teaching a concept before hands-on practice.
Prerequisites:
This skill writes concept/theory lessons that:
Do NOT write challenge lessons, quizzes, or practice lessons. This skill focuses ONLY on concept/theory lessons.
Focus on graph databases and graph technologies.
Using comparisons effectively:
Before writing anything, answer:
MUST READ:
- WORKSHOP-PLAN.md (for lesson objectives)
- Source course lesson (for concept content)
- Previous workshop lesson (for context)
- CONTENT_GUIDELINES.md (for style rules)
REFERENCE:
- modules/2-foundation/lessons/1-graph-elements/lesson.adoc (example concept lesson)
- HOW-TO-BUILD-WORKSHOPS.md (methodology)
IMPORTANT: Follow this exact structure from review-lesson-content.mdc:
Introduction (two-part pattern)
├── Part 1: Context or why this matters
└── Part 2: "In this lesson, you will learn..."
Main Content (2-3 sections)
├── Section 1: Core concept A
│ ├── Plain-language definition
│ ├── Example from workshop dataset
│ └── Why it matters for workshop goal
└── Section 2: Core concept B
├── Plain-language definition
├── Example from workshop dataset
└── Why it matters for workshop goal
Summary
├── Bullet points with bold concepts
└── Forward reference to next lesson
Pattern A: Direct Continuation
Use when building directly on previous lesson:
[.slide.discrete]
== Introduction
You learned [X] in the previous lesson. To [accomplish next step], you need to understand [Y].
In this lesson, you will learn [specific concepts].
Example:
[.slide.discrete]
== Introduction
You imported Product nodes in the previous lesson. To query those products, you need to understand how Cypher patterns work.
In this lesson, you will learn how to write basic Cypher patterns to find nodes in your graph.
Pattern B: New/Related Topic
Use when NOT directly continuing:
[.slide.discrete]
== Introduction
[Statement about primary topic and why it matters for workshop goal].
In this lesson, you will learn [specific concepts].
Example:
[.slide.discrete]
== Introduction
Relationships in a graph are first-class citizens, meaning they can store properties just like nodes. This is crucial for modeling business data accurately.
In this lesson, you will learn how to use relationship properties to represent order quantities and prices.
❌ Combining into one sentence:
Now that you understand nodes, you'll learn about relationships and how they connect data.
❌ Generic opening without context:
In modern databases, relationships are important. This lesson covers relationships.
❌ Sales language:
Relationships are a powerful feature that will revolutionize how you think about data.
For each concept:
Action-oriented header (sentence case, not question)
Plain-language definition (1-2 sentences)
Example from workshop dataset (concrete, not abstract)
Why it matters (connection to goal)
CRITICAL: Every code block must follow this pattern from create-new-workshop.mdc:
[Context before - why do we need this?]
[source,cypher]
.Descriptive title describing the query
----
MATCH (n:Node) RETURN n;
----
[Explanation after - what does it do?]
Click **Run** to execute this query. [Expected result].
**Try experimenting:**
* [Suggested modification 1]
* [Suggested modification 2]
Example:
You want to see all Product nodes in your graph. In Cypher, you use the MATCH clause to find nodes by their label.
[source,cypher]
.Find all products
----
MATCH (p:Product)
RETURN p.name, p.unitPrice
LIMIT 5;
----
This query matches nodes with the Product label and returns their name and price properties.
Click **Run** to see the first 5 products. You should see items like "Chai" and "Chang" from the Northwind catalog.
**Try experimenting:**
* Change `LIMIT 5` to `LIMIT 10` to see more products
* Remove `p.unitPrice` to see only names
Use when code teaches 3+ concepts:
[source,cypher]
.Query with multiple patterns
----
MATCH (c:Customer {id: 'ALFKI'}) // (1)
-[:PLACED]-> // (2)
(o:Order) // (3)
RETURN c.companyName, count(o) // (4)
----
1. **Node pattern with properties** - Find specific customer by ID
2. **Relationship traversal** - Follow PLACED relationship
3. **Chained pattern** - Continue to Order nodes
4. **Aggregation** - Count the number of orders
Click **Run** to see how many orders this customer placed.
CRITICAL: Use [source,mermaid] — not [mermaid] alone. Graph nodes must be circles, not boxes. When using \n inside node labels for line breaks, surround it with spaces on both sides — Message \n role: user, not Message\nrole: user.
[source,mermaid]
----
graph LR
Customer((Customer)) -->|PLACED| Order((Order))
Order -->|ORDERS| Product((Product))
----
[.summary]
== Summary
In this lesson, you learned about [topic]:
* **[Concept 1]** - [Brief description]
* **[Concept 2]** - [Brief description]
In the next lesson, you will [what comes next - usually a challenge].
Example:
[.summary]
== Summary
In this lesson, you learned about graph elements:
* **Nodes** - Represent entities in your domain (like customers and products)
* **Relationships** - Connect nodes and represent associations (like PLACED and ORDERS)
* **Properties** - Store data on nodes and relationships (like name and quantity)
In the next lesson, you will use Data Importer to create Product nodes from a CSV file.
From .cursor/rules/asciidoc-syntax.mdc:
// <1> not parentheses // (1)From .cursor/review-lesson-content.mdc:
From CONTENT_GUIDELINES.md:
= Lesson Title
:type: lesson
:order: 1
// Source: course-name/modules/1/lessons/1-lesson
[.slide.discrete]
== Introduction
Opening paragraph here.
[.slide]
== First Section
Content here.
[.slide]
== Second Section
More content.
[.summary]
== Summary
* Summary points
Notice: TWO blank lines between every section.
Issue: Too long (over 5 minutes)
Issue: Generic examples (movies, books)
Issue: No connection to workshop goal
Issue: Code without explanation
Issue: Opening doesn't follow pattern
Issue: Sales/AI language
See these real files:
modules/2-foundation/lessons/1-graph-elements/lesson.adoc
modules/2-foundation/lessons/2-cypher-primer/lesson.adoc
modules/3-modeling-relationships/lessons/1-understanding-relationships/lesson.adoc
1-graph-elements/lesson.adoc:
Key patterns:
[.slide.discrete] for introduction[.slide.col-2] for side-by-side content// (1) for code explanationsBefore marking lesson complete, verify:
lesson.adoc exists in correct folder:type: lesson, :order: X, :duration: 3-5