@base <https://code.claude.com/docs/en/how-claude-code-works> .
@prefix schema: <https://schema.org/> .
@prefix owl: <https://www.w3.org/2002/07/owl#> .

<#article> a schema:TechArticle ;
  schema:headline "How Claude Code works"@en ;
  schema:name "How Claude Code works"@en ;
  schema:inLanguage "en" ;
  schema:url <https://code.claude.com/docs/en/how-claude-code-works> ;
  schema:publisher <#claude-code-docs> ;
  schema:author <#anthropic> ;
  schema:abstract """This documentation page explains Claude Code as an agentic coding assistant built around an iterative loop of gathering context, taking action, and verifying results through model reasoning plus tool use."""@en ;
  schema:about
    <#claude-code>,
    <#agentic-loop>,
    <#claude-models>,
    <#claude-code-tools>,
    <#context-window>,
    <#sessions>,
    <#checkpoints>,
    <#permissions>,
    <#execution-environments> ;
  schema:articleSection
    "The agentic loop"@en,
    "Models and tools"@en,
    "What Claude can access"@en,
    "Environments and interfaces"@en,
    "Sessions and context"@en,
    "Safety mechanisms"@en ;
  schema:articleBody """The page presents Claude Code as a terminal-based agentic assistant. It describes an iterative loop where Claude gathers context, takes actions with tools, and verifies results before repeating as needed. The documentation explains model choice, tool categories, execution environments, session persistence, context window management, subagents and skills, plus checkpoints and permission modes as core operational concepts."""@en ;
  schema:hasPart
    <#part-loop>,
    <#part-tools>,
    <#part-access>,
    <#part-env>,
    <#part-sessions>,
    <#part-safety> ;
  schema:mentions
    <#defined-terms>,
    <#claude-code-howto>,
    <#faq-1>, <#faq-2>, <#faq-3>, <#faq-4>, <#faq-5>,
    <#faq-6>, <#faq-7>, <#faq-8>, <#faq-9>, <#faq-10> .

<#anthropic> a schema:Organization ;
  schema:name "Anthropic"@en ;
  schema:url <https://www.anthropic.com/> ;
  owl:sameAs <https://dbpedia.org/resource/Anthropic> .

<#claude-code-docs> a schema:WebSite ;
  schema:name "Claude Code Docs"@en ;
  schema:url <https://code.claude.com/docs/en> ;
  schema:publisher <#anthropic> .

<#claude-code> a schema:SoftwareApplication, schema:Product ;
  schema:name "Claude Code"@en ;
  schema:url <https://code.claude.com/docs/en/how-claude-code-works> ;
  schema:brand <#anthropic> ;
  schema:applicationCategory "Agentic coding assistant"@en ;
  schema:description """Claude Code is described as a terminal-native assistant that can reason over a project, use tools, edit files, run commands, search the web, and verify outcomes through iterative execution."""@en ;
  schema:featureList
    "Agentic loop of gather context, take action, verify results"@en,
    "Model-driven reasoning with selectable Claude models"@en,
    "Built-in tools for file operations, search, execution, web, and code intelligence"@en,
    "Multiple environments including local, cloud, and remote control"@en,
    "Session persistence, context compaction, and forking"@en,
    "Safety via checkpoints and permission modes"@en .

<#part-loop> a schema:WebPageElement ;
  schema:name "The agentic loop"@en ;
  schema:position 1 ;
  schema:about <#agentic-loop>, <#claude-models>, <#claude-code-tools> ;
  schema:text """The page defines the agentic loop as gathering context, taking action, and verifying results. It emphasizes that these phases blend together and adapt to the task, with Claude course-correcting based on tool feedback and user interruption."""@en .

<#part-tools> a schema:WebPageElement ;
  schema:name "Models and tools"@en ;
  schema:position 2 ;
  schema:about <#claude-models>, <#claude-code-tools>, <#skills>, <#subagents> ;
  schema:text """This section explains that models supply reasoning while tools supply action. It categorizes tools into file operations, search, execution, web, and code intelligence, and places skills, MCP, hooks, and subagents on top of the core loop."""@en .

<#part-access> a schema:WebPageElement ;
  schema:name "What Claude can access"@en ;
  schema:position 3 ;
  schema:about <#project-access>, <#terminal-access>, <#git-state>, <#claude-md>, <#auto-memory> ;
  schema:text """The documentation says Claude Code can access the current project, terminal commands, git state, project instructions in CLAUDE.md, auto memory, and configured extensions such as MCP servers, skills, subagents, and browser integrations."""@en .

<#part-env> a schema:WebPageElement ;
  schema:name "Environments and interfaces"@en ;
  schema:position 4 ;
  schema:about <#execution-environments>, <#local-environment>, <#cloud-environment>, <#remote-control>, <#interfaces> ;
  schema:text """This section distinguishes execution environments from interfaces. It explains that the same agentic loop appears everywhere, while code may execute locally, in Anthropic-managed cloud VMs, or on a user machine controlled remotely from a browser."""@en .

<#part-sessions> a schema:WebPageElement ;
  schema:name "Sessions and context"@en ;
  schema:position 5 ;
  schema:about <#sessions>, <#context-window>, <#auto-compaction>, <#resume-fork>, <#worktrees> ;
  schema:text """The docs describe local JSONL session storage, fresh context per session, branching through resume or fork, context compaction, and using skills or subagents to control context growth."""@en .

<#part-safety> a schema:WebPageElement ;
  schema:name "Safety mechanisms"@en ;
  schema:position 6 ;
  schema:about <#checkpoints>, <#permissions>, <#permission-modes> ;
  schema:text """Claude Code uses checkpoints to snapshot file changes before edits and permission modes to control what the assistant can do without asking. These mechanisms are presented as the two key safety controls."""@en .

<#agentic-loop> a schema:DefinedTerm ;
  schema:name "Agentic loop"@en ;
  schema:description """The recurring cycle of gathering context, taking action, and verifying results that powers Claude Code's autonomous-but-steerable task execution."""@en .

<#claude-models> a schema:DefinedTerm ;
  schema:name "Claude models"@en ;
  schema:description """The reasoning component of Claude Code. The docs note that different models trade off speed and capability, with Sonnet handling most coding tasks and Opus offering stronger reasoning for harder decisions."""@en .

<#claude-code-tools> a schema:DefinedTerm ;
  schema:name "Claude Code tools"@en ;
  schema:description """The actionable capabilities that let Claude read, edit, search, execute commands, browse the web, and use code intelligence rather than only producing text."""@en .

<#project-access> a schema:DefinedTerm ;
  schema:name "Project access"@en ;
  schema:description """When run inside a directory, Claude Code can access files in that directory and subdirectories, plus other files with permission."""@en .

<#terminal-access> a schema:DefinedTerm ;
  schema:name "Terminal access"@en ;
  schema:description """Claude can run command-line tools, build commands, scripts, and other shell operations available to the user in the terminal environment."""@en .

<#git-state> a schema:DefinedTerm ;
  schema:name "Git state"@en ;
  schema:description """The documentation notes that Claude Code can inspect the current branch, uncommitted changes, and recent commit history as part of its context."""@en .

<#claude-md> a schema:DefinedTerm ;
  schema:name "CLAUDE.md"@en ;
  schema:description """A project-specific markdown file used to store persistent instructions, conventions, and context that should load for each Claude session."""@en .

<#auto-memory> a schema:DefinedTerm ;
  schema:name "Auto memory"@en ;
  schema:description """Learnings Claude saves across sessions, such as project patterns and user preferences, with a bounded amount loaded at session start."""@en .

<#execution-environments> a schema:DefinedTerm ;
  schema:name "Execution environments"@en ;
  schema:description """The three places code execution can happen for Claude Code: local, cloud, and remote control."""@en .

<#local-environment> a schema:DefinedTerm ;
  schema:name "Local environment"@en ;
  schema:description """The default mode where code runs on the user's own machine with access to local files, tools, and environment."""@en .

<#cloud-environment> a schema:DefinedTerm ;
  schema:name "Cloud environment"@en ;
  schema:description """Anthropic-managed virtual machines used to offload tasks or work on repositories not available locally."""@en .

<#remote-control> a schema:DefinedTerm ;
  schema:name "Remote Control"@en ;
  schema:description """A mode where the user's machine executes the work while being controlled from a browser interface."""@en .

<#interfaces> a schema:DefinedTerm ;
  schema:name "Interfaces"@en ;
  schema:description """The documentation lists terminal, desktop app, IDE extensions, web, Remote Control, Slack, and CI/CD as different interfaces over the same underlying agentic loop."""@en .

<#sessions> a schema:DefinedTerm ;
  schema:name "Sessions"@en ;
  schema:description """Conversations stored locally as plaintext JSONL files so work can be resumed, forked, and replayed later."""@en .

<#context-window> a schema:DefinedTerm ;
  schema:name "Context window"@en ;
  schema:description """The active working memory for Claude Code, including conversation history, files, outputs, CLAUDE.md, auto memory, skills, and system instructions."""@en .

<#auto-compaction> a schema:DefinedTerm ;
  schema:name "Auto-compaction"@en ;
  schema:description """Claude Code's automatic process for clearing older outputs and summarizing conversation state as the context window approaches its limit."""@en .

<#resume-fork> a schema:DefinedTerm ;
  schema:name "Resume or fork sessions"@en ;
  schema:description """Resume continues an existing session with the same ID, while fork branches from its history into a new session for parallel exploration."""@en .

<#worktrees> a schema:DefinedTerm ;
  schema:name "Git worktrees for parallel sessions"@en ;
  schema:description """The docs recommend git worktrees when running parallel Claude sessions so each session has a separate directory and branch context."""@en .

<#skills> a schema:DefinedTerm ;
  schema:name "Skills"@en ;
  schema:description """On-demand reusable workflows and instructions that load only when needed, helping extend Claude Code without bloating context."""@en .

<#subagents> a schema:DefinedTerm ;
  schema:name "Subagents"@en ;
  schema:description """Fresh-context delegated workers that can handle bounded tasks separately and return summaries without inflating the main conversation context."""@en .

<#checkpoints> a schema:DefinedTerm ;
  schema:name "Checkpoints"@en ;
  schema:description """Local file snapshots taken before edits so changes can be rewound independently of git."""@en .

<#permissions> a schema:DefinedTerm ;
  schema:name "Permissions"@en ;
  schema:description """The controls that determine what Claude can do without asking, especially around edits and shell commands."""@en .

<#permission-modes> a schema:DefinedTerm ;
  schema:name "Permission modes"@en ;
  schema:description """The documented modes that change how often Claude asks before performing edits or commands, such as default approval and auto-accept edits."""@en .

<#defined-terms> a schema:DefinedTermSet ;
  schema:name "Defined terms for How Claude Code works"@en ;
  schema:hasPart
    <#agentic-loop>,
    <#claude-models>,
    <#claude-code-tools>,
    <#project-access>,
    <#terminal-access>,
    <#git-state>,
    <#claude-md>,
    <#auto-memory>,
    <#execution-environments>,
    <#local-environment>,
    <#cloud-environment>,
    <#remote-control>,
    <#interfaces>,
    <#sessions>,
    <#context-window>,
    <#auto-compaction>,
    <#resume-fork>,
    <#worktrees>,
    <#skills>,
    <#subagents>,
    <#checkpoints>,
    <#permissions>,
    <#permission-modes> ;
  schema:isPartOf <#article> .

<#claude-code-howto> a schema:HowTo ;
  schema:name "How to work effectively with Claude Code"@en ;
  schema:about <#claude-code>, <#agentic-loop>, <#checkpoints> ;
  schema:isPartOf <#article> ;
  schema:step <#step-1>, <#step-2>, <#step-3>, <#step-4> ;
  schema:description """The page describes a practical rhythm for using Claude Code: start with clear goals and context, let Claude gather and act, verify outputs, and steer or compact context as needed."""@en .

<#step-1> a schema:HowToStep ;
  schema:name "State the task and constraints clearly"@en ;
  schema:position 1 ;
  schema:text "Give Claude a specific task, the relevant goal, and any important verification criteria up front."@en ;
  schema:isPartOf <#claude-code-howto> .

<#step-2> a schema:HowToStep ;
  schema:name "Let Claude gather context and act"@en ;
  schema:position 2 ;
  schema:text "Claude searches files, reads context, uses tools, edits code, and runs commands according to what the task requires."@en ;
  schema:isPartOf <#claude-code-howto> .

<#step-3> a schema:HowToStep ;
  schema:name "Verify and course-correct"@en ;
  schema:position 3 ;
  schema:text "Claude runs tests, reads outputs, and adapts based on what it learns while you can interrupt and steer at any time."@en ;
  schema:isPartOf <#claude-code-howto> .

<#step-4> a schema:HowToStep ;
  schema:name "Manage context and safety"@en ;
  schema:position 4 ;
  schema:text "Use CLAUDE.md, skills, subagents, checkpoints, and permission modes to keep long sessions productive and safe."@en ;
  schema:isPartOf <#claude-code-howto> .

<#faq-1> a schema:Question ;
  schema:name "What is the agentic loop?"@en ;
  schema:text "What is the agentic loop?"@en ;
  schema:acceptedAnswer <#faq-1-answer> ;
  schema:isPartOf <#article> .
<#faq-1-answer> a schema:Answer ;
  schema:text "It is the cycle where Claude gathers context, takes action with tools, verifies results, and repeats until the task is complete."@en ;
  schema:isPartOf <#article> .

<#faq-2> a schema:Question ;
  schema:name "What makes Claude Code agentic?"@en ;
  schema:text "What makes Claude Code agentic?"@en ;
  schema:acceptedAnswer <#faq-2-answer> ;
  schema:isPartOf <#article> .
<#faq-2-answer> a schema:Answer ;
  schema:text "Claude Code is agentic because it combines model reasoning with tools that let it read files, edit code, run commands, search the web, and verify work."@en ;
  schema:isPartOf <#article> .

<#faq-3> a schema:Question ;
  schema:name "Which models does the page highlight?"@en ;
  schema:text "Which models does the page highlight?"@en ;
  schema:acceptedAnswer <#faq-3-answer> ;
  schema:isPartOf <#article> .
<#faq-3-answer> a schema:Answer ;
  schema:text "The page highlights Sonnet for most coding tasks and Opus for stronger reasoning on more complex architectural work."@en ;
  schema:isPartOf <#article> .

<#faq-4> a schema:Question ;
  schema:name "What categories of tools are built in?"@en ;
  schema:text "What categories of tools are built in?"@en ;
  schema:acceptedAnswer <#faq-4-answer> ;
  schema:isPartOf <#article> .
<#faq-4-answer> a schema:Answer ;
  schema:text "The docs group tools into file operations, search, execution, web, and code intelligence, plus orchestration capabilities like subagents and question asking."@en ;
  schema:isPartOf <#article> .

<#faq-5> a schema:Question ;
  schema:name "What can Claude access in a project?"@en ;
  schema:text "What can Claude access in a project?"@en ;
  schema:acceptedAnswer <#faq-5-answer> ;
  schema:isPartOf <#article> .
<#faq-5-answer> a schema:Answer ;
  schema:text "It can access your project files, terminal commands, git state, CLAUDE.md instructions, auto memory, and configured extensions such as MCP, skills, and subagents."@en ;
  schema:isPartOf <#article> .

<#faq-6> a schema:Question ;
  schema:name "Where can Claude Code run?"@en ;
  schema:text "Where can Claude Code run?"@en ;
  schema:acceptedAnswer <#faq-6-answer> ;
  schema:isPartOf <#article> .
<#faq-6-answer> a schema:Answer ;
  schema:text "The docs describe three execution environments: local on your machine, cloud on Anthropic-managed VMs, and Remote Control where your machine is driven from a browser."@en ;
  schema:isPartOf <#article> .

<#faq-7> a schema:Question ;
  schema:name "How are sessions stored?"@en ;
  schema:text "How are sessions stored?"@en ;
  schema:acceptedAnswer <#faq-7-answer> ;
  schema:isPartOf <#article> .
<#faq-7-answer> a schema:Answer ;
  schema:text "Sessions are written locally as plaintext JSONL files under ~/.claude/projects/ so they can be resumed, rewound, and forked."@en ;
  schema:isPartOf <#article> .

<#faq-8> a schema:Question ;
  schema:name "What happens when context fills up?"@en ;
  schema:text "What happens when context fills up?"@en ;
  schema:acceptedAnswer <#faq-8-answer> ;
  schema:isPartOf <#article> .
<#faq-8-answer> a schema:Answer ;
  schema:text "Claude Code first clears older tool outputs and then summarizes conversation state if needed, while preserving requests and important snippets as much as possible."@en ;
  schema:isPartOf <#article> .

<#faq-9> a schema:Question ;
  schema:name "How do skills and subagents help with context?"@en ;
  schema:text "How do skills and subagents help with context?"@en ;
  schema:acceptedAnswer <#faq-9-answer> ;
  schema:isPartOf <#article> .
<#faq-9-answer> a schema:Answer ;
  schema:text "Skills load on demand, and subagents get fresh isolated context, so both help control how much information the main conversation carries."@en ;
  schema:isPartOf <#article> .

<#faq-10> a schema:Question ;
  schema:name "What are the two main safety mechanisms?"@en ;
  schema:text "What are the two main safety mechanisms?"@en ;
  schema:acceptedAnswer <#faq-10-answer> ;
  schema:isPartOf <#article> .
<#faq-10-answer> a schema:Answer ;
  schema:text "The page identifies checkpoints for undoing file edits and permissions for controlling what Claude can do without asking."@en ;
  schema:isPartOf <#article> .
