Check if a topic covers basic "what is" questions and add missing fundamentals
Ensure the topic has basic introductory questions like "What is X?", "What does X do?", "When should you use X?" before edge-cases and advanced scenarios. If these basics are missing, generate them.
src/lib/questions/index.ts to find the TOPICS array and locate the topic file for $ARGUMENTS.Topic: <name>
Total questions: N
Definition questions: N (list them briefly)
When/Why questions: N (list them briefly)
How questions: N
Code output questions: N
Edge-case/Advanced: N
For the topic, brainstorm the core concepts a beginner must know. For example, for "Type Casting":
Check which of these core concepts already have a basic question. List the gaps: concepts that have no basic introductory question.
If there are 0 gaps, report "All fundamentals covered!" and stop.
For each gap, generate one question. Follow the same rules as the generate-quiz skill:
Question interface from src/lib/questions/types.tsnode -e "const fs=require('fs'),path=require('path'),dir='src/lib/questions';const ids=fs.readdirSync(dir).filter(f=>f.endsWith('.ts')&&f!=='index.ts'&&f!=='types.ts').flatMap(f=>[...fs.readFileSync(path.join(dir,f),'utf8').matchAll(/id:\s*(\d+)/g)].map(m=>+m[1]));console.log('Max ID:',Math.max(...ids),'Total:',ids.length)"
// ── $ARGUMENTS fundamentals (Q{firstId}–Q{lastId}) ──questions array.Run the same validation as generate-quiz:
node -e "
const fs=require('fs'),path=require('path'),dir='src/lib/questions';
const src=fs.readdirSync(dir).filter(f=>f.endsWith('.ts')&&f!=='index.ts'&&f!=='types.ts').map(f=>fs.readFileSync(path.join(dir,f),'utf8')).join('\n');
const ids = [...src.matchAll(/id:\s*(\d+)/g)].map(m=>parseInt(m[1]));
console.log('Total questions:',ids.length);
console.log('Duplicate IDs:',ids.length-new Set(ids).size);
"
npx tsc --noEmit src/lib/questions/index.ts
If any check fails, fix the issues before finishing.
After validation passes, commit with message:
Add N <topic> fundamentals questions (Q{first}-Q{last}), total now {total}