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