ID:WORK-008Status:pendingPriority:mediumComplexity:unknown
Build exercise Rune
Summary
Practice problem with a prompt, optional hints, and a revealable solution. Encourages active learning.
Attributes
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
difficulty | String | 'medium' | No | easy, medium, hard |
points | Number | — | No | Point value (for graded contexts) |
type | String | 'open' | No | open (free response), code (expects code), multiple-choice |
Content Model
- First paragraph/section → the problem prompt
## Hintsor## Hintheading → progressive hints (each child is one hint, revealed sequentially)## Solutionheading → the solution (hidden by default, revealed on click)- Code fences in the solution section get syntax highlighting
Transform Output
- typeof:
Exercise - Tag:
<article> - Properties:
difficulty,points,type - Refs:
prompt(div),hints(ol, each li is a hint),solution(div, initially hidden)
Implementation Tasks
- Create schema in
runes/learning/src/tags/exercise.ts - Add RuneConfig entry in
runes/learning/src/config.ts - Write CSS in
packages/lumina/styles/runes/exercise.css - Import CSS in
packages/lumina/index.css - Add hint revelation + solution toggle behaviors in
packages/behaviors/ - Write tests in
runes/learning/test/tags/exercise.test.ts - Create inspector fixture
Dependencies
- Hint revelation and solution toggle need JS — candidate for
@refrakt-md/behaviors