From 204f968fc6afad8314b968a228897a4e358b483f Mon Sep 17 00:00:00 2001 From: Anders Gustafsson <44322377+And-Gu@users.noreply.github.com> Date: Sat, 21 Nov 2026 08:00:14 +0100 Subject: [PATCH] Improve quiz feedback and chapter endings --- docs/01-introduction.md | 4 +- docs/03-project-growth.md | 4 +- docs/04-markdown.md | 4 +- docs/05-structured-content.md | 4 +- docs/06-information-architecture.md | 4 +- docs/07-processing.md | 4 +- docs/08-ai-native.md | 4 +- docs/09-images.md | 4 +- docs/10-data-enrichment.md | 4 +- docs/10-publishing.md | 4 +- docs/11-beyond-github.md | 4 +- docs/13-explorable-presentations.md | 4 +- site/scripts/test-content.mjs | 6 +- site/src/components/learning/Quiz.astro | 37 +++++++-- site/src/pages/chapters/[slug].astro | 13 ++- site/src/styles/learning.css | 12 ++- site/tests/e2e/chapter-layout.spec.ts | 105 ++++++++++++++++++++++++ 17 files changed, 192 insertions(+), 29 deletions(-) diff --git a/docs/01-introduction.md b/docs/01-introduction.md index 36a420f..8c52890 100644 --- a/docs/01-introduction.md +++ b/docs/01-introduction.md @@ -111,8 +111,10 @@ The approach above can support checklists, reports, diagrams, simulation inputs, In technical documentation, these same practices are often called **docs as code**. In this tutorial, we also use them to work with information such as project records and the links between them. -You can follow the demonstrations without installing development tools. We start with onboarding information, then explore agent-ready project knowledge, a fictional contract model, and the actual system behind this website. [Chapter 2](02-github-workspace.md) begins with the shared workspace where the sources and proposed changes live. +You can follow the demonstrations without installing development tools. We start with onboarding information, then explore agent-ready project knowledge, a fictional contract model, and the actual system behind this website. > **Takeaway:** Document-as-Code is not primarily about writing documents in a different format, tool, or editor. It is about managing information so that it can be maintained, reviewed, traced, reused, and processed by both people and tools. + +[Chapter 2](02-github-workspace.md) begins with the shared workspace where the sources and proposed changes live. diff --git a/docs/03-project-growth.md b/docs/03-project-growth.md index d267c53..93ccba1 100644 --- a/docs/03-project-growth.md +++ b/docs/03-project-growth.md @@ -99,6 +99,6 @@ The diff shows what reviewers need to assess. Recording the source revision used The useful connection is between a change, its review, and the result readers received. History preserves the evidence for that connection; people use it to investigate and make decisions. -The next question is what those editable sources look like. [Chapter 4](04-markdown.md) opens a Markdown file and compares it with its rendered view. - + +The next question is what those editable sources look like. [Chapter 4](04-markdown.md) opens a Markdown file and compares it with its rendered view. diff --git a/docs/04-markdown.md b/docs/04-markdown.md index f6d4e17..f423610 100644 --- a/docs/04-markdown.md +++ b/docs/04-markdown.md @@ -104,6 +104,8 @@ This project keeps chapters in Markdown and adds interactive components through Headings and paragraphs describe how content reads. They do not, on their own, tell software which team owns a procedure, whether it is approved, or how it depends on another activity. -The playground shows how readable source becomes a formatted page. To find procedures by owner or review state, software needs information beyond headings and paragraphs. [Chapter 5](05-structured-content.md) adds those structured fields alongside the instructions. +The playground shows how readable source becomes a formatted page. To find procedures by owner or review state, software needs information beyond headings and paragraphs. + +[Chapter 5](05-structured-content.md) adds those structured fields alongside the instructions. diff --git a/docs/05-structured-content.md b/docs/05-structured-content.md index fd27d29..4178a41 100644 --- a/docs/05-structured-content.md +++ b/docs/05-structured-content.md @@ -104,6 +104,6 @@ Edits stay in your browser. The check applies only to this file's metadata; it d The lab shows why fields need both a shared meaning and configured checks. A draft can be valid metadata without being approved content. -Metadata can also identify another information item, such as a policy referenced by a procedure. [Chapter 6](06-information-architecture.md) follows those relationships to see what may need review when a source changes. - + +Metadata can also identify another information item, such as a policy referenced by a procedure. [Chapter 6](06-information-architecture.md) follows those relationships to see what may need review when a source changes. diff --git a/docs/06-information-architecture.md b/docs/06-information-architecture.md index 952d28e..65cf15d 100644 --- a/docs/06-information-architecture.md +++ b/docs/06-information-architecture.md @@ -82,6 +82,6 @@ The useful result is a route from a changed source to the people and information > **Explore further:** How do these relationships become readable diagrams? The [visual-source guide](../reference/visual-sources.md) explains which representations preserve meaning and how to make their outputs accessible. Reading the guide needs no local setup. -Once the records and relationships are clear, software can use them to produce useful results. [Chapter 7](07-processing.md) follows procedure text and metadata into a handbook and review queue. - + +Once the records and relationships are clear, software can use them to produce useful results. [Chapter 7](07-processing.md) follows procedure text and metadata into a handbook and review queue. diff --git a/docs/07-processing.md b/docs/07-processing.md index 3b6e3dc..f1f16e6 100644 --- a/docs/07-processing.md +++ b/docs/07-processing.md @@ -85,6 +85,8 @@ The preview follows your typing; generated results wait for checks and a success Processing rules are part of the maintained system. **They can be versioned, tested, reviewed, and improved alongside the information they transform.** This is what makes repeated outputs consistent—and makes the process inspectable when something goes wrong. -Those same sources and rules can also guide an AI agent helping with a change. [Chapter 8](08-ai-native.md) turns from our fictional onboarding records to the actual project knowledge an agent needs. +Those same sources and rules can also guide an AI agent helping with a change. + +[Chapter 8](08-ai-native.md) turns from our fictional onboarding records to the actual project knowledge an agent needs. diff --git a/docs/08-ai-native.md b/docs/08-ai-native.md index febabd9..b3430bd 100644 --- a/docs/08-ai-native.md +++ b/docs/08-ai-native.md @@ -82,6 +82,8 @@ Where would you maintain a stable-identifier rule and the explanation of why it > **Explore further:** The [agent context and project-knowledge guide](../reference/ai-context-and-agents.md) examines this repository's guidance, source selection, decision records, permissions and verification in greater detail. No AI account is needed to read it; its optional local examples require suitable tooling. -Organizing project knowledge helps agents find and interpret the material they need. People benefit from that organization too. [Chapter 9](09-images.md) uses the course’s own knowledge graph to connect concepts with related ideas and the chapters that explain them. An agent can follow the same references to find source material and prepare an explanation. +Organizing project knowledge helps agents find and interpret the material they need. People benefit from that organization too. An agent can follow references to locate sources and support an explanation. + +[Chapter 9](09-images.md) uses the course’s own knowledge graph to connect concepts with related ideas and the chapters that explain them. diff --git a/docs/09-images.md b/docs/09-images.md index e55ec18..63512cb 100644 --- a/docs/09-images.md +++ b/docs/09-images.md @@ -111,6 +111,8 @@ The information model makes that possible: identifiable records, fields with agr For another application, the [Contract Explorer](/document-as-code-lab/labs/contract-explorer/) lets you follow links between agreements, orders, projects and deliveries. The [visual-source guide](../reference/visual-sources.md) explores other ways to show connected information. -Finding a source is the beginning of an investigation. We may also need to check its values, explain a gap or calculate something new. [Chapter 10](10-data-enrichment.md) follows a service manager through that work, turning case records into a finding that can be checked and reused. +Finding a source is the beginning of an investigation. We may also need to check its values, explain a gap or calculate something new. + +[Chapter 10](10-data-enrichment.md) follows a service manager through that work, turning case records into a finding that can be checked and reused. diff --git a/docs/10-data-enrichment.md b/docs/10-data-enrichment.md index 025332a..4ff38f3 100644 --- a/docs/10-data-enrichment.md +++ b/docs/10-data-enrichment.md @@ -142,6 +142,6 @@ We started with dates and ended with an explained finding. Keeping that connecti > **Take the finding into a presentation.** How could the manager guide the team through the chart, then open the supporting records when someone asks a question? The optional bonus chapter, [Beyond Slides: Presentations as Explorable Knowledge](13-explorable-presentations.md), explores how to combine a guided story, opportunities to explore and a reference people can return to afterward. -In [Chapter 11](10-publishing.md), we look at automation: running established checks and processing rules when their sources change. - + +In [Chapter 11](10-publishing.md), we look at automation: running established checks and processing rules when their sources change. diff --git a/docs/10-publishing.md b/docs/10-publishing.md index 7ad4bf7..a5f4efe 100644 --- a/docs/10-publishing.md +++ b/docs/10-publishing.md @@ -109,6 +109,8 @@ An agent with access to the workflow and run logs can also help explain a failur > **Explore further:** The [automation and quality guide](../reference/automation-quality.md) explains workflow steps and retained results. The [publishing guide](../reference/publishing-workflows.md) covers this repository’s output paths, and [GitHub’s introduction to Actions](https://docs.github.com/en/actions/get-started/understand-github-actions) explains the platform’s terms. -Our chapter edit now has a path from proposal to publication. [Chapter 12](11-beyond-github.md) looks inside that path: which files hold the information, how the website combines them and how the same approach can work in another environment. +Our chapter edit now has a path from proposal to publication. + +[Chapter 12](11-beyond-github.md) looks inside that path: which files hold the information, how the website combines them and how the same approach can work in another environment. diff --git a/docs/11-beyond-github.md b/docs/11-beyond-github.md index f89a221..f3a8141 100644 --- a/docs/11-beyond-github.md +++ b/docs/11-beyond-github.md @@ -112,6 +112,8 @@ Then sketch its path: **maintained instruction → review and processing → the The optional [first-increment exercise](../reference/automation-quality.md#plan-a-first-increment) helps you describe that flow. The [Information Refinement Lab](../reference/information-refinement.md) offers another example of turning selected sources into an explained draft. -We have now followed the information through the whole lab, from an editable source to something a reader can use. [Bringing It Together](13-course-summary.md) returns to the four parts of the course and connects what each one added. +We have now followed the information through the whole lab, from an editable source to something a reader can use. + +[Bringing It Together](13-course-summary.md) returns to the four parts of the course and connects what each one added. diff --git a/docs/13-explorable-presentations.md b/docs/13-explorable-presentations.md index b43a850..1a49b51 100644 --- a/docs/13-explorable-presentations.md +++ b/docs/13-explorable-presentations.md @@ -269,9 +269,9 @@ An online interactive dashboard may require a connection. Offline presentation s ## Try it: Reframe one of the existing decks -Open the [Lab's presentation collection](https://and-gu.github.io/document-as-code-lab/presentations/) and choose an existing deck. You can also read its [YAML authoring guide](../presentations/README.md) without installing anything. +Open the [information model deck](/document-as-code-lab/presentations/information-model/) or choose another deck from the [Lab’s presentation collection](/document-as-code-lab/presentations/). You can also read the [YAML authoring guide](../presentations/README.md) in your browser. -Pick one scene and answer: +Pick one scene. Sketch its main claim, the evidence viewers need to see, and what you would reveal when they ask a question. Use these prompts: 1. What is its essential claim? Could someone summarize it in one sentence? 2. What should be shown immediately, and what could be revealed only after a question? diff --git a/site/scripts/test-content.mjs b/site/scripts/test-content.mjs index 82c7942..d84af5e 100644 --- a/site/scripts/test-content.mjs +++ b/site/scripts/test-content.mjs @@ -88,8 +88,10 @@ function findNodes(node, predicate) { const attribute = (node, name) => node.attrs?.find(attr => attr.name === name)?.value; const navigation = findNodes(lastChapter, node => attribute(node, 'aria-label') === 'Chapter navigation')[0]; const navLinks = findNodes(navigation, node => node.tagName === 'a'); -assert.equal(navLinks.length, 1, 'The final chapter has only a previous link'); -assert.equal(attribute(navLinks[0], 'href'), '/document-as-code-lab/chapters/11-beyond-github/'); +assert.deepEqual(navLinks.map(node => attribute(node, 'href')), [ + '/document-as-code-lab/chapters/11-beyond-github/', + '/document-as-code-lab/', +], 'The final chapter links to the previous lesson and the course overview'); const architectureChapter = parseHtml(await readFile(path.join(dist, 'chapters/11-beyond-github/index.html'), 'utf8')); const architectureNavigation = findNodes(architectureChapter, node => attribute(node, 'aria-label') === 'Chapter navigation')[0]; assert.ok(findNodes(architectureNavigation, node => attribute(node, 'href') === '/document-as-code-lab/chapters/13-course-summary/').length); diff --git a/site/src/components/learning/Quiz.astro b/site/src/components/learning/Quiz.astro index 40b2e9a..8260eae 100644 --- a/site/src/components/learning/Quiz.astro +++ b/site/src/components/learning/Quiz.astro @@ -6,7 +6,7 @@ const { id, title = 'Check your understanding', questions } = Astro.props; const prepared = prepareQuestions(questions); ---
-

{title}

+

{title}