#!/usr/bin/env python3
"""Generate 28-Day AI Mastery Course HTML - Part 1: Structure + CSS + Cover + TOC + How To Use"""

import json

# All 28 days data
days_data = [
    # WEEK 1
    {"day": 1, "week": 1, "week_title": "AI FOUNDATIONS", "title": "What Is AI, Really?",
     "objective": "Understand the fundamental concepts behind artificial intelligence, including machine learning, neural networks, and the difference between narrow and general AI. By the end of today, you will have a clear mental model of how AI actually works beneath the hype.",
     "lesson": """Artificial intelligence is not magic, and it is not science fiction come to life. At its core, AI is software that can learn patterns from data and make decisions or predictions based on those patterns. The field has existed since the 1950s, but recent breakthroughs in computing power, data availability, and algorithm design have made AI practical and accessible for everyday use.

Machine learning (ML) is the most important subset of AI for you to understand. Traditional software follows explicit rules written by programmers: if X happens, do Y. Machine learning flips this around. Instead of writing rules, you feed the system thousands or millions of examples, and it figures out the rules on its own. A spam filter, for instance, learns what spam looks like by analyzing millions of emails labeled as spam or not-spam, rather than following a checklist someone typed out.

Neural networks are the engine behind most modern AI. Inspired loosely by the human brain, a neural network is a series of mathematical layers that transform input data into useful output. When you type a question into ChatGPT, your text passes through billions of these mathematical connections, each one slightly adjusting the signal until a coherent answer emerges on the other side. The network learned these connections by processing enormous amounts of text from books, websites, and other sources during a phase called training.

There is a critical distinction between narrow AI and artificial general intelligence (AGI). Every AI tool you use today, including ChatGPT, image generators, and voice assistants, is narrow AI. It excels at specific tasks but cannot truly reason, understand context the way humans do, or transfer skills across domains without retraining. AGI, a system that could match or exceed human intelligence across all domains, does not yet exist. Understanding this distinction protects you from both overhyping and underestimating these tools. They are extraordinarily powerful within their lane, and knowing that lane is the first step to using them effectively.""",
     "concepts": ["Machine Learning: software that learns patterns from data instead of following hardcoded rules", "Neural Networks: layered mathematical systems that transform inputs into predictions", "Training Data: the examples an AI learns from, which directly shape its capabilities and biases", "Narrow AI vs AGI: current tools are task-specific (narrow), not generally intelligent", "Large Language Models (LLMs): neural networks trained on massive text datasets to generate human-like language"],
     "tool_name": "ChatGPT", "tool_purpose": "Conversational AI for text generation, Q&A, brainstorming, and learning", "tool_url": "https://chat.openai.com", "tool_try": "Ask ChatGPT to explain a concept you find difficult in three different ways: for a child, for a teenager, and for a professional",
     "challenge": "Have a 5-minute conversation with ChatGPT about a topic you know well. Notice where it is accurate, where it struggles, and where it surprises you. Write down three observations about its strengths and limitations.",
     "pro_tip": "AI tools are most powerful when you treat them as a skilled collaborator rather than an oracle. They generate plausible text, not verified truth. Always bring your own judgment to the table.",
     "reflection": "What assumptions did you have about AI before today? Which ones changed after learning how it actually works?"},

    {"day": 2, "week": 1, "week_title": "AI FOUNDATIONS", "title": "The AI Tools Landscape",
     "objective": "Map out the major AI tools available today, understand their strengths, limitations, and free tiers, and learn when to reach for each one. You will leave today with a practical decision framework for choosing the right tool.",
     "lesson": """The AI landscape in 2025 is rich with options, and knowing which tool to use for which task will save you hours every week. The three dominant large language models are OpenAI's ChatGPT, Anthropic's Claude, and Google's Gemini. Each has distinct strengths worth understanding.

ChatGPT, built on OpenAI's GPT-4 architecture, is the most widely known and versatile. Its free tier gives you access to GPT-4o, which handles writing, coding, analysis, and creative tasks well. ChatGPT excels at following complex multi-step instructions and has a massive ecosystem of custom GPTs built by other users. Its weakness is that it can be confidently wrong, a trait called hallucination, and its knowledge has a training cutoff date. The Plus plan at twenty dollars per month unlocks higher usage limits and priority access.

Claude, made by Anthropic, has earned a reputation for longer, more nuanced responses and better handling of lengthy documents. Claude can process up to 200,000 tokens of context, meaning you can paste entire reports or books and ask questions about them. It tends to be more cautious and thoughtful in its responses, which makes it excellent for research, analysis, and writing that requires careful reasoning. Its free tier is generous, and the Pro plan matches ChatGPT's pricing.

Google Gemini integrates deeply with Google's ecosystem: Gmail, Docs, Drive, Search, and YouTube. If your workflow already lives in Google, Gemini offers a seamless experience. It also has strong multimodal capabilities, handling images, video, and text together naturally. The free tier is solid, and the Advanced plan bundles 2TB of Google One storage.

Beyond text models, specialized tools serve specific needs. Perplexity AI combines search with AI for research tasks, providing sourced answers. Midjourney and DALL-E generate images from text. ElevenLabs handles voice synthesis. The key principle is this: there is no single best AI tool. The best tool is the one that fits your specific task, workflow, and budget. Start free, learn the patterns, then invest where you see real returns.""",
     "concepts": ["ChatGPT: best all-rounder, strong at instruction-following and creative tasks", "Claude: excels at long documents, research, and careful reasoning", "Gemini: deeply integrated with Google workspace and strong at multimodal tasks", "Free Tiers: all major tools offer free access, enough to learn and evaluate", "Tool Selection: match the tool to the task rather than picking one for everything"],
     "tool_name": "Claude", "tool_purpose": "Long-form analysis, research, document processing, and nuanced writing", "tool_url": "https://claude.ai", "tool_try": "Paste a long article or report into Claude and ask it to summarize the key arguments, identify weaknesses, and suggest counterpoints",
     "challenge": "Open ChatGPT, Claude, and Gemini side by side. Ask all three the same question about a topic you care about. Compare the responses for accuracy, depth, tone, and usefulness. Decide which you prefer for this type of task.",
     "pro_tip": "Do not marry one tool. Power users maintain accounts on multiple platforms and route tasks to whichever tool handles them best. A two-minute tool switch can save twenty minutes of frustration.",
     "reflection": "Which AI tool felt most natural to you, and why? What does your preference reveal about your working style?"},

    {"day": 3, "week": 1, "week_title": "AI FOUNDATIONS", "title": "The Art of Prompting",
     "objective": "Master the anatomy of effective prompts, learn role prompting and context-setting techniques, and develop an iterative approach that consistently produces high-quality AI outputs.",
     "lesson": """The single most important skill in working with AI is prompting. The same AI model can produce mediocre or exceptional results depending entirely on how you communicate with it. A prompt is not just a question; it is an instruction set that shapes the AI's entire response.

Every effective prompt has four components: role, context, task, and format. The role tells the AI who to be. Saying 'You are a senior marketing strategist with 15 years of experience in B2B SaaS' produces dramatically different output than a bare question. The AI adjusts its vocabulary, depth, and perspective to match the role you assign. Context provides the background information the AI needs. The more relevant context you provide, the more targeted the response. Task is your specific request, and format tells the AI how to structure its answer: bullet points, a table, a step-by-step guide, a specific word count.

Iteration is where most beginners fall short. Your first prompt rarely produces the perfect result, and that is completely normal. Treat AI interaction as a conversation, not a vending machine. Start with a solid prompt, evaluate the response, then refine. You might say: 'This is good, but make the tone more conversational' or 'Expand on point three with specific examples' or 'Rewrite this as if explaining to someone with no technical background.' Each refinement gets you closer to exactly what you need.

Advanced prompting includes techniques like chain-of-thought, where you ask the AI to show its reasoning step by step, which improves accuracy on complex problems. Few-shot prompting means providing examples of the output format you want. Zero-shot means asking without examples. Negative prompting tells the AI what to avoid: 'Do not use jargon. Do not start with In today is world.' These constraints often matter more than positive instructions because they prevent the AI from falling into its default patterns, which tend toward generic, safe language.""",
     "concepts": ["The Four Components: role, context, task, and format make up an effective prompt", "Role Prompting: assigning the AI a specific persona dramatically changes output quality", "Iterative Refinement: treat prompting as a conversation, not a single request", "Chain-of-thought: asking the AI to reason step-by-step improves accuracy on complex tasks", "Negative Prompting: telling the AI what to avoid is often more powerful than what to include"],
     "tool_name": "ChatGPT or Claude", "tool_purpose": "Practice prompt engineering with immediate feedback", "tool_url": "https://chat.openai.com", "tool_try": "Write the same request three ways: a basic version, one with role and context, and one with full RCTF (role, context, task, format). Compare the outputs.",
     "challenge": "Create a prompt using all four components (role, context, task, format) to generate a professional email declining a meeting politely. Then iterate three times, refining the result each time. Save your final prompt as a template.",
     "pro_tip": "Build a personal prompt library. Every time you craft a prompt that produces excellent results, save it in a note or document with tags. Within a month, you will have a reusable toolkit that makes you dramatically faster.",
     "reflection": "How did the quality of output change between your basic prompt and your fully structured one? What element made the biggest difference?"},

    {"day": 4, "week": 1, "week_title": "AI FOUNDATIONS", "title": "AI for Writing",
     "objective": "Learn to use AI as a writing partner for emails, social media posts, scripts, and long-form content while maintaining your authentic voice and personal style.",
     "lesson": """AI is not here to replace your writing. It is here to eliminate the blank-page problem, speed up your first drafts, and handle the repetitive writing tasks that drain your creative energy. The key is knowing when to let AI lead and when to take the wheel yourself.

For emails, AI excels at generating professional responses quickly. Instead of staring at a reply for ten minutes, describe the situation and tone you need: 'Write a polite but firm response to a client who wants a discount. We cannot offer one, but we can add a bonus feature.' You get a solid draft in seconds, then spend one minute personalizing it. For social media, AI can generate dozens of caption variations, hashtag sets, and content hooks. The trick is to feed it your existing content first, so it learns your tone. Paste five of your best posts and say: 'Study the tone, vocabulary, and structure of these posts. Now write ten new posts in the same style about [topic].'

Maintaining your voice is the biggest challenge and the most important skill. Generic AI output sounds like generic AI output, and your audience will notice. The solution is a voice document: a brief description of your writing style that you include in every prompt. Mine might say: 'Write in a direct, conversational tone. Use short sentences. Avoid corporate jargon. Be opinionated. Use specific examples over vague claims.' This document becomes your most valuable AI asset because it transforms every tool from a generic writer into your personal ghostwriter.

Long-form content benefits from a different workflow. Instead of asking AI to write an entire article, use it as a structural partner. Ask it to outline your ideas, then expand each section one at a time. You provide the insights and expertise; AI handles the scaffolding and polish. This hybrid approach produces content that sounds like you, reads professionally, and takes half the time. Always do a final pass yourself, reading aloud is the best test for catching AI-isms that slipped through.""",
     "concepts": ["Draft Acceleration: use AI to eliminate blank-page paralysis and speed up first drafts", "Voice Documents: a written description of your style that you include in prompts to maintain authenticity", "Batch Generation: create multiple variations of captions, emails, or hooks and pick the best", "Hybrid Writing: you provide insights and direction, AI handles structure and polish", "The Read-Aloud Test: reading AI output aloud catches unnatural phrasing that scanning misses"],
     "tool_name": "Claude", "tool_purpose": "Long-form writing assistance with nuanced tone matching", "tool_url": "https://claude.ai", "tool_try": "Paste three examples of your writing and ask Claude to analyze your style. Then ask it to write a new piece matching that analysis.",
     "challenge": "Create your personal voice document: a 100-200 word description of how you write, including tone, vocabulary preferences, sentence length, and what you always avoid. Test it by having AI write a short post with and without the voice document attached.",
     "pro_tip": "Never publish AI-generated text without editing it. The goal is not zero effort, it is 80% less effort. That last 20% of human polish is what separates content that connects from content that gets scrolled past.",
     "reflection": "Does AI-assisted writing feel like cheating to you? Why or why not? Where is the line between using a tool and losing your authentic voice?"},

    {"day": 5, "week": 1, "week_title": "AI FOUNDATIONS", "title": "AI for Research",
     "objective": "Build efficient research workflows using AI to find, verify, summarize, and synthesize information faster than traditional methods while maintaining accuracy and critical thinking.",
     "lesson": """Research is one of AI's strongest use cases, but it requires a different approach than simply Googling. AI can compress hours of reading into minutes, but only if you know how to verify its outputs and structure your research process.

Start with AI-powered search tools rather than pure chatbots when you need factual, sourced information. Perplexity AI searches the web in real-time and provides sourced answers with clickable citations. This is fundamentally different from ChatGPT, which generates responses from its training data without accessing current information unless you enable web browsing. For time-sensitive research, trending topics, or anything requiring current data, always use a tool with live web access.

For document research, Claude is currently the strongest option. You can upload PDFs, paste lengthy articles, or share entire reports and ask targeted questions. The workflow is straightforward: upload your source material, then ask specific questions. 'What are the three main arguments in this paper? What evidence supports each one? What are the weaknesses in the methodology?' This structured questioning approach extracts insights much faster than reading the entire document yourself, especially for initial triage when you are deciding which sources deserve deep reading.

The critical skill is verification. AI can and does make up facts, cite nonexistent studies, and present plausible-sounding information that is completely wrong. Your verification workflow should include three steps: first, check any specific claims or statistics against primary sources. Second, cross-reference key points across multiple AI tools, as different models trained on different data may flag issues the other misses. Third, apply common sense. If a claim sounds surprising, it deserves extra scrutiny. Building this verification habit takes deliberate practice, but it is what separates someone who uses AI for research from someone who copies AI's mistakes.""",
     "concepts": ["AI Search vs AI Chat: tools like Perplexity search live web; chatbots rely on training data", "Document Analysis: upload full documents and ask targeted questions for rapid insight extraction", "The Verification Workflow: check claims against primary sources, cross-reference, apply judgment", "Research Triage: use AI to quickly assess which sources deserve your deep reading time", "Synthesis: AI can combine insights from multiple sources into coherent summaries"],
     "tool_name": "Perplexity AI", "tool_purpose": "AI-powered web search with real-time sourced answers and citations", "tool_url": "https://perplexity.ai", "tool_try": "Research a topic you are curious about using Perplexity. Click through at least three of its cited sources to verify the accuracy.",
     "challenge": "Pick a topic relevant to your work. Research it using three different methods: a traditional Google search (10 minutes), a Perplexity AI search (5 minutes), and a ChatGPT conversation (5 minutes). Compare the quality, depth, and accuracy of what you found each way.",
     "pro_tip": "Use AI to create research briefs, not final answers. Ask it to outline what you should investigate, what questions to ask, and what sources to look for. Then do the actual verification yourself. This gives you speed without sacrificing accuracy.",
     "reflection": "How do you currently verify information you read online? Has learning about AI hallucination changed how you think about digital information in general?"},

    {"day": 6, "week": 1, "week_title": "AI FOUNDATIONS", "title": "AI for Organization",
     "objective": "Transform how you manage notes, meetings, and projects by integrating AI into your organizational workflows. Learn to capture, structure, and retrieve information more efficiently.",
     "lesson": """Disorganization is one of the biggest productivity killers, and AI is exceptionally good at bringing order to chaos. From meeting notes to project plans, AI can handle the tedious organizational work that most people avoid, leaving you free to focus on thinking and doing.

Meeting summaries are a perfect entry point. Tools like Otter.ai, Fireflies.ai, and even built-in features in Zoom and Google Meet can transcribe meetings in real-time and generate structured summaries with action items. But you do not need a specialized tool. After any meeting, you can paste your rough notes into ChatGPT or Claude and say: 'Transform these meeting notes into a structured summary with sections for key decisions, action items with owners and deadlines, open questions, and next steps.' This takes raw, messy notes and makes them immediately actionable.

Project planning benefits enormously from AI assistance. Describe your project goal and constraints, and AI can generate a work breakdown structure, timeline, risk assessment, and resource list. This does not replace experienced project management judgment, but it gives you a comprehensive starting point that would otherwise take hours to draft. The trick is to be specific about your constraints: budget, timeline, team size, and existing resources. The more context the AI has about your real situation, the more practical its suggestions will be.

Note-taking and knowledge management get a boost when you use AI to process and connect information. At the end of each week, paste your accumulated notes into AI and ask it to identify themes, connections between ideas, and potential action items you may have missed. This synthesis step turns scattered observations into structured insights. You can also use AI to create standard operating procedures from your existing knowledge. Describe how you do something, and AI will format it into a clear, step-by-step SOP that you can share with your team or reference later.""",
     "concepts": ["Meeting Summarization: transform raw notes into structured summaries with action items", "Work Breakdown: AI can generate project plans, timelines, and risk assessments from goal descriptions", "Knowledge Synthesis: periodically feed accumulated notes to AI to find themes and connections", "SOP Creation: describe your processes verbally and let AI format them into clear procedures", "Template Building: create reusable organizational templates for recurring tasks"],
     "tool_name": "Notion AI", "tool_purpose": "AI-enhanced workspace for notes, projects, documents, and knowledge management", "tool_url": "https://notion.so", "tool_try": "Create a meeting notes template in Notion with AI-assisted summarization. Or paste messy notes into Claude and ask for a structured summary with action items.",
     "challenge": "Take the messiest set of notes you currently have, whether meeting notes, project ideas, or research dumps. Feed them to an AI tool and ask it to organize them into a clear structure with categories, priorities, and next actions.",
     "pro_tip": "Build an end-of-day AI review habit. Spend five minutes pasting your day's notes and communications into AI and asking: What did I accomplish? What is still open? What should I prioritize tomorrow? This small habit compounds into massive clarity over weeks.",
     "reflection": "Where does information go to die in your current workflow? What is the one organizational pain point that, if solved, would save you the most time?"},

    {"day": 7, "week": 1, "week_title": "AI FOUNDATIONS", "title": "Week 1 Review and Your First AI Win",
     "objective": "Consolidate everything you learned in Week 1, identify your strongest takeaway, and complete your first real-world AI implementation that saves you measurable time or produces measurable value.",
     "lesson": """You have covered an enormous amount of ground this week. You understand what AI actually is beneath the marketing hype, you know the major tools and when to use each one, you can write structured prompts that produce quality output, and you have frameworks for using AI in writing, research, and organization. Now it is time to make it stick by applying it.

The gap between knowing about AI and using AI effectively is execution. Studies consistently show that people retain approximately 10% of what they read but 75% of what they practice. This entire course is built on that principle, but today is especially important because you are going to choose one specific workflow in your daily life and permanently upgrade it with AI.

Your First AI Win should be small, specific, and immediately valuable. Do not try to reinvent your entire workflow. Pick one task that you do at least weekly, that takes more than fifteen minutes, and that involves text in some way. Common winners include: writing weekly status update emails, summarizing articles or reports you need to read, drafting social media posts for the week, organizing meeting notes, or creating outlines for presentations. Take that single task and build an AI-assisted version of it today. Write the prompt, test it, refine it, save the prompt as a template, and document how much time it saved.

The reason this matters is habit formation. Research on behavior change shows that a single successful experience with a new tool creates a reference point your brain can return to. Every time you face a similar task in the future, you will remember that AI made it faster and better. This reference point is the seed that grows into consistent AI usage. Without it, the knowledge from this week fades into that sounds interesting but I never got around to using it territory. Your challenge today is not optional, it is the foundation that everything else in this course builds on.""",
     "concepts": ["The Knowledge-Application Gap: knowing about AI is worthless without consistent practice", "Small Wins Strategy: pick one specific, recurring task and permanently upgrade it with AI", "Prompt Templates: save successful prompts for reuse to build long-term efficiency", "Time Documentation: measure and record time saved to build motivation for continued use", "Habit Anchoring: attach AI usage to existing workflows rather than creating entirely new ones"],
     "tool_name": "Your Choice", "tool_purpose": "Whichever AI tool best fits the workflow you chose to upgrade", "tool_url": "https://chat.openai.com", "tool_try": "Use the tool that worked best for you this week on your chosen First AI Win task",
     "challenge": "Complete your First AI Win. Choose one recurring task, build an AI-assisted workflow for it, save your prompt template, and document: what the task is, how long it used to take, how long it takes now, and what your saved prompt looks like. Share your win with someone.",
     "pro_tip": "The best AI workflow is the one you actually use. Perfection is the enemy of adoption. A slightly imperfect prompt that you use every week beats a perfect prompt that you spent an hour crafting and never touched again.",
     "reflection": "Which concept from this week surprised you the most? What is the one thing you will definitely keep doing with AI going forward?"},
]

# Save as JSON for part 2 to pick up
with open('/home/melai/Documents/days_data.json', 'w') as f:
    json.dump(days_data, f)

print(f"Part 1: Saved {len(days_data)} days data")
