Docs quiz: randomised questions generated from the documentation, by level
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- nuxt
- Domain
- documentation, frontend
Research direction
This is an open design proposal, and its final questions (quiz length, placement, topic tracks, whether Deployment is included) are still undecided. Before any code, read the Nuxt Content setup and the page frontmatter conventions to see how sections and hashes could be derived. Done means the maintainers agree on the open questions and the generation script pnpm quiz:generate is specified.
Written by the indexing model from the issue text.
Description
A short quiz on the docs site that excites and intrigues developers, introduces CWA's ideas, and tests their knowledge a bit. Every answer links back to the docs section it came from. This is a proposal for discussion; the open questions are at the end.
What we've decided so far
- Audience: developers. Questions come only from the documentation.
- Where: a feature of the docs site.
- Question types: multiple choice, "select the line of code that does X", and "spot the mistake".
- Levels: the reader picks beginner, intermediate or advanced (and maybe a topic or two) before starting.
- Variety without hand-writing: we generate the questions from the docs ourselves, and they're randomised, so each person's short quiz differs a lot and nobody has to write or code new questions.
- Results: stay in the browser for now. No sign-in and no stored scores.
Proposed design
1. Map the docs into sections
Nuxt Content already parses every page into headings and code blocks. The unit for questions is a section: page path + heading anchor + a hash of its text. That gives each question:
- a source to link to ("Read more" goes to
/api/routes#route-generation); - a way to know it's stale (the section's hash changed).
Pages opt out with frontmatter quiz: false (releases, troubleshooting, the glossary maybe).
The default level comes from where the page lives, and a model can adjust it per question:
| Docs section | Default level |
|---|---|
| Getting Started, Key Ideas, Guides | beginner |
| Core Concepts | intermediate |
| API, Nuxt Module, Deployment | advanced |
2. Generate a question bank offline, not at runtime
A script (pnpm quiz:generate) sends each changed section to Claude and gets back questions in a fixed JSON schema. They're stored in the repo as a Nuxt Content data collection (content/quiz/<page>.yml) and prerendered with the site, so it costs nothing per visitor and needs no server.
Each question records:
type:choice,pick-lineorspot-mistakelevel, and concept tagssource: the page and anchor, plus the section hash it was generated fromquote: the exact sentence(s) or code from the section that prove the answeranswer,distractors, and a one or two sentenceexplanation
Only sections whose hash changed are regenerated, so a docs edit refreshes its questions in the same PR, and a reviewer reads the YAML diff. That's reading, not coding.
3. How each type comes from the docs
- Multiple choice: a fact in the section. The distractors must be plausible, and the prompt forbids answers borrowed from other frameworks (the same rule as the chat persona in #1).
- Select the line: take a real code block from the docs. The model picks one line and describes what it does; the reader clicks the line. The code is real by construction.
- Spot the mistake: take a real code block and make one realistic mutation. Examples: a phantom method,
.valueon a plain boolean,getEntity()instead ofgetPage(), auiComponentwithout its prefix,PUTwhere the docs sayPATCH. The reader clicks the wrong line. Many of the best mutations are mistakes the docs audits actually found.
4. Grounding check before a question is kept
The docs audits showed how easily a confident, wrong claim gets in. So a second, separate pass gets only the section and the question, and must answer it on its own:
- if it picks a different answer, or the
quoteisn't verbatim in the section, the question is dropped; - for spot-the-mistake, it must find the mutated line without being told.
5. Randomising each quiz
The browser picks about 10 questions for the chosen level and topics, spread across sections so one page can't dominate, and shuffles the options. The pick is seeded, so "share this quiz" can be a link with the seed, and a friend gets the same questions.
Each answer shows the explanation and a link to the section, which covers the "introduce the concepts" goal. A "report this question" link opens a pre-filled GitHub issue.
Cost
Generation is a one-off per changed section. At around 400 pages and 5–10 questions per section, a full first run is a few dollars on Haiku or Sonnet. After that, only edited sections cost anything. There's nothing at runtime.
Overlap with #1 (chat assistant)
Both need the docs split into sections with stable anchors and hashes. That step could be shared.
Open questions
- How many questions in a quiz, and is there a timer?
- Is there a score summary at the end ("you're intermediate on caching, beginner on fixtures")? That needs concept tags we trust.
- Topic choice: free picks, or a few fixed tracks (Content editing, Building components, API, Deployment)?
- Do Deployment questions belong? They're template-specific and change often.
- Should generation run in CI on every docs PR, or locally before committing?
- Where does it live:
/quiz, a button in the header, or a card at the end of each guide ("Test yourself on this page")? - Should questions about versions ("since alpha.18") be excluded? They date quickly.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 20m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from components-web-app/docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#256 · 1 comment ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
components-web-app/docs#253 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
components-web-app/docs#255 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
components-web-app/docs#254 · 1 comment ·
-
documentation
Difficulty 3/5 1-3 hours Newbie friendliness 25/100
components-web-app/docs#226 ·
All issues in components-web-app/docs
Similar issues
-
The inspector never shows the instances field, so scaling out is unreachablePossibly taken @Mrkewl claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
xevrion/breakscale#96 ·
Maintainers usually reply within 4 days
-
Object parameters lose their structure when resources is enabledPossibly taken @asts-top claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rossant/awesome-math#199 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jaegertracing/jaeger-ui#4618 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
mifi/lossless-cut#3125 ·
Maintainers usually reply within 1 day