{
  "name": "AI For Engineers, Part 6: Anthropic Deep Dive — Claude, MCP, Skills & Sandboxed Agents",
  "badge": "AI FOR ENGINEERS · PART 06 / 09",
  "children": [
    {
      "name": "Ch. 01: From OpenAI to Anthropic's Engineering Stack",
      "children": [
        {
          "name": "Core Principle: Every Claude capability maps directly to fixed-weight Transformer inference, token budgets, tools, and deterministic checks."
        },
        {
          "name": "Desk Briefing: Anthropic Architecture",
          "children": [
            {
              "name": "Aero-Blue and Aero-Pink evaluate Claude models, protocols, workspaces, and agent sandboxes using Video 1 definitions."
            },
            {
              "name": "Rule / Formula: Scope: Models → Protocols → Workspaces → Agents"
            }
          ]
        },
        {
          "name": "Stacked Transformer Blocks at Runtime",
          "children": [
            {
              "name": "During inference, learned weights and biases remain frozen while input tokens route context through attention layers."
            },
            {
              "name": "Rule / Formula: Inference: Fixed Weights + Input Tokens → Logits"
            }
          ]
        },
        {
          "name": "Standardizing Context and Procedures",
          "children": [
            {
              "name": "Model Context Protocol servers supply external data and tools, while SKILL.md files load repeatable steps into context."
            },
            {
              "name": "Rule / Formula: Context Window = System + Docs + Tools + Output"
            }
          ]
        },
        {
          "name": "Agents Bounded by OS Kernel Rules",
          "children": [
            {
              "name": "Claude Code and Computer Use pair multi-step tool loops with permission tiers, hooks, and kernel filesystem limits."
            },
            {
              "name": "Rule / Formula: Agent = LLM + Tool Loop + Deterministic Gate"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 02: Claude Opus, Sonnet & Haiku Compute Trade-Offs",
      "children": [
        {
          "name": "Core Principle: Select model tiers by balancing layer depth and width compute cost against latency and multi-step reasoning accuracy."
        },
        {
          "name": "High-Depth Architectural Synthesis",
          "children": [
            {
              "name": "Highest per-token compute and latency; built for cross-repo root-cause analysis, complex planning, and lead orchestration."
            },
            {
              "name": "Rule / Formula: Role: Lead Planner & Deep Spec Verifier"
            }
          ]
        },
        {
          "name": "Interactive Coding & Tool Workhorse",
          "children": [
            {
              "name": "Balances reasoning depth with fast token generation for iterative code diffs, MCP tool calls, and GUI coordinate parsing."
            },
            {
              "name": "Rule / Formula: Role: Primary SWE Loop & Computer Use Engine"
            }
          ]
        },
        {
          "name": "Low-Latency Triage & Worker Node",
          "children": [
            {
              "name": "Lowest latency and per-token cost; executes parallel file filtering, schema extraction, and classification sub-tasks."
            },
            {
              "name": "Rule / Formula: Role: Sub-Second Router & Parallel Worker"
            }
          ]
        },
        {
          "name": "Shared Finite Token Budget",
          "children": [
            {
              "name": "System instructions, repository files, tool schemas, and generated tokens all compete inside one finite context window."
            },
            {
              "name": "Rule / Formula: Total Tokens ≤ Context Limit (200K–1M)"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 03: Pre-Training, Constitutional AI & RL Alignment",
      "children": [
        {
          "name": "Core Principle: Constitutional AI replaces parts of human preference labeling with rule-guided critique, supervised fine-tuning, and RL."
        },
        {
          "name": "Self-Supervised Next-Token Loss",
          "children": [
            {
              "name": "Updates billions of weights via gradient descent on unlabeled text and code before task-specific alignment begins."
            },
            {
              "name": "Rule / Formula: Pre-Training: Unlabeled Text → Base Weights"
            }
          ]
        },
        {
          "name": "Constitutional Self-Revision",
          "children": [
            {
              "name": "Model critiques and rewrites its own outputs against explicit written principles, generating supervised training pairs."
            },
            {
              "name": "Rule / Formula: Draft → Principle Critique → Supervised Update"
            }
          ]
        },
        {
          "name": "Reinforcement Learning Alignment",
          "children": [
            {
              "name": "Preference signals derived from constitutional rules update policy weights to curb sycophancy and unsafe completions."
            },
            {
              "name": "Rule / Formula: RLAIF: Reward Signal → Policy Weight Update"
            }
          ]
        },
        {
          "name": "Responsible Scaling Policy Gates",
          "children": [
            {
              "name": "Binds each checkpoint to AI Safety Levels (ASL-1 to ASL-4) via red-team evaluations before API release."
            },
            {
              "name": "Rule / Formula: Capability Threshold → Mandatory Containment"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 04: Hybrid Extended Thinking & Interleaved Tools",
      "children": [
        {
          "name": "Core Principle: Extended Thinking allocates an explicit inference-time token budget for intermediate reasoning between tool invocations."
        },
        {
          "name": "Programmable Thinking Token Budget",
          "children": [
            {
              "name": "Single checkpoint toggles between direct completion and Extended Thinking via an integer budget_tokens setting."
            },
            {
              "name": "Rule / Formula: budget_tokens ≥ 1,024 (Billed as Output Tokens)"
            }
          ]
        },
        {
          "name": "Serial Hypothesis Verification",
          "children": [
            {
              "name": "Generates internal scratchpad tokens to check boundary conditions and backtrack before writing the user-facing answer."
            },
            {
              "name": "Rule / Formula: Prompt → Thinking Tokens → Verified Answer"
            }
          ]
        },
        {
          "name": "Reasoning Between Every Tool Call",
          "children": [
            {
              "name": "Evaluates live stdout, compiler errors, or SQL rows in a new thinking block before selecting the next tool call."
            },
            {
              "name": "Rule / Formula: Think → Call Tool → Observe → Think → Act"
            }
          ]
        },
        {
          "name": "Re-Planning From Tool Output",
          "children": [
            {
              "name": "Invokes bash or MCP tools, reads returned observations, and emits a fresh thinking block to adapt the plan when tests fail."
            },
            {
              "name": "Rule / Formula: Tool Observation → Fresh Think Block → Adapt"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 05: KV Prompt Caching, Batches & Citations API",
      "children": [
        {
          "name": "Core Principle: Prompt Caching reuses Transformer Attention Key-Value tensors across shared prefixes, while Citations anchor source spans."
        },
        {
          "name": "Prompt Caching (5m & 1h TTL)",
          "children": [
            {
              "name": "Persists computed Attention Key-Value tensors for static system rules, tool catalogs, and repository files across turns."
            },
            {
              "name": "Rule / Formula: Cache Hit: Up to −90% Input Cost & −85% TTFT"
            }
          ]
        },
        {
          "name": "Offline High-Throughput Queues",
          "children": [
            {
              "name": "Executes non-interactive regression suites, corpus extractions, and document audits asynchronously inside a 24h window."
            },
            {
              "name": "Rule / Formula: Batch Pricing: 50% Input & Output Token Cost"
            }
          ]
        },
        {
          "name": "Character-Exact Source Spans",
          "children": [
            {
              "name": "Attaches verifiable character or PDF page offsets to grounded claims against LOG-104; engineers still verify coverage and interpretation."
            },
            {
              "name": "Rule / Formula: Grounded Claim → Verifiable Span in LOG-104"
            }
          ]
        },
        {
          "name": "Exposing Numeric Drift & SPEC-992",
          "children": [
            {
              "name": "Verifies LOG-104's 84.2°C housing peak against SPEC-201's 85.0°C ceiling while exposing 94.2°C drift or phantom SPEC-992."
            },
            {
              "name": "Rule / Formula: Missing Source Span → Flag Drift / SPEC-992"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 06: MCP Architecture: Hosts, Clients & Servers",
      "children": [
        {
          "name": "Core Principle: The Model Context Protocol replaces N × M custom tool glue code with a single JSON-RPC 2.0 client-server standard."
        },
        {
          "name": "Host, Client & Server Separation",
          "children": [
            {
              "name": "The AI Host manages 1-to-1 Client connections to local stdio processes or remote OAuth-authenticated HTTP MCP Servers."
            },
            {
              "name": "Rule / Formula: Integration Complexity: N × M → N + M"
            }
          ]
        },
        {
          "name": "Application-Controlled Read Data",
          "children": [
            {
              "name": "Streams read-only context such as LOG-104 sensor CSVs, Git diffs, or API specifications into the Context Window."
            },
            {
              "name": "Rule / Formula: Resource: URI-Addressed Read-Only Context"
            }
          ]
        },
        {
          "name": "Model-Invoked Actions & Templates",
          "children": [
            {
              "name": "Tools expose JSON-schema functions for model execution; Prompts provide user-triggered structured workflow templates."
            },
            {
              "name": "Rule / Formula: Tools = Side-Effect Calls | Prompts = Specs"
            }
          ]
        },
        {
          "name": "Deferred Tool Schema Loading",
          "children": [
            {
              "name": "Messages API connects directly to remote HTTPS MCP servers and loads specific tool definitions only when queried."
            },
            {
              "name": "Rule / Formula: Tool Search → Load Needed Schemas Only"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 07: Claude Projects, 5-Part Prompts & Artifacts",
      "children": [
        {
          "name": "Core Principle: Projects standardize inference-time Context Window inputs, while Artifacts isolate rendered code and UI in a sandboxed frame."
        },
        {
          "name": "Shared Inference Context Base",
          "children": [
            {
              "name": "Curates repositories, interface specs, and team rules inside a shared 200K+ token workspace without fine-tuning weights."
            },
            {
              "name": "Rule / Formula: Project Docs → Inference Context (Weights Fixed)"
            }
          ]
        },
        {
          "name": "Role, Context, Task, Format, Verify",
          "children": [
            {
              "name": "Project instructions codify acceptance rules—such as rejecting uncited numbers—across every team member's session."
            },
            {
              "name": "Rule / Formula: Prompt = Role + Context + Task + Format + Verify"
            }
          ]
        },
        {
          "name": "Isolated Side-Panel Rendering",
          "children": [
            {
              "name": "Renders React apps, SVG diagrams, Mermaid graphs, and HTML tools in a restricted iframe with per-turn version history."
            },
            {
              "name": "Rule / Formula: Generated Code → Sandboxed Preview + Diffs"
            }
          ]
        },
        {
          "name": "Per-Turn Artifact Version History",
          "children": [
            {
              "name": "Maintains discrete Artifact version snapshots across prompt turns so engineers inspect exact code and diagram diffs safely."
            },
            {
              "name": "Rule / Formula: Version Snapshots → Inspect Iterative Diffs"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 08: Reusable SKILL.md Playbooks vs Fixed Weights",
      "children": [
        {
          "name": "Core Principle: Skills package repeatable Markdown instructions and deterministic scripts loaded on demand—not newly trained model weights."
        },
        {
          "name": "Instructions + Scripts, Not Weights",
          "children": [
            {
              "name": "Bundles YAML metadata, step-by-step Markdown rules, and deterministic Python or shell verifiers into a portable folder."
            },
            {
              "name": "Rule / Formula: Skill = Markdown Procedure + Helper Script"
            }
          ]
        },
        {
          "name": "Two-Stage Context Window Loading",
          "children": [
            {
              "name": "Startup reads compact skill metadata only; full SKILL.md text enters the Context Window strictly when triggered."
            },
            {
              "name": "Rule / Formula: Idle: Metadata Only → Triggered: Full Playbook"
            }
          ]
        },
        {
          "name": "Pairing LLMs with Exact Code",
          "children": [
            {
              "name": "Delegates arithmetic thresholds and citation checks—like 84.2°C vs 85.0°C—to verify_document.py rather than token guesses."
            },
            {
              "name": "Rule / Formula: Prose Draft (LLM) + Math/ID Audit (Python)"
            }
          ]
        },
        {
          "name": "Dependency-Tracked Execution",
          "children": [
            {
              "name": "Decomposes multi-file deliverables into ordered checkpoints so persistent agents resume cleanly across sessions."
            },
            {
              "name": "Rule / Formula: Persistent State = Disk Checkpoints (Not RL)"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 09: Claude Code CLI, Plan Mode & Subagent Contexts",
      "children": [
        {
          "name": "Core Principle: Claude Code isolates noisy repository searches inside subagent Context Windows to preserve lead-agent Attention fidelity."
        },
        {
          "name": "Headless CI/CD & Custom Agents",
          "children": [
            {
              "name": "Exposes context compaction, tool dispatch, and MCP connectivity as a Python and TypeScript library for automated pipelines."
            },
            {
              "name": "Rule / Formula: SDK: Compaction + Tool Loop + MCP in CI"
            }
          ]
        },
        {
          "name": "Terminal-Native Repository Loop",
          "children": [
            {
              "name": "Reads CLAUDE.md conventions, navigates git trees, edits source files, and runs unit test suites directly in the shell."
            },
            {
              "name": "Rule / Formula: Loop: Read Repo → Edit Diff → Run pytest/lint"
            }
          ]
        },
        {
          "name": "Spec Verification Before Mutation",
          "children": [
            {
              "name": "Disables write and bash mutation tools while the agent maps dependencies, edge cases, and test steps for human sign-off."
            },
            {
              "name": "Rule / Formula: Phase 1: Read-Only Plan → Phase 2: Approved Edit"
            }
          ]
        },
        {
          "name": "Preventing Context Window Pollution",
          "children": [
            {
              "name": "Each spawned subagent searches files or runs logs in a separate Context Window, returning a compact summary to the parent."
            },
            {
              "name": "Rule / Formula: Parent Context ← Distilled Subagent Summary"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 10: OS-Level Computer Use vs DOM Browser Use",
      "children": [
        {
          "name": "Core Principle: Prefer CLI or MCP APIs first, structured DOM Browser Use second, and pixel-level Desktop Computer Use only for API-less GUIs."
        },
        {
          "name": "Structured DOM + Viewport Control",
          "children": [
            {
              "name": "Drives Chrome or Playwright via DOM selectors, console logs, and screenshots for web QA and cloud admin workflows."
            },
            {
              "name": "Rule / Formula: DOM Tree + Selector → Deterministic Web Action"
            }
          ]
        },
        {
          "name": "Pixel Screenshots & Virtual Input",
          "children": [
            {
              "name": "Reads desktop framebuffers, computes X/Y pixel coordinates, and sends virtual mouse/keyboard events inside a container."
            },
            {
              "name": "Rule / Formula: Screenshot → (X, Y) Coordinate → Virtual Click"
            }
          ]
        },
        {
          "name": "Observe-After-Act Recovery Loop",
          "children": [
            {
              "name": "Inspects the post-action frame after every click to detect validation banners, layout shifts, or modal blockers."
            },
            {
              "name": "Rule / Formula: Act → Capture Frame → Verify State Transition"
            }
          ]
        },
        {
          "name": "Latency & Token Cost Hierarchy",
          "children": [
            {
              "name": "Direct CLI/MCP calls cost tens of tokens in milliseconds; full-screen GUI loops cost thousands of tokens per step."
            },
            {
              "name": "Rule / Formula: Priority: CLI / MCP → DOM Browser → Pixel GUI"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 11: Permission Tiers, Kernel Sandboxes & Hooks",
      "children": [
        {
          "name": "Core Principle: Never rely on prompt wording alone for safety; enforce kernel sandboxes, explicit approval tiers, and deterministic hooks."
        },
        {
          "name": "Graduated Operator Approval",
          "children": [
            {
              "name": "Scales from Read-Only Plan Mode and Ask Default to Auto-Accept Edits, reserving Bypass Mode strictly for isolated VMs."
            },
            {
              "name": "Rule / Formula: Tiers: Plan → Ask → Accept Edits → VM Bypass"
            }
          ]
        },
        {
          "name": "Filesystem & Network Containment",
          "children": [
            {
              "name": "Enforces OS-level write confinement to workspace paths, blocks SSH/.env exfiltration, and filters outbound domains."
            },
            {
              "name": "Rule / Formula: Syscall Gate: Workspace R/W Only + Proxy Filter"
            }
          ]
        },
        {
          "name": "Blocking Destructive Shell Calls",
          "children": [
            {
              "name": "Deterministic PreToolUse hooks execute external shell or Python policies before tool calls to block destructive git or file ops."
            },
            {
              "name": "Rule / Formula: PreToolUse Non-Zero Exit → Block Execution"
            }
          ]
        },
        {
          "name": "Auto-Running Linters & Verifiers",
          "children": [
            {
              "name": "PostToolUse hooks run deterministic linters, typecheckers, or verify_document.py immediately after every file edit or tool run."
            },
            {
              "name": "Rule / Formula: Tool Call → PostToolUse(verify_document.py)"
            }
          ]
        }
      ]
    },
    {
      "name": "Ch. 12: Verified Anthropic Pipeline & Handoff to Part 7",
      "children": [
        {
          "name": "Core Principle: Combine cached primary context, MCP tools, modular Skills, and deterministic hooks—then proceed to Part 7: Google AI."
        },
        {
          "name": "Streaming LOG-104 & SPEC-201",
          "children": [
            {
              "name": "An MCP resource server streams primary evidence LOG-104 and SPEC-201 into a Prompt-Cached window, cutting prefill cost up to 90%."
            },
            {
              "name": "Rule / Formula: MCP Resource + Prompt Cache → −90% Prefill"
            }
          ]
        },
        {
          "name": "Extended Thinking & Exact Citations",
          "children": [
            {
              "name": "Claude Sonnet or Opus runs a 5-part prompt and SKILL.md playbook, checking 84.2°C vs SPEC-201's 85.0°C ceiling and −18.4 psi drop."
            },
            {
              "name": "Rule / Formula: 5-Part Spec + SKILL.md → 84.2°C ≤ 85.0°C; −18.4 psi"
            }
          ]
        },
        {
          "name": "Subagents, Kernel Gates & Hooks",
          "children": [
            {
              "name": "Isolate noisy searches in subagents, confine processes via Seatbelt/bwrap, and run verify_document.py in PostToolUse."
            },
            {
              "name": "Rule / Formula: Sandbox + PostToolUse → Zero Unverified Claims"
            }
          ]
        },
        {
          "name": "Google AI & Antigravity Deep Dive",
          "children": [
            {
              "name": "Gort-VII and C-Protocol examine Gemini models, Multimodal Live APIs, NotebookLM grounding, and the Antigravity harness."
            },
            {
              "name": "Rule / Formula: Next: AI For Engineers · Part 07 (Google AI)"
            }
          ]
        }
      ]
    }
  ]
}
