{ "id": "04-ai", "title": "The AI assistant", "icon": "🤖", "level": "intermediate", "lessons": [ { "id": "4.1", "title": "Ask, and let it use tools", "objective": "Use the AI assistant and understand the confirmation boundary.", "minutes": 9, "commands": [ "ai", "ask", "ai-config", "ai-model" ], "blocks": [ { "type": "text", "text": "`ai` and `ask` open the tool-calling assistant. It can read files, run safe commands and search the web." }, { "type": "cmd", "text": "ai what can you do?" }, { "type": "text", "text": "Destructive actions (writes, `sed -i`, deletes) require confirmation. AI-initiated commands run with a loop guard so they cannot recurse." }, { "type": "cmd", "text": "ai-model" }, { "type": "cmd", "text": "ai-config" } ], "exercise": { "instruction": "Ask the AI a short question.", "accept": [ "ai *", "ask *" ], "check": { "type": "command" }, "hint": "Type: ai \"hello\"" }, "quiz": { "q": "What happens when the AI wants a destructive command?", "options": [ "runs silently", "asks for confirmation", "restarts the terminal" ], "answer": 1 }, "sources": [ "modules/core/module-aiassist.js", "modules/core/ollama-manager.js" ] }, { "id": "4.2", "title": "Context, memory and skills", "objective": "Inspect and clear context, then browse the skill library the AI retrieves from.", "minutes": 8, "commands": [ "ai-context", "ai-clear", "skill-list", "skill-validate", "learn-skill" ], "blocks": [ { "type": "text", "text": "The assistant keeps recent context. `ai-context` shows it; `ai-clear` resets it without touching your files." }, { "type": "cmd", "text": "ai-context" }, { "type": "cmd", "text": "skill-list" }, { "type": "text", "text": "Skills are markdown entries in `/skills/` indexed by `/skills/index.json`; `load_skills` retrieves them by query." }, { "type": "cmd", "text": "skill-validate course-01-orientation" }, { "type": "tip", "text": "This course installs its chapters as `course-*` skills, so the AI can teach what you are reading." } ], "exercise": { "instruction": "List the installed skills.", "accept": [ "skill-list" ], "check": { "type": "command" }, "hint": "Type: skill-list" }, "quiz": { "q": "Where does the skill index live?", "options": [ "/skills/index.json", "/etc/skills", "localStorage only" ], "answer": 0 }, "sources": [ "modules/ext/skill-pack-core.js", "modules/core/module-aiassist.js" ] } ] }