What AI can create new components of, what requires human engineering, and how to make components reusable.
These components can be generated by AI if given enough context. Human must verify correctness.
| Component | AI Needs | AI Can Generate | Human Must Verify |
|---|---|---|---|
CodeBlock |
Language, code, explanation | Syntax-highlighted code | Code actually works |
Quiz |
Question, correct answer, distractors | Question + options | Options are plausible |
FillInBlank |
Text, blanks | Text with blanks highlighted | Blanks are appropriate |
HexDump |
Binary data, field definitions | Hex view with highlights | Byte offsets correct |
MemoryLayout |
Variables, types, addresses | Stack/heap diagram | Addresses correct |
Flowchart |
Process steps, decisions | SVG diagram | Logic matches spec |
ComparisonTable |
Features, options | HTML table | Facts correct |
Glossary |
Terms, definitions | Term list | Definitions accurate |
Definition |
Term, definition, source | Term + definition block | Definition accurate |
KeyTakeaway |
Concepts, importance | Bullet list | Points are key |
Timeline |
Events, dates, descriptions | Chronological list | Dates correct |
SpecReference |
Spec, section, quote | Citation block | Quote matches spec |
Verification method: Check each fact against source material.
These components need human-created templates. AI fills in the content.
| Component | Template Needed | AI Fills In | Human Must Verify |
|---|---|---|---|
DebuggingExercise |
Bug template, hint template | Specific bugs, hints | Bugs are realistic |
CodeChallenge |
Test template, stub template | Code, tests, solution | Tests pass correctly |
CodeCompletion |
Blank template | Code with blanks, answers | Blanks test understanding |
Ordering |
Item template | Steps, correct order | Order is correct |
Matching |
Pair template | Items, correct pairs | Pairs are meaningful |
Hotspot |
Zone template | Zones, correct areas | Areas are accurate |
Verification method: Run the exercise, check all paths work.
These components require custom JavaScript engineering. AI cannot generate them.
| Component | Why Human Needed | Engineering Effort |
|---|---|---|
CodeEditor |
Complex state, syntax highlighting | High (CodeMirror integration) |
CodeExecution |
Sandboxed execution environment | High (WASM or server) |
Simulation |
Physics/logic engine | High (custom engine) |
InteractiveDemo |
Custom interaction logic | Medium-High (per demo) |
Console |
REPL environment | Medium (readline, eval) |
AnimatedDemo |
Animation framework | Medium (CSS/JS animation) |
Verification method: Full integration testing.
Every component must work without external context:
GOOD:
@component("quiz")
var quiz = Quiz {
question: "What does EI_CLASS mean?",
options: [
{ text: "File class (32/64 bit)", correct: true },
{ text: "Endianness", correct: false }
],
explanation: "EI_CLASS at offset 4 identifies..."
}
BAD:
@component("quiz")
var quiz = Quiz {
question: "What does this field mean?",
options: [...] // Which field? Depends on context.
}
Components don't reference other components or the course:
GOOD:
@component("definition")
var def = Definition {
term: "ELF",
definition: "Executable and Linkable Format"
}
BAD:
@component("definition")
var def = Definition {
term: "ELF",
definition: "As we discussed in the previous section..."
}
Every component must have:
@component("quiz")
@difficulty 2 // Cognitive load: 1-5
@timeEstimate 30 // Seconds to complete
@prerequisites ["bytes"] // Required knowledge
@learningObjective "Identify EI_CLASS field"
@verificationStatus verified // verified/unverified/disputed
@source "gABI v1.0, Section 4" // Authority
Components compose into lessons, not the other way around:
Lesson
├── Paragraph (intro)
├── Definition (term)
├── CodeBlock (example)
├── HexDump (visual)
├── Quiz (check)
├── KeyTakeaway (summary)
└── FillInBlank (practice)
{
"topic": "ELF Header",
"concept": "EI_CLASS field",
"source": "gABI v1.0, Section 4.1.1",
"prerequisites": ["bytes", "binary", "file-layout"],
"learningObjective": "Identify and explain the EI_CLASS field",
"difficulty": 2,
"existingComponents": ["paragraph-intro", "hex-dump-identification"]
}AI generates components in this order:
Paragraph— introduction textDefinition— key termsCodeBlock— code exampleHexDump— visual representationQuiz— knowledge checkFillInBlank— practiceKeyTakeaway— summary
For each component:
1. Fact check
- Does the code compile/run?
- Are byte offsets correct?
- Are definitions accurate?
2. Pedagogical check
- Does this teach the concept?
- Is the difficulty appropriate?
- Are the distractors plausible?
3. Consistency check
- Does it use the same terminology?
- Does it match the source?
- Does it build on prerequisites?
If verification fails:
1. Identify what's wrong
2. Gather more context (read source again)
3. Regenerate with better context
4. Re-verify
5. Repeat until correct
New component types must be registered:
{
"type": "hex-dump",
"version": "1.0.0",
"description": "Binary data viewer with field highlighting",
"category": "code",
"difficulty": 2,
"requiredFields": ["data"],
"optionalFields": ["highlights", "baseAddress", "endian"],
"htmlTemplate": "hex-dump.html",
"jsClass": "HexDumpComponent",
"cssClass": "hex-dump",
"verificationMethod": "compare-to-reference",
"aiGeneratable": true,
"reusable": true
}components/
├── content/ # Information delivery
│ ├── paragraph/
│ ├── heading/
│ ├── callout/
│ ├── definition/
│ └── key-takeaway/
├── code/ # Technical content
│ ├── code-block/
│ ├── code-callout/
│ ├── hex-dump/
│ ├── memory-layout/
│ └── file-tree/
├── interactive/ # Learner engagement
│ ├── quiz/
│ ├── fill-in-blank/
│ ├── drag-drop/
│ ├── ordering/
│ └── matching/
├── assessment/ # Evaluation
│ ├── multiple-choice/
│ ├── free-response/
│ ├── debugging-exercise/
│ └── code-challenge/
├── reference/ # Lookup
│ ├── glossary/
│ ├── cheat-sheet/
│ ├── api-reference/
│ └── spec-reference/
└── visualization/ # Visual learning
├── flowchart/
├── memory-diagram/
├── file-format-diagram/
└── animated-demo/
Each component directory contains:
components/quiz/
├── README.md # Description, use cases
├── schema.json # Data structure definition
├── template.html # HTML template
├── style.css # Component styles
├── component.js # JS class
├── examples/ # Example instances
│ ├── basic.json
│ └── with-explanation.json
└── tests/ # Verification tests
├── schema.test.js
└── rendering.test.js