@lernapps/tooling 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +67 -2
  3. package/archetypes/shared/a11y.ts +38 -0
  4. package/archetypes/shared/hooks/pre-commit +22 -0
  5. package/archetypes/shared/hooks/pre-push +4 -0
  6. package/archetypes/shared/i18n.ts +25 -0
  7. package/archetypes/shared/install-hooks.ts +63 -0
  8. package/archetypes/shared/playwright.ts +54 -0
  9. package/archetypes/shared/preset.ts +81 -0
  10. package/archetypes/shared/storage.ts +167 -0
  11. package/archetypes/shared/tsconfig.json +27 -0
  12. package/check/validation-report.v1.schema.json +116 -0
  13. package/dist/a11y.mjs +30 -0
  14. package/dist/check/rules/accessible.mjs +18 -0
  15. package/dist/check/rules/app-content-guide.mjs +69 -0
  16. package/dist/check/rules/dependency-licence.mjs +82 -0
  17. package/dist/check/rules/entry-fitness-matches.mjs +22 -0
  18. package/dist/check/rules/entry-links-resolve.mjs +44 -0
  19. package/dist/check/rules/explainer-readable-without-js.mjs +66 -0
  20. package/dist/check/rules/links-resolve.mjs +10 -0
  21. package/dist/check/rules/lockfile-matches.mjs +57 -0
  22. package/dist/check/rules/no-request-before-click.mjs +17 -0
  23. package/dist/check/rules/no-tracking.mjs +17 -0
  24. package/dist/check/rules/own-data-only.mjs +66 -0
  25. package/dist/check/rules/pages-reachable.mjs +25 -0
  26. package/dist/check/rules/usable-at-360px.mjs +19 -0
  27. package/dist/check-cv4I6CCH.mjs +28 -0
  28. package/dist/cli.mjs +3118 -0
  29. package/dist/i18n.mjs +11 -0
  30. package/dist/lint.mjs +528 -0
  31. package/dist/plan-DWKayEnY.mjs +75 -0
  32. package/dist/playwright.mjs +47 -0
  33. package/dist/preset.mjs +60 -0
  34. package/dist/skills/lernapps-app/SKILL.md +49 -0
  35. package/dist/skills/lernapps-cli/SKILL.md +156 -0
  36. package/dist/skills/lernapps-cli/references/platform-rules.md +258 -0
  37. package/dist/skills/lernapps-commit/SKILL.md +39 -0
  38. package/dist/skills/lernapps-content-growth/SKILL.md +33 -0
  39. package/dist/skills/lernapps-content-questions/SKILL.md +133 -0
  40. package/dist/skills/lernapps-content-questions/references/question-types.md +69 -0
  41. package/dist/skills/lernapps-content-research/SKILL.md +50 -0
  42. package/dist/skills/lernapps-content-research/references/sources.md +16 -0
  43. package/dist/skills/lernapps-exercise-patterns/SKILL.md +74 -0
  44. package/dist/skills/lernapps-exercise-patterns/references/biology-geography.md +13 -0
  45. package/dist/skills/lernapps-exercise-patterns/references/chemistry.md +16 -0
  46. package/dist/skills/lernapps-exercise-patterns/references/computer-science.md +13 -0
  47. package/dist/skills/lernapps-exercise-patterns/references/figures.md +10 -0
  48. package/dist/skills/lernapps-exercise-patterns/references/history.md +13 -0
  49. package/dist/skills/lernapps-exercise-patterns/references/mathematics.md +19 -0
  50. package/dist/skills/lernapps-exercise-patterns/references/page-structures.md +8 -0
  51. package/dist/skills/lernapps-exercise-patterns/references/physics.md +18 -0
  52. package/dist/skills/lernapps-exercise-patterns/references/success.md +28 -0
  53. package/dist/skills/lernapps-explainer/SKILL.md +33 -0
  54. package/dist/skills/lernapps-explainer/references/blocks.md +83 -0
  55. package/dist/skills/lernapps-explainer/references/components.md +66 -0
  56. package/dist/skills/lernapps-explainer/references/exercises.md +115 -0
  57. package/dist/skills/lernapps-explainer/references/rules.md +285 -0
  58. package/dist/skills/lernapps-explainer/references/runtime.md +79 -0
  59. package/dist/skills/lernapps-explainer/references/structure.md +24 -0
  60. package/dist/skills/lernapps-explainer-design/SKILL.md +57 -0
  61. package/dist/skills/lernapps-explainer-design/references/rules.md +75 -0
  62. package/dist/skills/lernapps-explainer-self-assessment/SKILL.md +93 -0
  63. package/dist/skills/lernapps-github/SKILL.md +102 -0
  64. package/dist/skills/lernapps-interactive/SKILL.md +141 -0
  65. package/dist/skills/lernapps-interactive/references/frame.md +30 -0
  66. package/dist/skills/lernapps-interactive-design/SKILL.md +58 -0
  67. package/dist/skills/lernapps-listing/SKILL.md +44 -0
  68. package/dist/skills/lernapps-listing/references/keeping-updated.md +33 -0
  69. package/dist/skills/lernapps-quiz/SKILL.md +100 -0
  70. package/dist/skills/lernapps-quiz-design/SKILL.md +48 -0
  71. package/dist/status-CXoQBgfU.mjs +76 -0
  72. package/dist/storage.mjs +113 -0
  73. package/generator/app/.agents/skills/app-content/SKILL.md +63 -0
  74. package/generator/app/.github/ISSUE_TEMPLATE/inhaltsfehler.yml +25 -0
  75. package/generator/app/.github/workflows/pages.yml +61 -0
  76. package/generator/app/LICENSE +21 -0
  77. package/generator/app/renovate.json +4 -0
  78. package/generator/architecture.ts +212 -0
  79. package/generator/create.ts +462 -0
  80. package/generator/init.ts +186 -0
  81. package/generator/update.ts +429 -0
  82. package/guidance/AGENTS.md +26 -0
  83. package/guidance/increment-template.md +194 -0
  84. package/guidance/plan-front-matter.v1.schema.json +36 -0
  85. package/guidance/plan-template.md +233 -0
  86. package/guidance/subagent-brief.md +25 -0
  87. package/guidance/workflow-rules.md +109 -0
  88. package/package.json +133 -4
  89. package/review/verdict.v1.schema.json +134 -0
  90. package/skills/archetypes/lernapps-explainer/SKILL.md +33 -0
  91. package/skills/archetypes/lernapps-explainer/references/blocks.md +83 -0
  92. package/skills/archetypes/lernapps-explainer/references/components.md +66 -0
  93. package/skills/archetypes/lernapps-explainer/references/exercises.md +115 -0
  94. package/skills/archetypes/lernapps-explainer/references/rules.md +285 -0
  95. package/skills/archetypes/lernapps-explainer/references/runtime.md +79 -0
  96. package/skills/archetypes/lernapps-explainer/references/structure.md +24 -0
  97. package/skills/archetypes/lernapps-explainer-design/SKILL.md +57 -0
  98. package/skills/archetypes/lernapps-explainer-design/references/rules.md +75 -0
  99. package/skills/archetypes/lernapps-explainer-self-assessment/SKILL.md +93 -0
  100. package/skills/archetypes/lernapps-interactive/SKILL.md +141 -0
  101. package/skills/archetypes/lernapps-interactive/references/frame.md +30 -0
  102. package/skills/archetypes/lernapps-interactive-design/SKILL.md +58 -0
  103. package/skills/archetypes/lernapps-quiz/SKILL.md +100 -0
  104. package/skills/archetypes/lernapps-quiz-design/SKILL.md +48 -0
  105. package/skills/content/lernapps-content-questions/SKILL.md +133 -0
  106. package/skills/content/lernapps-content-questions/references/question-types.md +69 -0
  107. package/skills/content/lernapps-content-research/SKILL.md +50 -0
  108. package/skills/content/lernapps-content-research/references/sources.md +16 -0
  109. package/skills/content/lernapps-exercise-patterns/SKILL.md +74 -0
  110. package/skills/content/lernapps-exercise-patterns/references/biology-geography.md +13 -0
  111. package/skills/content/lernapps-exercise-patterns/references/chemistry.md +16 -0
  112. package/skills/content/lernapps-exercise-patterns/references/computer-science.md +13 -0
  113. package/skills/content/lernapps-exercise-patterns/references/figures.md +10 -0
  114. package/skills/content/lernapps-exercise-patterns/references/history.md +13 -0
  115. package/skills/content/lernapps-exercise-patterns/references/mathematics.md +19 -0
  116. package/skills/content/lernapps-exercise-patterns/references/page-structures.md +8 -0
  117. package/skills/content/lernapps-exercise-patterns/references/physics.md +18 -0
  118. package/skills/content/lernapps-exercise-patterns/references/success.md +28 -0
  119. package/skills/process/lernapps-app/SKILL.md +49 -0
  120. package/skills/process/lernapps-commit/SKILL.md +39 -0
  121. package/skills/process/lernapps-content-growth/SKILL.md +33 -0
  122. package/skills/process/lernapps-github/SKILL.md +102 -0
  123. package/skills/process/lernapps-listing/SKILL.md +44 -0
  124. package/skills/process/lernapps-listing/references/keeping-updated.md +33 -0
  125. package/skills/tooling/lernapps-cli/SKILL.md +156 -0
  126. package/skills/tooling/lernapps-cli/references/platform-rules.md +258 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: lernapps-exercise-patterns
3
+ description: Use in Explore, after the goal and the learners are known and before you choose the archetype - how learners of a lernapps.net app practise each kind of competency, which points to the archetype - and again in Plan to choose a pattern per competency, share material as data and say what a wrong answer is told. In an increment, for a kind of exercise the app's content guide lacks. For every archetype.
4
+ license: MIT
5
+ ---
6
+
7
+ # Exercise patterns
8
+
9
+ - Learners act on every page or screen (`learners-act`).
10
+ - Learners derive, not only read off: show how a value comes about (tree diagram, step, model), then let them do it.
11
+ - The content guide `.agents/skills/app-content/SKILL.md` names the app's patterns. It takes precedence.
12
+ - Three levels. Take the next level only when the one before cannot express the competency.
13
+
14
+ ## The kind of practice and the archetype
15
+
16
+ - In Explore, read the patterns of the subject before the archetype is chosen. How learners practise points to the
17
+ archetype; the README of each template decides:
18
+ - every competency fits a question with options or an input and feedback per answer, no page needs to explain
19
+ first → `quiz`;
20
+ - learners need explanations, figures or derivations on pages before they practise, with exercises in between →
21
+ `explainer`;
22
+ - learners act in a model of their own: a game, a simulation, a timed drill, something they move or build →
23
+ `interactive`.
24
+ - Mixed: the kind most competencies need decides; tell the creator what the others become.
25
+
26
+ ## 1. Data files
27
+
28
+ - Each fact once, as a record with the same fields as its neighbours (elements, circuit parts, events, organs).
29
+ - The skill `lernapps-<archetype>-design` says where data lives in the archetype.
30
+
31
+ ## 2. Patterns
32
+
33
+ - A pattern is a kind of exercise for one kind of competency, written down once and varied per use (values,
34
+ records, context).
35
+ - Choose by the competency's verb:
36
+
37
+ | The learner can … | Pattern |
38
+ |---|---|
39
+ | compute, convert, estimate | a computed task with unit; typical mistakes diagnosed; numbers drawn where possible |
40
+ | assign, name, recognise | match pairs, or pick one of things of the same kind |
41
+ | order, compare | put items in order by size, date or step |
42
+ | judge, decide | true or false with the reason in the feedback, or pick the right statement |
43
+ | read off, interpret | a figure or table given, a value or statement asked |
44
+ | explain | pick the right explanation among plausible wrong ones, each with background |
45
+
46
+ - Read the patterns of your subject before you choose: [mathematics](references/mathematics.md),
47
+ [physics](references/physics.md), [chemistry](references/chemistry.md),
48
+ [biology and geography](references/biology-geography.md), [history](references/history.md),
49
+ [computer science](references/computer-science.md). Another subject: the one closest to it.
50
+ - Explainer: read [references/page-structures.md](references/page-structures.md) when you plan the sections of a
51
+ page; any archetype with figures: [references/figures.md](references/figures.md).
52
+ - Write each pattern into "Content method": name, kind of competency, form in the archetype (what is fixed, what
53
+ varies), one example, data file. In Code it goes into the content guide.
54
+
55
+ ## 3. Beyond the notation
56
+
57
+ - What the archetype's notation cannot express: the skill `lernapps-<archetype>-design` says the way out (a component
58
+ of the explainer; code of an interactive app). Say in the plan why no pattern fits.
59
+ - A need other apps share (figure kind, block, question type) → an issue at
60
+ <https://github.com/lernapps/app-templates/issues> with an example. Tell the creator; use the nearest pattern.
61
+ - Never code beyond the archetype; note the gap under "Where I had to guess".
62
+
63
+ ## Checking answers
64
+
65
+ - Read [references/success.md](references/success.md) when you decide how an exercise checks an answer and what each
66
+ wrong answer is told.
67
+
68
+ ## Every pattern
69
+
70
+ - Works without seeing the figure: the figure explains, the check checks.
71
+ - The figure shows what is given, never the answer.
72
+ - Numbers fit the story; units are named; rounding is said.
73
+ - Wrong options and mistakes are real ones, each with a reason.
74
+ - Every figure works at 360 px and has a text alternative (`usable-at-360px`, `accessible`).
@@ -0,0 +1,13 @@
1
+ # Patterns: Biology and geography
2
+
3
+ - A start, not a rule. Columns: idea; what learners see and do; how it is expressed.
4
+ - Means: explainer blocks (`figure` `hundred-grid`/`bar`/`image`, `labelled-figure`, `table`, `timeline`, `formula`
5
+ with `\ce{…}`/`\pu{…}`, `definition`, `quote`, `code`); question types (`single-choice`, `multiple-choice`,
6
+ `true-false`, `number`, `ordering`, `matching`); `generated` (task per seed, `given` or data-file records,
7
+ `mistakes`, optional drawn figure); component (`vue-component` + `nojs`) last, each with a static form first.
8
+ - New pattern in an app → its content guide, with example and data file.
9
+
10
+ | Idea | Learners see and do | Expressed with |
11
+ |---|---|---|
12
+ | Parts and functions | an organ, a cell or a landscape with numbered parts | `labelled-figure`; `table` of parts and functions from a data file; `matching` part ↔ function |
13
+ | Classification | living things or places by a feature | `multiple-choice` "which of these are …" |
@@ -0,0 +1,16 @@
1
+ # Patterns: Chemistry
2
+
3
+ - A start, not a rule. Columns: idea; what learners see and do; how it is expressed.
4
+ - Means: explainer blocks (`figure` `hundred-grid`/`bar`/`image`, `labelled-figure`, `table`, `timeline`, `formula`
5
+ with `\ce{…}`/`\pu{…}`, `definition`, `quote`, `code`); question types (`single-choice`, `multiple-choice`,
6
+ `true-false`, `number`, `ordering`, `matching`); `generated` (task per seed, `given` or data-file records,
7
+ `mistakes`, optional drawn figure); component (`vue-component` + `nojs`) last, each with a static form first.
8
+ - New pattern in an app → its content guide, with example and data file.
9
+
10
+ | Idea | Learners see and do | Expressed with |
11
+ |---|---|---|
12
+ | Particle model | the states of matter as dots with their spacing | three `image`s with captions; `matching` state ↔ description; a component with a temperature slider |
13
+ | Atom model | shells with electrons for the elements 1 to 20, valence electrons marked | a data file of elements (protons, shells, valence electrons); `generated` `pick: 1` with a number answer |
14
+ | Reaction equations | atom counts left and right; balance by coefficients | `formula` with `\ce{…}`; `number` or `generated` asking one coefficient from a data file of reactions; a component that shows the counts |
15
+ | Stoichiometry | mol, g and particles as three boxes with the molar mass between them | `formula` with `\pu{…}`; `generated` from a data file of substances, the mistake "multiplied instead of divided by M" |
16
+ | pH scale | a coloured scale; where substances lie | `image` of the scale; `ordering` of substances by pH from a data file |
@@ -0,0 +1,13 @@
1
+ # Patterns: Computer science
2
+
3
+ - A start, not a rule. Columns: idea; what learners see and do; how it is expressed.
4
+ - Means: explainer blocks (`figure` `hundred-grid`/`bar`/`image`, `labelled-figure`, `table`, `timeline`, `formula`
5
+ with `\ce{…}`/`\pu{…}`, `definition`, `quote`, `code`); question types (`single-choice`, `multiple-choice`,
6
+ `true-false`, `number`, `ordering`, `matching`); `generated` (task per seed, `given` or data-file records,
7
+ `mistakes`, optional drawn figure); component (`vue-component` + `nojs`) last, each with a static form first.
8
+ - New pattern in an app → its content guide, with example and data file.
9
+
10
+ | Idea | Learners see and do | Expressed with |
11
+ |---|---|---|
12
+ | Reading code | a short program; what it prints | `code`; `single-choice` or `number` on its output |
13
+ | Number systems | a number in binary; convert it | `generated` with `int` drawn and the answer computed; the mistake "read from the wrong end" |
@@ -0,0 +1,10 @@
1
+ # Figures
2
+
3
+ - Shows what the text next to it says; caption: what to look at; `alt`: what it shows (`explainer-figure-explains`).
4
+ - Drawn from the given, never the answer (`explainer-figure-hides-answer`).
5
+ - Bundled; nothing from other servers before a click (`no-request-before-click`); others' images with source and
6
+ licence (`third-party-licence`).
7
+ - Works at 360 px: trees top to bottom; too wide → table, or split by stage.
8
+ - Same conventions (colours, labels, units, orientation) across the app; write them into the guide, "Figures".
9
+ - The same figures work in a quiz question (`material`, skill `lernapps-content-questions`): an image of `src/images/` with
10
+ `alt`, `caption`, `source` and `licence`.
@@ -0,0 +1,13 @@
1
+ # Patterns: History
2
+
3
+ - A start, not a rule. Columns: idea; what learners see and do; how it is expressed.
4
+ - Means: explainer blocks (`figure` `hundred-grid`/`bar`/`image`, `labelled-figure`, `table`, `timeline`, `formula`
5
+ with `\ce{…}`/`\pu{…}`, `definition`, `quote`, `code`); question types (`single-choice`, `multiple-choice`,
6
+ `true-false`, `number`, `ordering`, `matching`); `generated` (task per seed, `given` or data-file records,
7
+ `mistakes`, optional drawn figure); component (`vue-component` + `nojs`) last, each with a static form first.
8
+ - New pattern in an app → its content guide, with example and data file.
9
+
10
+ | Idea | Learners see and do | Expressed with |
11
+ |---|---|---|
12
+ | Source and context | a quotation with its origin; what it says about its time | `quote` with `origin`, `source` and `licence`; `single-choice` on its meaning |
13
+ | Chronology | events on a timeline; put them in order | `timeline` from a data file of events; `generated` with `pick: 3, distinct: true` and `compare: order` |
@@ -0,0 +1,19 @@
1
+ # Patterns: Mathematics
2
+
3
+ - A start, not a rule. Columns: idea; what learners see and do; how it is expressed.
4
+ - Means: explainer blocks (`figure` `hundred-grid`/`bar`/`image`, `labelled-figure`, `table`, `timeline`, `formula`
5
+ with `\ce{…}`/`\pu{…}`, `definition`, `quote`, `code`); question types (`single-choice`, `multiple-choice`,
6
+ `true-false`, `number`, `ordering`, `matching`); `generated` (task per seed, `given` or data-file records,
7
+ `mistakes`, optional drawn figure); component (`vue-component` + `nojs`) last, each with a static form first.
8
+ - New pattern in an app → its content guide, with example and data file.
9
+
10
+ | Idea | Learners see and do | Expressed with |
11
+ |---|---|---|
12
+ | Part of a whole (percent, fractions) | a 10×10 grid with the part filled; compute the part, the whole or the rate | `figure` `hundred-grid` on the page; `generated` with `compare: { number: { format: percent } }`; a figure that changes with the task: an exercise component |
13
+ | Before and after a change | two bars, old and new value; compute the change or the new value | `figure` `bar` (`part`, `whole`) on the page; `generated` with the typical mistake "added the rate instead of the amount" |
14
+ | Product of brackets (binomial formulas) | a rectangle split into a², ab, ab, b², lengths from the task | `image` (SVG) for the rule; `generated` for the task; a component only for lengths that follow the task |
15
+ | Difference of squares | a² − b² as an L-shape, rearranged into (a + b)(a − b) | two `image`s side by side with captions; `ordering` of the steps |
16
+ | Outcome set (Laplace) | die faces, wheel sectors or balls, the favourable ones marked | `table` or `image`; `generated` drawing from a data file of experiments, answer as a fraction |
17
+ | Multi-stage experiment | a tree from top to bottom with branch probabilities; multiply along a path | `image` (SVG) of the tree; `generated` with the path rule; a clickable tree as a component |
18
+ | Drawing without replacement | an urn before and after one ball is taken | two `image`s; `generated` with `pick: 2, distinct: true` from a data file of balls |
19
+ | Unit conversion | a value with one unit; give it in another | `generated` with `compare: { number: { unit } }` and the mistake "factor in the wrong direction" |
@@ -0,0 +1,8 @@
1
+ # Page structures (explainer)
2
+
3
+ - Recommended; keep alike across the app's pages.
4
+ - Maths, sciences: Warum, Regel (formula, figure), Beispiel (`example` box), Übung.
5
+ - History: Quelle (`quote`), Einordnung, Zeitleiste (`timeline` from data), Übung (ordering or `generated`).
6
+ - Biology, geography: Überblick, Aufbau (`labelled-figure`), Funktion (`table`), Übung (matching).
7
+ - Computer science: Idee, Beispiel, Code (`code`), Übung (output of the code).
8
+ - Quiz: one round per chapter, questions in the patterns above a question type can express.
@@ -0,0 +1,18 @@
1
+ # Patterns: Physics
2
+
3
+ - A start, not a rule. Columns: idea; what learners see and do; how it is expressed.
4
+ - Means: explainer blocks (`figure` `hundred-grid`/`bar`/`image`, `labelled-figure`, `table`, `timeline`, `formula`
5
+ with `\ce{…}`/`\pu{…}`, `definition`, `quote`, `code`); question types (`single-choice`, `multiple-choice`,
6
+ `true-false`, `number`, `ordering`, `matching`); `generated` (task per seed, `given` or data-file records,
7
+ `mistakes`, optional drawn figure); component (`vue-component` + `nojs`) last, each with a static form first.
8
+ - New pattern in an app → its content guide, with example and data file.
9
+
10
+ | Idea | Learners see and do | Expressed with |
11
+ |---|---|---|
12
+ | Circuit symbols | the symbol of a part and its name and function | `table` from a data file of parts; `matching` symbol ↔ part; `generated` `pick` from the data file |
13
+ | Series and parallel circuit | two circuits with the same parts; where is the current larger | `labelled-figure` of both schematics; `single-choice` with the reason in each option's `info`; `ordering` of currents |
14
+ | Ohm's law and quantities | U, R and I of a circuit; compute the missing one with its unit | `formula` `U = R \cdot I`; `generated` with `\pu{…}` units, `where` for realistic values, mistakes "U · I instead of U / I", "mA not converted" |
15
+ | Linear motion | s-t and v-t graphs side by side; read off or compute speed | `image` of the graphs with a `table` of values; `generated` for s = v · t; a component with a slider for v |
16
+ | Lever and moment | a beam with weights at distances; does it balance | `image` of the beam; `generated` for F₁ · a₁ = F₂ · a₂; a component with draggable weights |
17
+ | Optics | a ray diagram of a convex lens; where the image forms | `labelled-figure` of the rays; `true-false` on image properties; a component with a draggable object |
18
+ | Density | blocks of equal mass and different volumes; float or sink | `table` from a data file of materials; `generated` with `compare: { choice: [schwimmt, sinkt] }` |
@@ -0,0 +1,28 @@
1
+ # How an exercise checks success
2
+
3
+ ## Property, not model solution
4
+
5
+ - Check what the text asks: "a fraction equal to 1/2" accepts 2/4 and 3/6; "a conductor" accepts every conductor.
6
+ - "Order the steps" only where the order is fixed.
7
+ - A type that cannot accept every correct answer (ordering with a free order, single choice with two defensible
8
+ options) → another type or another text.
9
+
10
+ ## Write down first, in the content method
11
+
12
+ 1. The answers that fulfil the text, including correct ones other than yours.
13
+ 2. The typical wrong answers.
14
+ 3. The feedback for each.
15
+
16
+ ## Feedback on a wrong answer
17
+
18
+ - Every wrong option says why it does not fit.
19
+ - Computed tasks: 2–3 common mistakes, each with its message.
20
+ - Optionally a hint: where to look, not the answer.
21
+ - A component of your own: right or wrong, plus a short reason.
22
+
23
+ ## Examples as tests
24
+
25
+ - Each exercise lists other correct answers the text allows as accepted, and typical wrong ones as rejected. The
26
+ build runs them through the real check; learners never see them.
27
+ - An accepted example fails → the exercise checks the wrong thing: change the type or the check, not the example.
28
+ - The archetype's skill says the notation (`examples`, `mistakes`, component tests).
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: lernapps-app
3
+ description: Use in Explore, when a creator wants a learning app for lernapps.net, even if they only say "Lern-App", "Übungs-App" or "für meine Klasse". What every app on lernapps.net must be, how to choose an archetype, and where to read what each one can and cannot do.
4
+ license: MIT
5
+ ---
6
+
7
+ # lernapps app
8
+
9
+ ## What an app is
10
+
11
+ - A small learning app for school: static, runs in the browser, no account, no tracking, no ads, free.
12
+ - Accessible (WCAG 2.1 AA) and usable at 360 px. A deviation the idea needs (a time limit, a keyboard) is allowed; the
13
+ catalog entry then says it in `limits`.
14
+ - Other servers (video, map) only after the learner's click. Nothing about a real learner in any text.
15
+ - Published at its creator's own address, usually `https://<owner>.github.io/<repo>/`. Once listed, lernapps.net
16
+ serves a copy at `https://lernapps.net/apps/start/<id>/`, built from the commit the entry names; the creator stays the author.
17
+ - Licence that allows the copy (MIT or Apache 2.0 for code, CC BY 4.0 for content); files referenced relatively.
18
+
19
+ ## Rules
20
+
21
+ - Each rule is a section with a rule block: `id`, `scope`, `severity`. Follow every rule in scope, checked or not.
22
+ - Scope: `listing` every listed app; `tooling` every app built with `@lernapps/tooling`; `archetype:<name>` that
23
+ archetype.
24
+ - Severity: `error` never break; `warning` only with a reason in place; `hint` advice. At the listing, a `tooling`
25
+ rule counts as a warning.
26
+ - Each skill holds the rules of its phase. All rules: <https://lernapps.net/tooling/rules/>.
27
+
28
+ ## What each archetype can do
29
+
30
+ | Archetype | Learners … | Can and cannot (README of its template) |
31
+ |---|---|---|
32
+ | `quiz` | answer questions with options and feedback | <https://raw.githubusercontent.com/lernapps/app-templates/main/quiz/README.md> |
33
+ | `explainer` | read pages that explain, each with exercises | <https://raw.githubusercontent.com/lernapps/app-templates/main/explainer/README.md> |
34
+ | `interactive` | act in one app page, by turns or in real time | <https://raw.githubusercontent.com/lernapps/app-templates/main/interactive/README.md> |
35
+
36
+ ## Choose the archetype
37
+
38
+ - Choose after the interview topics "Goal" and "Learners", from what learners do. Read the patterns of the subject
39
+ first (skill `lernapps-exercise-patterns`): how learners practise points to the archetype.
40
+ - Before you choose, read the README of each archetype in question, in full. Tell the creator in plain words what the
41
+ chosen one can and cannot do, before you ask about content, amount and look.
42
+ - A few background sections on the start page keep an app `interactive`.
43
+ - Explanation pages with one interactive exercise → `explainer` with a component.
44
+
45
+ ## Gotchas
46
+
47
+ - A typing game or a trainer is `interactive`, never `explainer`.
48
+ - What an archetype cannot do is no plan task: tell the creator, choose another archetype or leave it out.
49
+ - The archetype decides what you may write later. Choose it from what learners do, not from what is quickest.
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: lernapps-commit
3
+ description: Use in Commit, when you bring the branch of the first version or an increment into main - the history of main stays linear (one squash commit per piece of work, never a merge commit) and every message is a conventional commit with the sections Intent, Key changes, Dependencies and side effects.
4
+ license: MIT
5
+ ---
6
+
7
+ # Commits of a lernapps app
8
+
9
+ ## Linear history
10
+
11
+ Bring a branch into `main` by squash: squash-merge its pull request, or `git switch main`, `git merge --squash <branch>`,
12
+ `git commit`. One piece of work is one commit on `main`; never a merge commit. The commit message of the squash
13
+ describes the whole piece of work, not the last step. When you merge yourself, you squash and write it.
14
+
15
+ ## Content from the plan
16
+
17
+ Do not invent the message: take it from the current plan (`.vibe/plans/<NN>-<short name>.md`). Intent comes from
18
+ "Goal", Key changes from "Key decisions" and the content method, Dependencies and side effects from "Notes". Write it
19
+ in the creator's terms, short.
20
+
21
+ ## Message
22
+
23
+ A conventional commit: `type(scope): summary` (`feat`, `fix`, `docs`, `refactor`, `test`, `chore`), imperative, under 72
24
+ characters. Then this body, in the language of the repo's history. Say why and what behaves differently; never list
25
+ files.
26
+
27
+ ```markdown
28
+ ## Intent
29
+
30
+ What problem does it solve? What was the motivation to introduce this change?
31
+
32
+ ## Key changes
33
+
34
+ The conceptual overview: how does the system behave differently now?
35
+
36
+ ## Dependencies and side effects
37
+
38
+ Only if applicable: effects on other parts of the system.
39
+ ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: lernapps-content-growth
3
+ description: Use in Plan of an increment that adds several competencies, chapters, pages, rounds or questions to a published lernapps.net app. How to cut the work into slices, one per competency, and which slices sub-agents can write in parallel without touching each other's files. For every archetype.
4
+ license: MIT
5
+ ---
6
+
7
+ # Content growth
8
+
9
+ ## One slice per competency
10
+
11
+ Each slice is one Code task and ends in one commit:
12
+
13
+ 1. Competency: into the content guide, in its chapter, as "Ich kann …", with its Lehrplan unit where used.
14
+ 2. Content: a page or section (explainer), questions (quiz), in the guide's structure.
15
+ 3. Exercise: a pattern of the guide, varied. A new pattern goes into the guide in the same slice, with example and
16
+ data file.
17
+ 4. Entry topic: the page or section path into the plan's entry draft (`entry-links-resolve`).
18
+ 5. Check: `npx lernapps check` passes.
19
+ 6. Commit, guide changes included.
20
+
21
+ - A new chapter or round: its slices in the order of the guide's procedure.
22
+ - The procedure no longer fits → its fix is part of the slice that shows it (`app-content-matches`).
23
+
24
+ ## Parallel slices
25
+
26
+ - No two agents change the same file.
27
+ - Yours alone: the content guide, the plan, the shared files (explainer `src/app.yaml`, each `chapter.yaml`,
28
+ `src/data/`; quiz `src/quiz.json`).
29
+ - A sub-agent's: one chapter (its pages, its own data file); in a quiz, the question drafts of one round.
30
+ - Each sub-agent works in its own git worktree, branch and browser port. You merge one by one, add the shared parts
31
+ and run the check.
32
+ - In Code, each sub-agent gets the brief `@lernapps/tooling/guidance/subagent-brief.md`, filled in. Write in Plan
33
+ which slices go to sub-agents.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: lernapps-github
3
+ description: Use in Commit, when a lernapps.net app or increment goes on GitHub and online, or a GitHub step fails - repo and branches, Pages from gh-pages, the preview pull request and its checks, bringing the branch into main, the run of the workflow Pages, the fork for the listing pull request. Which tool first, what you may do yourself, which click you ask the creator for.
4
+ license: MIT
5
+ ---
6
+
7
+ # GitHub
8
+
9
+ - Branches: `main` is published; `work` holds the first version until its publish (an increment:
10
+ `increment/<NN>-<short name>`); `gh-pages` is served. A push to `main` publishes.
11
+ - Until Commit everything is local. You do the GitHub part; the creator need not know GitHub. On request:
12
+ <https://lernapps.net/tooling/github/>.
13
+
14
+ ## Tools, in this order
15
+
16
+ 1. `gh` over REST: `gh api`, `gh run`, `gh workflow`. GraphQL may be blocked, and with it the commands that use it
17
+ (repo view, repo edit, pr create): that is no reason to drop `gh`; use `gh api`.
18
+ 2. GitHub MCP tools, if present.
19
+ 3. `curl -s https://api.github.com/repos/<owner>/<repo>/…`: public reads, no token.
20
+
21
+ ## 1. Repo and Pages (first version)
22
+
23
+ 1. Ask the creator in one message: the repo name (a later rename can cost your access), and, if you cannot create
24
+ repos or change Pages, the clicks below.
25
+ 2. No repo on GitHub: `gh api user/repos -f name=<repo>`. Refused → the creator creates an empty public repo and
26
+ gives you its address.
27
+ 3. `git remote add origin <address>`.
28
+ 4. No `main` on the remote: `git switch --orphan main`, `git commit --allow-empty -m "chore: start"`,
29
+ `git push -u origin main`.
30
+ 5. No `gh-pages`: `git switch --orphan gh-pages`, `git commit --allow-empty -m "chore: gh-pages"`,
31
+ `git push -u origin gh-pages`.
32
+ 6. `git switch work`; it has its own root: `git rebase --root --onto main`.
33
+ 7. Pages from `gh-pages`, root (`pages-from-gh-pages`):
34
+ `gh api -X POST repos/<owner>/<repo>/pages -f build_type=legacy -f "source[branch]=gh-pages" -f "source[path]=/"`.
35
+ Verify: `gh api repos/<owner>/<repo>/pages --jq '.build_type, .source.branch, .source.path'` prints `legacy`,
36
+ `gh-pages`, `/`. "Not Found" means off.
37
+ 8. Default branch: `gh api repos/<owner>/<repo> --jq .default_branch` prints `main`. Else (admin):
38
+ `gh api -X PATCH repos/<owner>/<repo> -f default_branch=main`.
39
+
40
+ ## 2. Preview and checks
41
+
42
+ 1. `git push -u origin <branch>`. The pre-push hook runs the heavy checks; fix failures (skill `lernapps-cli`).
43
+ 2. Open the pull request over REST:
44
+ `gh api repos/<owner>/<repo>/pulls -f base=main -f head=<branch> -f title=<"Erste Version" or the increment> -f body=Vorschau`.
45
+ Its comment "Vorschau der App" links the preview.
46
+ 3. Watch the checks of the head commit:
47
+ `gh api repos/<owner>/<repo>/commits/<sha>/check-runs --jq '.check_runs[] | [.name, .status, .conclusion]'`.
48
+ A check fails → `gh run view <id> --log-failed`; fix, commit, push. Green before the checkpoint "publish".
49
+
50
+ ## 3. Publish
51
+
52
+ 1. Only after the creator's yes at the checkpoint "publish".
53
+ 2. One squash commit on `main`, its message as skill `lernapps-commit` says; never a merge commit.
54
+ First version: `git switch main`, `git merge --squash work`, `git commit`, `git push origin main`; the pull
55
+ request closes with it. Increment: squash-merge its pull request
56
+ (`gh api -X PUT repos/<owner>/<repo>/pulls/<n>/merge -f merge_method=squash -f commit_title=… -f commit_message=…`).
57
+ 3. Run started? `gh run list --workflow Pages --branch main --commit "$(git rev-parse HEAD)"`. None after a minute
58
+ → `gh workflow run Pages --ref main`.
59
+ 4. Watch it: `gh run watch <id>`. It fails → read the failed step, fix, push.
60
+ 5. The job `deploy` prints "published at …" (also in the run summary). Use that address; follow redirects.
61
+
62
+ ## "403 Resource not accessible by integration"
63
+
64
+ - The token may not change this setting or start this run. It is a click for the creator; put it into your next
65
+ question, once:
66
+ - Pages: Settings → Pages → Build and deployment → Source: Deploy from a branch → Branch: gh-pages, folder:
67
+ / (root) → Save.
68
+ - Default branch: Settings → General → Default branch → ⇄ → main → Update.
69
+ - Run: Actions → Pages → Run workflow, or the run → Re-run all jobs.
70
+ - Never work around it: no dummy push, no new branch to pass a setting.
71
+
72
+ ## 4. Listing pull request from a fork
73
+
74
+ - Never push a branch to lernapps/apps, even if allowed. You open the pull request from the creator's fork at the
75
+ checkpoint "list", without asking first: it publishes nothing.
76
+ - Find the fork by its owner, never by its name (it may be renamed):
77
+ `curl -s "https://api.github.com/repos/lernapps/apps/forks?per_page=100" | jq -r '.[] | select(.owner.login=="<owner>") | .clone_url'`.
78
+ - No fork, or no access to it: first add the repos your environment needs (e.g. `add_repo` with push access for the
79
+ fork and lernapps/apps); then `gh repo fork lernapps/apps --clone=false`, or MCP. Only when both fail: the creator's
80
+ click (github.com/lernapps/apps → Fork), asked for once.
81
+ - Push `add-<id>` to the fork; open the pull request over REST:
82
+ `gh api repos/lernapps/apps/pulls -f base=main -f head=<owner>:add-<id> -f title=… -f body=…`.
83
+ - From a fork the pull request gets the results comment, but no preview.
84
+
85
+ ## Gotchas
86
+
87
+ - The creator merged the pull request themselves → no second merge: check the `Pages` run of that commit and confirm
88
+ the address.
89
+ - Never `git commit-tree` or `--no-verify` to get past a hook; an empty start commit passes the hook as it is.
90
+
91
+ ## `pages-from-gh-pages`: Publish from `gh-pages`, served from its root
92
+
93
+ ```rule
94
+ id: pages-from-gh-pages
95
+ scope: [archetype:explainer, archetype:interactive, archetype:quiz]
96
+ severity: error
97
+ ```
98
+
99
+ - GitHub Pages serves the branch `gh-pages` from `/`: usually `https://<owner>.github.io/<repo>/`; only repos of
100
+ the lernapps organisation at `https://lernapps.net/<repo>/`.
101
+ - Previews of pull requests go below `pr-preview/` on that branch: leave the setting.
102
+ - Hosted elsewhere → the entry's `url` points there.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: lernapps-listing
3
+ description: Use in Commit when the creator wants their app in the lernapps.net app overview, or when the listing pull request gets a results comment - even if they only say "eintragen" or "veröffentlichen". The steps to the listing pull request and how to act on its results.
4
+ license: MIT
5
+ ---
6
+
7
+ # Listing
8
+
9
+ - A pull request to [lernapps/apps](https://github.com/lernapps/apps) adds the app's entry.
10
+ - Rules: `entry-from-schema`, `entry-links-resolve`, `entry-fitness-matches` (skill `lernapps-cli`,
11
+ `references/platform-rules.md`).
12
+
13
+ ## Open the pull request
14
+
15
+ At the checkpoint "list", without asking first: the pull request publishes nothing and is the review. After
16
+ "bestanden", show the creator the pull request and its result; change nothing in it without their word.
17
+
18
+ 1. Follow the listing guide <https://lernapps.net/apps/enter/llms.txt> step by step: where the entry goes, how to
19
+ check it, how to open the pull request.
20
+ 2. Fill the entry from the plan's entry draft and <https://lernapps.net/apps/schemas/entry.v1.schema.json>, fetched
21
+ now. The schema describes every field.
22
+ 3. Run the check the guide names. Fix its findings first: the pull request runs the same check.
23
+ 4. Open the pull request from the creator's fork as skill `lernapps-github` says.
24
+
25
+ ## Results comment
26
+
27
+ - The listing guide says how to read it. Repeat until "bestanden".
28
+ - A fix of the app counts only once it is published (plan, Commit); then push to the pull request's branch.
29
+ - Then the owner of lernapps.net reviews and decides. Wait; tell the creator the comment and the decision.
30
+
31
+ ## After the merge
32
+
33
+ - lernapps.net builds a copy of the app from the entry's `commit` and serves it at
34
+ `https://lernapps.net/apps/start/<id>/`; the catalog links it once it is checked there. Tell the creator: the app
35
+ stays theirs, at their own address too.
36
+ - Tell the creator once how to keep the app up to date: two GitHub Apps and a few settings of their repo, in
37
+ [references/keeping-updated.md](references/keeping-updated.md). Without them the app gets no tooling updates, and
38
+ lernapps/apps lists it in an issue. It is advice; the listing does not wait for it.
39
+ - A new version needs no new pull request from you. Publish it as usual (plan, Commit). Once the app's address
40
+ serves the new commit, lernapps/apps opens an update pull request for the entry within about 30 minutes; the
41
+ listing check runs on it.
42
+ - It merges itself when nothing else changed than what `lernapps update` makes, versions of npm dependencies and
43
+ Markdown outside `src/` and `public/`. Anything else (content, code, workflows edited by hand, the licence) waits
44
+ for the owner's review. Tell the creator which of the two to expect.
@@ -0,0 +1,33 @@
1
+ # Keeping a listed app up to date
2
+
3
+ Tell the creator once, at the listing. It is advice; the listing does not wait for it. The creator owns the repo, so
4
+ these are their clicks. Offer to go through them together.
5
+
6
+ ## 1. Two GitHub Apps, on the app's repo only
7
+
8
+ Each opens a page: choose the creator's account, "Only select repositories", the app's repo, Install.
9
+
10
+ - `https://github.com/apps/lernapps-updater/installations/new`: every day lernapps/apps runs `lernapps update` in the
11
+ app and opens a pull request that merges once the app's check is green. Without it the app gets no tooling updates,
12
+ and lernapps/apps lists it in an issue.
13
+ - `https://github.com/apps/renovate/installations/new`: third-party packages, using the app's `renovate.json`. The
14
+ file does nothing without the App.
15
+
16
+ ## 2. Pull request settings
17
+
18
+ Settings → General → Pull Requests: select **Allow auto-merge** and **Allow squash merging** (a linear history
19
+ needs squash or rebase).
20
+
21
+ ## 3. One ruleset for `main`
22
+
23
+ Settings → Rules → Rulesets → New ruleset → New branch ruleset. Name `main`, enforcement **Active**, Target branches
24
+ → Add a target → include the default branch (pattern `main`). Rules:
25
+
26
+ - **Require a pull request before merging**: no approvals needed; as merge type squash.
27
+ - **Require linear history**.
28
+ - **Require status checks to pass before merging**: add the check `app` (the job of the workflow `Pages`). GitHub
29
+ offers a check only after it has run once, so the app must have had a pull request or a push first.
30
+ - **Block force pushes** (on by default).
31
+ - Bypass list → Add bypass → the repository admins, so the creator can still push by hand.
32
+
33
+ A required check the repo does not produce blocks every pull request for good: use `app`, no other name.