{"success":true,"course":{"all_concepts_covered":["Claude Code terminal agent loop and failure attribution","Permission posture design with allowlists and approvals","Durable repo instructions with CLAUDE.md rules","Validation-driven iteration and context hygiene (/context, /clear, /compact)","Composable workflows with hooks, parallelism, and isolation","Secrets safety for tool-connected agents","MCP integration trade-offs (trust, token growth, sub-agents)","Unattended automation patterns for CI-style runs"],"assembly_rationale":"The course is built around the two levers that most improve professional outcomes with Claude Code: (1) a precise control-loop mental model (context in, plan, tool call, permission gate, validate, correct), and (2) moving reliability into durable artifacts and guardrails (CLAUDE.md, hooks, validation commands, secrets hygiene). The sequence intentionally front-loads loop mechanics and permissions, then teaches CLAUDE.md as the stable contract, then scales to workflow composition and security, before finishing with automation primitives that transfer to CI usage within the 60-minute constraint (55.8 minutes total).","average_segment_quality":7.67,"concept_key":"CONCEPT#a18253acebb978990f332770632e66ae","considerations":["GitHub Actions specifics (YAML patterns, GitHub permission surfaces, untrusted fork PR nuances) are not directly taught in the available segments; learners should map the unattended CLI and governance patterns onto their org’s CI standards.","Two segments mention worktrees from different angles (parallelism vs unattended isolation); the course treats them as distinct applications, but teams may want a single consolidated internal playbook for consistency.","MCP transport-level architecture (local stdio vs remote SSE/gateways) was excluded for time; add it if your integrations are remote or multi-tenant."],"course_id":"course_1773238725","created_at":"2026-03-11T14:31:58.825048+00:00","created_by":"James Quigley","description":"Build a precise operating model of Claude Code as a terminal-centric agent, including its tool loop, permissions, and failure modes. You’ll engineer durable repo context with CLAUDE.md, design validation-driven workflows, apply security guardrails for secrets and hooks, and evaluate MCP integrations and unattended automation trade-offs.","embedding_summary":"","estimated_total_duration_minutes":56.0,"final_learning_outcomes":["Explain Claude Code’s terminal control loop, and correctly attribute failures to model reasoning, tool execution, or environment state.","Engineer durable CLAUDE.md rules that are specific, testable, and updated via a lint-file mindset when the agent repeats mistakes.","Run validation-driven workflows with explicit plan gates, context hygiene, and cost controls to reduce iteration count and rework.","Set a defensible permission and secrets posture for agentic tool use, including guardrails via hooks and runtime secret storage.","Evaluate and integrate MCP tools while controlling context bloat and choosing between skills, MCP servers, and sub-agents.","Design constrained unattended runs (CI-style) using CLI mode, allowed-tool boundaries, checkpoints, and isolation patterns."],"generated_at":"2026-03-11T14:30:49Z","generation_error":null,"generation_progress":100.0,"generation_status":"completed","generation_step":"completed","generation_time_seconds":294.46244955062866,"image_description":"A focused software engineer sits at a real workstation in a quiet office, leaning slightly forward while reviewing a code change on a large monitor. One screen shows a blurred terminal session with command output and test results, while another shows a blurred side-by-side diff view and a checklist on paper next to the keyboard. On the desk: a laptop, a small notebook with handwritten bullets, and a hardware security key near a phone—subtle cues of governance and secure practice. The person’s hands are near the keyboard as if they are about to approve or deny an action, conveying deliberate control rather than passive watching. The lighting is warm but professional, with a calm, high-concentration mood. The scene should feel like real day-to-day engineering work: iterative, test-driven, and safety-aware, without any readable text or visible product branding on screens.","image_url":"https://course-builder-course-thumbnails.s3.us-east-1.amazonaws.com/courses/course_1773238725/thumbnail.png","interleaved_practice":[{"difficulty":"mastery","correct_option_index":0.0,"question":"A Claude Code session that started clean begins making nonsensical edits after 40 minutes. Tests still run, but the agent’s assumptions feel stale. You want the fastest way to diagnose whether you have context rot versus a permissions/tooling issue. What’s the best next move?","option_explanations":["Correct! /context gives you visibility into session assumptions, and /compact or /clear is the appropriate remediation for context rot depending on whether you need continuity or a clean reset.","Incorrect because adding MCP servers usually increases context/token load and can worsen drift; it also doesn’t tell you what the agent currently believes.","Incorrect because worktrees isolate code changes across directories/branches; they don’t directly repair a drifting session’s internal assumptions.","Incorrect because model switching is a cost/latency lever, not a state-diagnosis lever; the failure mode described is stale context, not insufficient capability."],"options":["Run /context to audit assumptions, then decide whether to /compact or /clear at a task boundary.","Add an additional MCP server so the agent can ‘refresh’ its understanding from external tools.","Create a new git worktree first, because isolation fixes stale reasoning.","Switch to a cheaper model immediately to reduce latency and force simpler reasoning."],"question_id":"cc_mastery_01","related_micro_concepts":["claude_code_agent_loop","claude_code_terminal_workflows"],"discrimination_explanation":"The correct move is to inspect the live state the agent is operating under before changing the environment. /context is designed to surface what Claude Code is assuming and holding in working memory; then /compact or /clear addresses context rot directly. Adding MCPs or switching models changes capability/cost but doesn’t diagnose stale assumptions, and a worktree isolates files, not a degraded context window."},{"difficulty":"mastery","correct_option_index":2.0,"question":"You’re tired of approving every tool action, but you’re operating on a production-adjacent repo. You want maximum flow without expanding blast radius. Which allowlist posture best matches the course’s risk-based permission design?","option_explanations":["Incorrect because it removes the key governance checkpoint in the agent loop, expanding blast radius and making prompt-injection or misfires much more costly.","Incorrect because network and installs are among the highest-risk categories for exfiltration and supply-chain surprises; they should stay gated unless tightly constrained.","Correct! This preserves iteration speed for common loops while keeping the riskiest actions behind explicit human approval.","Incorrect because repo-root context correctness says nothing about command safety; broad bash approval is still high risk."],"options":["Dangerously skip permissions so the agent can complete multi-step refactors without interruption.","Preapprove network calls (curl) and package installs so MCP integrations can self-heal quickly.","Preapprove file reads plus running tests and basic git commands, but keep installs, deletes, and network calls gated.","Preapprove any bash command as long as it runs in the repo root, because repo-root context is already correct."],"question_id":"cc_mastery_02","related_micro_concepts":["claude_code_agent_loop","claude_code_permissions_sandbox"],"discrimination_explanation":"Risk-based permission design emphasizes preapproving low-risk, high-frequency actions (read, run tests, basic git) while gating high-blast-radius actions (installs, deletes, network). Skipping permissions or broadly approving bash/network removes the critical control point that prevents destructive or exfiltrative behavior, especially when repo content can be adversarial."},{"difficulty":"mastery","correct_option_index":0.0,"question":"Claude repeatedly violates your repo’s formatting and architectural constraints across sessions. You want a fix that scales to teammates and doesn’t rely on repeating prompts. Which intervention best matches the CLAUDE.md pattern taught?","option_explanations":["Correct! High-priority, example-backed always/never rules in CLAUDE.md create a stable contract, and updating them on repeated mistakes hardens behavior over time.","Incorrect because MCP expands tool access, not behavioral guarantees; it often increases token/context load and does not encode constraints durably.","Incorrect because session chat prompts are not durable, are prone to drift/compaction loss, and don’t scale to teammates.","Incorrect because sub-agents are best for atomic side tasks and don’t reliably transfer full reasoning or enforcement back into the main context."],"options":["Add a top-priority CLAUDE.md section with always/never constraints plus concrete examples, then update it whenever the mistake recurs.","Install more MCP servers so the agent can ‘learn’ your style from external tools.","Write a long narrative explanation in the chat each session, and rely on auto-compaction to preserve it.","Move the constraints into a sub-agent so the main session stays focused on implementation."],"question_id":"cc_mastery_03","related_micro_concepts":["claude_code_context_claudemd","claude_code_terminal_workflows"],"discrimination_explanation":"Durable, testable repo-level rules belong in CLAUDE.md, ordered by priority and backed by examples. Treating CLAUDE.md like a lint file that you update when mistakes recur is what prevents instruction drift. MCP adds capability but can bloat context; sub-agents don’t automatically enforce repo-wide behavior in the main loop; and repeated narrative prompting is fragile and non-versioned."},{"difficulty":"mastery","correct_option_index":1.0,"question":"Midway through an implementation, Claude starts editing files based on an assumption you know is wrong, but it hasn’t executed any validation yet. You want to minimize rework and context bloat. What’s the best control-loop move?","option_explanations":["Incorrect because changing models doesn’t guarantee the assumption is corrected; the issue is missing/incorrect constraints, not raw capability.","Correct! Interrupting and re-planning aligns assumptions before edits, and explicit validation commands create a feedback loop that detects divergence quickly.","Incorrect because rewind is useful, but letting wrong edits accumulate increases review and rollback cost; steering earlier is cheaper.","Incorrect because compaction may preserve the wrong premise; it optimizes tokens, not correctness of assumptions."],"options":["Switch to a different model and ask it to restate the task, but don’t change the plan.","Interrupt immediately, force plan mode to re-argue assumptions, then re-run with explicit validation commands.","Let it continue, then rely on /re to rewind after everything is done.","Use /compact first so the wrong assumption becomes shorter and easier to correct."],"question_id":"cc_mastery_04","related_micro_concepts":["claude_code_agent_loop","claude_code_terminal_workflows"],"discrimination_explanation":"When the agent is operating on a wrong premise, the cheapest correction is early: interrupt, re-enter plan mode, and pin the correct assumptions before further edits. /re is a recovery tool, not a steering tool; model switching doesn’t fix an unchallenged assumption; and /compact is for context hygiene, not for correcting the plan’s factual foundation."},{"difficulty":"mastery","correct_option_index":2.0,"question":"Your team wants Claude Code to run format/lint automatically and to hard-block a dangerous command (for example, dropping a database) across all sessions. Which mechanism best enforces this without spending tokens repeatedly?","option_explanations":["Incorrect because prose in CLAUDE.md can still be misinterpreted or ignored under pressure; it’s guidance, not an execution gate.","Incorrect because compaction is about context hygiene; it doesn’t prevent a tool call from being issued or executed.","Correct! Hooks are designed as automation and guardrails, enforcing policy without repeated prompting or token cost.","Incorrect because sub-agents are not a hard control point for tool execution, and their output lacks full enforcement authority over the main loop."],"options":["A larger CLAUDE.md file with detailed prose explaining why destructive actions are bad.","Auto-compaction configured aggressively so risky commands are removed from the context window.","A hook that runs pre/post execution scripts to enforce guardrails and automation.","A sub-agent dedicated to ‘safety’ that reviews every tool call and then summarizes back."],"question_id":"cc_mastery_05","related_micro_concepts":["claude_code_terminal_workflows","claude_code_permissions_sandbox"],"discrimination_explanation":"Hooks are the token-free enforcement point: they can run deterministic checks and block patterns before/after execution, independent of what the model “remembers.” CLAUDE.md helps steer intent but is still interpreted by the model; sub-agents don’t reliably gate tool execution; and compaction manages context size, not policy enforcement."},{"difficulty":"mastery","correct_option_index":1.0,"question":"You’re adding an MCP-backed tool that requires an API token. You want Claude to use the tool, but you also want to minimize the chance the token ends up in the repo, CLAUDE.md, or chat logs. Which approach best matches the course’s governance model?","option_explanations":["Incorrect because auto-memory is not a secrets vault and increases the chance of accidental disclosure or uncontrolled reuse.","Correct! Runtime secrets storage keeps tokens out of repo and prompts, while permission gating still controls when tools can act.","Incorrect because embedding secrets in CLAUDE.md expands exposure to anyone with repo access and to the model context itself.","Incorrect because committing tokens is a direct secret-leak; CI should inject secrets at runtime, not via version control."],"options":["Ask Claude to memorize the token using auto-memory so it persists across sessions without files.","Store the token in a runtime secrets mechanism (for example Docker MCP secrets), and keep permission prompts as a separate control point.","Put the token in CLAUDE.md so it’s always in context, and rely on permissions prompts for safety.","Commit a .env file with the token so the tool can always run in CI."],"question_id":"cc_mastery_06","related_micro_concepts":["claude_code_permissions_sandbox","claude_code_mcp_integration"],"discrimination_explanation":"Secrets should live in runtime secret storage, not in repo-tracked files or prompt context. Permission prompts are an orthogonal control plane: even with correct secret handling, you still want explicit approval boundaries for risky actions. Putting tokens in CLAUDE.md, committing env files, or relying on memory increases leakage risk and violates least-privilege principles."},{"difficulty":"mastery","correct_option_index":3.0,"question":"After installing several MCP servers, Claude starts getting slower and less consistent, and your token usage spikes. You still need one specific integration. What’s the best corrective action based on the MCP trade-offs taught?","option_explanations":["Incorrect because sub-agents don’t automatically solve context bloat; they also introduce limitations in what reasoning transfers back.","Incorrect because compaction can reduce window size, but it can’t fully offset unnecessary tool/integration overhead.","Incorrect because turning an integration into an always-running hook usually increases cost and risk; hooks are best for deterministic guardrails.","Correct! Minimizing MCP surface area and selectively importing results controls token growth and reduces degradation."],"options":["Add a sub-agent for every MCP server so the main session never sees tools directly.","Switch to auto-compaction only, because MCP overhead is purely a summarization issue.","Convert the MCP server into a hook so it runs automatically on every prompt.","Disable anything not essential, keep the minimal MCP set, and prefer bringing only the needed results into the main context."],"question_id":"cc_mastery_07","related_micro_concepts":["claude_code_mcp_integration","claude_code_terminal_workflows"],"discrimination_explanation":"The key MCP failure mode here is context/token growth and “always-on” integration overhead. The course’s remedy is minimalism: install only what you need, and keep the main context lean by pulling in results selectively. Sub-agents can help for atomic tasks, but they don’t eliminate integration overhead by themselves; compaction helps but doesn’t change tool surface area; and hooks should enforce guardrails, not indiscriminately run integrations every time."},{"difficulty":"mastery","correct_option_index":0.0,"question":"You want to run Claude Code unattended in a CI job to propose changes safely, without giving it open-ended autonomy. Which design best matches the unattended automation patterns taught, and transfers cleanly to GitHub Actions-style runs?","option_explanations":["Correct! This combines unattended execution (-p) with explicit constraints and rollback primitives, producing a controlled, reviewable output suitable for CI workflows.","Incorrect because skipping permissions expands blast radius; git history is not a substitute for governance, especially when secrets and external tools are involved.","Incorrect because it removes the automation benefit; CI needs non-interactive execution with guardrails, not constant manual approvals.","Incorrect because parallelism without isolation increases context contamination and file conflicts; isolation (for example worktrees) is the safer scaling pattern."],"options":["Use CLI mode (-p) with predeclared allowed-tools constraints, rely on checkpoints and rewind (/re) for recovery, and keep the scope narrow (for example, produce a patch or suggestions).","Enable dangerously skip permissions and rely on git history to recover if anything goes wrong.","Run interactive mode and require a human to approve every action, because unattended runs are inherently unsafe.","Use multiple parallel Claude instances on the same working directory so they can converge on the best answer faster."],"question_id":"cc_mastery_08","related_micro_concepts":["claude_code_github_actions","claude_code_permissions_sandbox","claude_code_terminal_workflows"],"discrimination_explanation":"Unattended automation requires constraints defined up front: CLI mode for non-interactive execution, allowed-tools boundaries to prevent unexpected actions, and recovery mechanisms like checkpoints and rewind. Skipping permissions removes guardrails, while parallel agents in the same workspace increases interference and nondeterminism. Fully interactive mode defeats the purpose of CI automation."}],"is_public":true,"key_decisions":["mZzhfPle9QU_79_462: Chosen as the opener because it explains how Claude Code establishes repo-root context and how plan/interrupt steering works, which is the minimum viable mental model for everything else.","ZlDnsf_DOzg_188_520: Placed next to add the missing control-plane piece—permission gating and tool primitives—so the learner can reason about what is model behavior vs tool execution vs policy.","mZzhfPle9QU_924_1650: Selected as the main CLAUDE.md lesson because it teaches durable, testable rule-writing plus validation loops, the highest-leverage reliability mechanism for professionals.","mZzhfPle9QU_551_873: Included to operationalize long-running work with context hygiene, compaction, and cost controls, bridging from “rules exist” to “rules stay effective over time.”","mZzhfPle9QU_2266_2681: Added to teach workflow scaling (parallel sessions), tool bridging (/chrome), and hooks as automation/guardrails—capabilities that change how professionals structure terminal-native work.","GuTcle5edjk_1082_1398: Chosen for the dedicated secrets-and-permission lens, complementing earlier permissions content with runtime secret storage patterns and tool invocation validation.","mZzhfPle9QU_1742_2265: Selected as the MCP segment because it explains composition (skills + MCP + sub-agents) and the key trade-off professionals hit first—context/token growth vs capability.","ZlDnsf_DOzg_1285_1617: Used to cover automation because it teaches unattended CLI execution (-p), tool constraints, checkpoints/rewind, and isolation via worktrees—closest available coverage for CI/GitHub Actions-style runs."],"micro_concepts":[{"prerequisites":[],"learning_outcomes":["Explain how Claude Code’s tool-use loop differs from chat-only coding assistance","Identify where errors originate (model reasoning vs tool execution vs environment state)","Choose interaction patterns that reduce iteration count and rework"],"difficulty_level":"advanced","concept_id":"claude_code_agent_loop","name":"Claude Code agent loop mechanics","description":"Build a precise mental model of Claude Code’s agentic control loop: how it selects tools, requests permissions, maintains session state, and interacts with your repo through terminal-centric affordances.","sequence_order":0.0},{"prerequisites":["claude_code_agent_loop"],"learning_outcomes":["Design CLAUDE.md content that is specific, testable, and hard to misinterpret","Use scoped context patterns that scale to monorepos and multi-service repositories","Diagnose when context is missing vs when instructions are over-constraining"],"difficulty_level":"advanced","concept_id":"claude_code_context_claudemd","name":"CLAUDE.md context engineering patterns","description":"Learn advanced patterns for writing and organizing CLAUDE.md so Claude Code consistently applies architecture, style, and constraints across a codebase without instruction drift or contradictions.","sequence_order":1.0},{"prerequisites":["claude_code_agent_loop","claude_code_context_claudemd"],"learning_outcomes":["Structure tasks so Claude Code produces reviewable, incremental changes","Use test feedback and logs to steer the agent without bloating context","Select workflows that minimize tool thrash and maximize deterministic progress"],"difficulty_level":"advanced","concept_id":"claude_code_terminal_workflows","name":"Claude Code terminal workflow design","description":"Develop high-signal interaction workflows (planning, incremental diffs, test-driven loops, and refactors) that exploit Claude Code’s terminal-native and composable design.","sequence_order":2.0},{"prerequisites":["claude_code_agent_loop","claude_code_terminal_workflows"],"learning_outcomes":["Set a defensible permission posture for different task classes (read-only, edit, execute)","Identify high-risk tool actions and reduce blast radius proactively","Recognize prompt-injection and repo-config risks specific to agentic tooling"],"difficulty_level":"advanced","concept_id":"claude_code_permissions_sandbox","name":"Claude Code permissions and sandboxing","description":"Analyze Claude Code’s permission modes, sandbox boundaries, hooks surface area, and secrets-handling risks so you can safely operate it on real repositories and environments.","sequence_order":3.0},{"prerequisites":["claude_code_permissions_sandbox"],"learning_outcomes":["Explain what MCP adds compared to ad-hoc connectors and copy-paste context transfer","Evaluate an MCP server’s trust, permissions, and data-exposure footprint","Apply guardrails to reduce prompt-injection and tool-abuse risk in integrations"],"difficulty_level":"advanced","concept_id":"claude_code_mcp_integration","name":"Claude Code MCP tool integration","description":"Understand how MCP connects Claude Code to external systems, what the protocol changes about context and tool trust, and how to integrate MCP servers without expanding your attack surface.","sequence_order":4.0},{"prerequisites":["claude_code_permissions_sandbox","claude_code_terminal_workflows"],"learning_outcomes":["Select automation scopes that are safe and measurable (comments, suggestions, gated fixes)","Reason about CI-specific threat models (secrets exposure, untrusted PRs, permission escalation)","Define evaluation signals to detect regressions in agent performance over time"],"difficulty_level":"advanced","concept_id":"claude_code_github_actions","name":"Claude Code GitHub Actions automation","description":"Learn how to operationalize Claude Code in CI for PR review and security review workflows, including reliability constraints, governance, and failure-mode handling.","sequence_order":5.0}],"overall_coherence_score":8.32,"pedagogical_soundness_score":8.25,"prerequisites":["Confident terminal and Git workflows","Comfort reviewing diffs, tests, and logs","Basic CI mental model (build/test gates, least privilege)","Ability to read and edit small JSON/Markdown configs"],"rejected_segments_rationale":"ZlDnsf_DOzg_526_902 was rejected to avoid redundancy with the deeper CLAUDE.md rules segment; its primary CLAUDE.md framing overlaps, despite useful governance details. ZlDnsf_DOzg_902_1247 was rejected because its main learning outcome (commands/skills/hooks/MCP/sub-agents composition) overlaps with the selected MCP/skills segment. GuTcle5edjk_1679_2267 (MCP transport/gateway) was rejected to keep the course under 60 minutes and because the selected MCP segment already covers the highest-impact Claude Code MCP trade-offs; transport-level details are valuable but not required for this 60-minute path. TaKmTrsx2Lo_815_1180 and TaKmTrsx2Lo_1175_1737 were rejected due to lower depth/quality and inclusion of beginner-ish GitHub/account/setup flows or non-self-contained dependencies. JMQ0X_si144_116_452 was rejected as too introductory for an advanced course given the explicit skip of generic overviews. AO5aW01DKHo segments were rejected due to weaker relevancy to Claude Code’s terminal control loop and repo-governance focus. Note: no available segment directly teaches GitHub Actions YAML or GitHub-specific CI permission models; micro-concept coverage is achieved via Claude Code’s unattended CLI patterns and governance constraints that transfer to GitHub Actions environments.","segment_thumbnail_urls":["https://i.ytimg.com/vi/mZzhfPle9QU/maxresdefault.jpg","https://i.ytimg.com/vi/ZlDnsf_DOzg/maxresdefault.jpg","https://i.ytimg.com/vi/GuTcle5edjk/maxresdefault.jpg"],"segments":[{"before_you_start":"This course starts with the operational question that drives reliability, what exactly Claude Code sees, and when. You will learn why repo root matters, how /init seeds durable context, and how plan mode plus interruption keeps the agent on a tight loop.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/mZzhfPle9QU_79_462/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["Running Claude Code from repo root for correct context packaging","/init bootstraps CLAUDE.md from codebase analysis","CLAUDE.md hierarchy awareness (checked-in vs user memory)","High-signal CLAUDE.md contents: architecture + requirements + domain context","Validation loop as a reliability amplifier for agentic coding","Plan mode vs edit/accept mode as a control mechanism","Interrupting/steering the agent mid-thought (escape) and prompt queuing"],"duration_seconds":383.15157500000004,"learning_outcomes":["Explain why running Claude Code from the repo root affects initial context and token usage","Use /init to generate a starting CLAUDE.md and understand what it is for","Draft/recognize high-signal CLAUDE.md sections (architecture, requirements, domain context, validation commands)","Operate Claude Code in a plan-first loop and interrupt/correct mid-generation to avoid drift"],"micro_concept_id":"claude_code_agent_loop","prerequisites":["Comfort with terminal-based workflows","Basic understanding of LLM context windows and token costs","Familiarity with repo structure and build/test commands"],"quality_score":7.655,"segment_id":"mZzhfPle9QU_79_462","sequence_number":1.0,"title":"How Claude Boots Context and Plans","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"","overall_transition_score":10.0,"to_segment_id":"mZzhfPle9QU_79_462","pedagogical_progression_score":10.0,"vocabulary_consistency_score":10.0,"knowledge_building_score":10.0,"transition_explanation":"N/A for first segment"},"url":"https://www.youtube.com/watch?v=mZzhfPle9QU&t=79s","video_duration_seconds":2772.0},{"before_you_start":"Now that you can picture how a session starts and how to steer it, add the missing control plane, permissions. This segment breaks down read, write, and bash tool calls, shows how allowlists change iteration speed, and explains how context rot shows up in real runs.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/ZlDnsf_DOzg_188_520/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["Permission gating vs pre-approvals (allowlist)","Risk-based permission design (safe vs risky actions)","Tool use primitives (read/write/bash)","Terminal control loop behavior (Claude selects tools)","Context window limits and context rot","Session hygiene (/clear, /compact)","Conversation resume/history (claude-resume)","Token/cost observability (/cost, /stats)"],"duration_seconds":331.67900000000003,"learning_outcomes":["Design a practical Claude Code permission policy that preserves flow while gating risky operations","Explain how Claude Code uses read/write/bash tools to act in a terminal loop without you specifying the tool","Recognize and mitigate context rot using session boundaries and /clear or /compact","Monitor per-session cost/usage using /cost and /stats"],"micro_concept_id":"claude_code_agent_loop","prerequisites":["Comfort reading JSON configuration (settings.json)","Basic understanding of terminal command execution","Familiarity with git workflows and running tests"],"quality_score":7.714999999999999,"segment_id":"ZlDnsf_DOzg_188_520","sequence_number":2.0,"title":"Permission-Gated Tool Loop in Practice","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"mZzhfPle9QU_79_462","overall_transition_score":8.35,"to_segment_id":"ZlDnsf_DOzg_188_520","pedagogical_progression_score":8.0,"vocabulary_consistency_score":8.0,"knowledge_building_score":9.0,"transition_explanation":"Builds on the bootstrapping model by adding the enforcement layer that actually gates tool execution, turning “Claude proposes” into “Claude can act.”"},"url":"https://www.youtube.com/watch?v=ZlDnsf_DOzg&t=188s","video_duration_seconds":1644.0},{"before_you_start":"With the tool loop and permissions clear, shift focus to durable repo behavior. You will learn how CLAUDE.md is read top-to-bottom, how to write specific always-and-never rules with examples, and how to pair them with a validation loop so the agent can self-correct.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/mZzhfPle9QU_924_1650/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["CLAUDE.md as the primary repo-level instruction surface","Rule priority discipline (top-to-bottom importance ordering)","Encoding ‘always/never’ constraints and example snippets","Updating CLAUDE.md based on observed model mistakes (lint-file mindset)","Trigger keywords in rules to activate tools/skills","“Compound engineering”: checking repo instructions into codebase with token-budget awareness","Plan-first workflow design: argue, refine assumptions, then execute","Fresh/condensed context beats bloated context","Persisting and lazy-loading context (“second brain” workflow)","Designing validation loops (build/test/debug/e2e) to enable self-correction"],"duration_seconds":725.6393548387096,"learning_outcomes":["Design CLAUDE.md rules with clear priority, constraints, and examples that reduce repeat errors","Operationalize a feedback loop: when Claude makes a mistake, fix once then update rules so it doesn’t recur","Decide what belongs in checked-in repo instructions vs personal/global memory, with token-budget awareness","Run a plan-first workflow that minimizes context bloat and improves downstream execution","Specify a validation loop appropriate to your stack (compile, tests, e2e, logs, perf traces) to enable agent self-correction"],"micro_concept_id":"claude_code_context_claudemd","prerequisites":["Experience working in multi-module repos (architecture, conventions)","Familiarity with build/test/format/lint workflows and CI-style validation","Comfort with iterative development processes (planning → implement → validate)"],"quality_score":8.165,"segment_id":"mZzhfPle9QU_924_1650","sequence_number":3.0,"title":"CLAUDE.md Rules that Survive Drift","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"ZlDnsf_DOzg_188_520","overall_transition_score":8.6,"to_segment_id":"mZzhfPle9QU_924_1650","pedagogical_progression_score":8.5,"vocabulary_consistency_score":8.5,"knowledge_building_score":9.0,"transition_explanation":"Transitions from “how actions are executed safely” to “how to shape agent decisions consistently across sessions” using repo-level rules and validation feedback."},"url":"https://www.youtube.com/watch?v=mZzhfPle9QU&t=924s","video_duration_seconds":2772.0},{"before_you_start":"Once CLAUDE.md is doing real work, the next bottleneck is session entropy, cost, and degraded accuracy. Here you’ll learn how to audit what Claude is assuming, reset task boundaries cleanly, and compact without losing the critical constraints that keep changes reviewable.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/mZzhfPle9QU_551_873/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["/clear for task boundary resets and context hygiene","/context for auditing what Claude Code is assuming","Context freshness/condensation as a reliability and cost control strategy","MCPs as common context/token “offenders” and when to disable them","Auto-compaction vs manual compaction trade-offs","/models for selecting capability vs cost","/resume to recover session context after interruption"],"duration_seconds":321.4839999999999,"learning_outcomes":["Use /context to inspect and audit what is currently in-context and identify token-cost offenders","Apply /clear deliberately to prevent old-task context from contaminating a new feature","Explain how compaction works (summarize current context) and when manual compaction is useful","Make informed trade-offs between model choice and cost using /models","Recover prior work after losing a session using /resume"],"micro_concept_id":"claude_code_terminal_workflows","prerequisites":["Comfort reading terminal output and reasoning about session state","Basic familiarity with using tools/plugins (conceptually)"],"quality_score":7.5200000000000005,"segment_id":"mZzhfPle9QU_551_873","sequence_number":4.0,"title":"Context Hygiene, Compaction, and Cost Control","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"mZzhfPle9QU_924_1650","overall_transition_score":8.6,"to_segment_id":"mZzhfPle9QU_551_873","pedagogical_progression_score":8.5,"vocabulary_consistency_score":9.0,"knowledge_building_score":8.5,"transition_explanation":"Builds on CLAUDE.md durability by teaching how to keep the live context window aligned with those rules during real, multi-step work."},"url":"https://www.youtube.com/watch?v=mZzhfPle9QU&t=551s","video_duration_seconds":2772.0},{"before_you_start":"Now that you can keep a session clean and cost-aware, scale the workflow instead of stretching one chat forever. You’ll see how parallel Claude instances and worktrees reduce interference, when /chrome is the right bridge, and how hooks add automation and guardrails.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/mZzhfPle9QU_2266_2681/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["Parallel development via multiple Claude Code instances","Keyboard-driven terminal orchestration and context switching as a workflow skill","Notifications for asynchronous execution completion","Git worktrees to enable parallel edits in the same repo safely","/chrome tool as a browser-control bridge when APIs aren’t available","Composability: using /chrome inside larger automated commands","Hooks for pre/post execution automation and guardrails","Governance angle: blocking destructive actions (e.g., database deletion) via automation"],"duration_seconds":414.5133333333333,"learning_outcomes":["Design a parallel Claude Code workflow using multiple instances without losing track of state","Use git worktrees to safely run concurrent code changes in the same project","Explain when /chrome is valuable (no API access) and how it composes with other workflows","Identify appropriate hook points (before/after execution, on failure) for automating validation and guardrails","Describe concrete governance use cases for hooks (blocking destructive operations)"],"micro_concept_id":"claude_code_terminal_workflows","prerequisites":["Comfort with terminal multiplexing/tabs and running multiple concurrent tasks","Understanding of git branches and the concept of worktrees","Basic awareness of automation hooks (pre/post patterns)"],"quality_score":7.75,"segment_id":"mZzhfPle9QU_2266_2681","sequence_number":5.0,"title":"Parallel Sessions, Hooks, and Tool Bridges","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"mZzhfPle9QU_551_873","overall_transition_score":8.28,"to_segment_id":"mZzhfPle9QU_2266_2681","pedagogical_progression_score":8.0,"vocabulary_consistency_score":8.5,"knowledge_building_score":8.5,"transition_explanation":"Extends single-session hygiene into multi-session throughput, showing how isolation and hooks prevent the same context and governance problems from reappearing at scale."},"url":"https://www.youtube.com/watch?v=mZzhfPle9QU&t=2266s","video_duration_seconds":2772.0},{"before_you_start":"Parallel workflows and hooks increase autonomy, so governance must keep up. This segment focuses on permission prompts as control points, and secrets storage as a separate runtime concern. You’ll practice validating that tools work under constraints, without leaking tokens into code or context.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/GuTcle5edjk_1082_1398/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["Permission prompts as governance controls in the tool loop","Testing tool invocation reliability (do tools work after appearing?)","Building an API-backed MCP server (Toggle example)","Secrets management via Docker MCP secrets (keep tokens out of code)","Operational restart/reload cycle for clients to pick up tools"],"duration_seconds":316.1282000000001,"learning_outcomes":["Explain how ‘allow once’ style permissions constrain an agent’s tool execution in practice","Adopt a secrets-handling pattern that avoids leaking tokens into repos or tool source","Debug the difference between ‘tool is visible’ and ‘tool is operational’ in an MCP client"],"micro_concept_id":"claude_code_permissions_sandbox","prerequisites":["Understanding of environment variables and API tokens","Basic Docker CLI familiarity","Comfort with restarting/reloading local dev tools to apply config changes"],"quality_score":7.025,"segment_id":"GuTcle5edjk_1082_1398","sequence_number":6.0,"title":"Tool Permissions and Runtime Secrets Safety","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"mZzhfPle9QU_2266_2681","overall_transition_score":7.96,"to_segment_id":"GuTcle5edjk_1082_1398","pedagogical_progression_score":8.0,"vocabulary_consistency_score":7.8,"knowledge_building_score":8.0,"transition_explanation":"Moves from “how to automate and scale” to “how to keep that automation safe,” specifically when external tools and credentials enter the loop."},"url":"https://www.youtube.com/watch?v=GuTcle5edjk&t=1082s","video_duration_seconds":2320.0},{"before_you_start":"With permissions and secrets handled deliberately, you can integrate external capability without losing control. This segment shows how MCPs, skills, and sub-agents compose, where context bloat comes from, and how to decide whether to bring work into context or isolate it.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/mZzhfPle9QU_1742_2265/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["Claude Code primitives: slash commands vs skills (and recent convergence)","Skills as reusable workflows stored as MD/system prompts","Creating and iterating on skills by demonstration (do once → save)","MCP discovery and installation via Claude (with staleness risk)","MCP token/context growth trade-offs; install only what’s needed","Sub-agents for parallel work and for protecting the main context window","Limitations of sub-agents: returned output lacks full internal context","Heuristic: bring work to context vs spreading context"],"duration_seconds":523.3441025641025,"learning_outcomes":["Explain how Claude Code represents ‘skills’ and why they’re reusable workflows rather than ad-hoc prompts","Create a skill by demonstrating a workflow once and asking Claude to save it, then iteratively refine it","Evaluate MCPs with a cost/reliability lens (context bloat, staleness, project-specific necessity)","Decide when sub-agents help (parallel/atomic tasks) and when they hurt (missing shared context)","Apply the heuristic of keeping high-context work in the main session to preserve coherence"],"micro_concept_id":"claude_code_mcp_integration","prerequisites":["Comfort designing repeatable developer workflows (scripts, aliases, templates)","Basic understanding of tool integrations and permission prompts","Familiarity with parallelization concepts (running tasks concurrently)"],"quality_score":8.049999999999999,"segment_id":"mZzhfPle9QU_1742_2265","sequence_number":7.0,"title":"MCP, Skills, and Sub-Agent Trade-offs","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"GuTcle5edjk_1082_1398","overall_transition_score":8.25,"to_segment_id":"mZzhfPle9QU_1742_2265","pedagogical_progression_score":8.0,"vocabulary_consistency_score":8.0,"knowledge_building_score":8.5,"transition_explanation":"Builds on governance by applying it to integrations: MCP expands tool reach, so you must reason about trust, context growth, and isolation strategies."},"url":"https://www.youtube.com/watch?v=mZzhfPle9QU&t=1742s","video_duration_seconds":2772.0},{"before_you_start":"To move from interactive help to automation, you need safe rollback and tight constraints. In this segment you’ll learn how checkpoints and rewind protect you from fast wrong turns, how CLI mode enables unattended runs, and how isolation patterns apply when CI drives the loop.","before_you_start_audio_url":"https://course-builder-course-assets.s3.us-east-1.amazonaws.com/audio/courses/course_1773238725/segments/ZlDnsf_DOzg_1285_1617/before-you-start.mp3","before_you_start_avatar_video_url":"","concepts_taught":["Checkpoint snapshots before edits (session-level safety)","Rewind/restore via /re","Git integration for review/rollback/team safety","Non-interactive CLI mode (-p) for unattended agent runs","Constraining autonomy with allowed-tools flags","Ralph loop (iterative agent while-loop automation)","Cost model trade-offs (subscription vs API)","Worktrees for isolation and parallel Claude sessions (-w / d-worktree)","Parallel development without context contamination"],"duration_seconds":331.4304736842105,"learning_outcomes":["Use checkpoints and /re to safely undo agent missteps at session granularity","Explain how git integration supports reviewability and safe team collaboration with an agent","Run Claude Code non-interactively with -p and reason about what constraints must be set via flags","Describe the Ralph loop’s iterative automation pattern and when it’s appropriate","Use worktrees to run isolated parallel Claude sessions and merge results safely"],"micro_concept_id":"claude_code_github_actions","prerequisites":["Practical experience with git branching/merging","Comfort running automated commands from the terminal","Understanding of test/dev-server loops and why rollbacks matter"],"quality_score":7.4799999999999995,"segment_id":"ZlDnsf_DOzg_1285_1617","sequence_number":8.0,"title":"Unattended Runs: Checkpoints, CLI, Isolation","transition_from_previous":{"suggested_bridging_content":"","from_segment_id":"mZzhfPle9QU_1742_2265","overall_transition_score":8.18,"to_segment_id":"ZlDnsf_DOzg_1285_1617","pedagogical_progression_score":8.0,"vocabulary_consistency_score":8.0,"knowledge_building_score":8.5,"transition_explanation":"Concludes the integration story by showing how to run constrained, recoverable loops without constant human intervention—exactly the pressure CI automation introduces."},"url":"https://www.youtube.com/watch?v=ZlDnsf_DOzg&t=1285s","video_duration_seconds":1644.0}],"selection_strategy":"Selected the highest-density, mechanism-focused segments that align with the specified skips (no install/login/AI overviews) and cover each required micro-concept once, using the minimum number of segments needed for full coverage. Sequenced from foundational control-loop mental models to context durability, then composable terminal workflows, then governance/secrets, then MCP integration, and finally unattended automation patterns applicable to CI.","strengths":["Mechanism-first sequencing that supports correct failure attribution and faster debugging.","High leverage on durable repo context (CLAUDE.md) plus validation loops, reducing “prompt drift” and rework.","Security and governance are treated as first-class control planes (permissions, secrets, guardrails), not afterthoughts.","Practical operational tactics for long sessions, cost control, and unattended execution constraints."],"target_difficulty":"advanced","title":"Claude Code Reliability, Safety, and Automation","tradeoffs":[],"updated_at":"2026-03-11T15:00:45.776833+00:00","user_id":"google_105408134345686850915"}}