@prefix : <https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b#> .
@prefix schema: <http://schema.org/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
# Canonical corpus ComparisonDimension (reuse, do not re-mint — agent-rdf-memory/entities/ontology-terms.ttl)
@prefix cdx: <https://neo4j.com/blog/graph-database/introducing-neo4j-virtual-graph-graph-reasoning-on-the-data-you-already-have/#> .

# schema:hasPart :ontology

# ── Document entity (CreativeWork) — NOT the ontology ────────────────────────

<> a schema:CreativeWork ;
    schema:name "Coding Agent Harness Comparison Knowledge Graph Document"@en ;
    schema:description "RDF document about the Grok share comparison of Pi, OpenCode, Claude Code, and Codex coding agent harnesses, including ABox instances and a companion lightweight ontology for document-local classes and properties."@en ;
    schema:identifier "https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b" ;
    schema:dateCreated "2026-08-11T16:10:00Z"^^xsd:dateTime ;
    schema:dateModified "2026-08-11T16:50:00Z"^^xsd:dateTime ;
    schema:about :ontology, :analysis ;
    schema:author <https://linkedin.com/in/kidehen#this> ;
    prov:wasDerivedFrom <https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b> ;
    prov:wasGeneratedBy <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator#this> .

# ── Distinct owl:Ontology (TBox home for locally minted terms) ───────────────

:ontology a owl:Ontology ;
    schema:name "Coding Agent Harness Comparison Ontology"@en ;
    schema:description "Lightweight ontology defining document-local classes and properties for comparing coding agent harnesses (CodingAgentHarness and related properties). ComparisonDimension is REUSED from the corpus-canonical cdx:ComparisonDimension, not re-minted here."@en ;
    schema:identifier "https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b#ontology" ;
    rdfs:label "Coding Agent Harness Comparison Ontology"@en ;
    rdfs:comment "TBox for harness comparison: local CodingAgentHarness class and properties; ComparisonDimension class imported/reused via cdx: from the Neo4j Virtual Graph comparison origin document (corpus registry)."@en ;
    owl:imports <http://schema.org/> ;
    rdfs:seeAlso cdx:ComparisonDimension ,
        <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/agent-rdf-memory/entities/ontology-terms.ttl> .

# ── Ontology classes & properties ────────────────────────────────────────────
# Pattern: (1) search shared ontologies + corpus registry; (2) reuse if found;
# (3) only then mint under :ontology with rdfs:isDefinedBy :ontology.

:CodingAgentHarness a rdfs:Class, owl:Class ;
    rdfs:label "Coding Agent Harness"@en ;
    rdfs:comment "A wrapper around one or more LLMs that provides tools for file I/O, shell commands, context management, and autonomous iteration on code tasks. No confident schema.org class at this specificity; subclass of schema:SoftwareApplication. Checked schema.org SoftwareApplication/WebApplication — neither denotes agent harnesses specifically."@en ;
    schema:name "Coding Agent Harness"@en ;
    schema:description "Software environment that turns an LLM into an agentic coding system via tools, prompts, and orchestration."@en ;
    rdfs:isDefinedBy :ontology ;
    rdfs:subClassOf schema:SoftwareApplication .

# ComparisonDimension: REUSE corpus-canonical class (do not declare a second local class)
# Canonical: cdx:ComparisonDimension  (owl:equivalentClass list in entities/ontology-terms.ttl)

:hasLaborTAM a rdf:Property ;
    rdfs:label "has labor TAM"@en ;
    rdfs:comment "Not used for this document; reserved for industry analyses."@en ;
    schema:name "has labor TAM"@en ;
    schema:description "Placeholder property retained for ontology symmetry with market-analysis templates."@en ;
    rdfs:isDefinedBy :ontology ;
    rdfs:domain :CodingAgentHarness ;
    rdfs:range xsd:string .

:hasAutomationReadiness a rdf:Property ;
    rdfs:label "has automation readiness"@en ;
    rdfs:comment "Qualitative readiness of a harness for autonomous multi-step engineering work."@en ;
    schema:name "has automation readiness"@en ;
    schema:description "Qualitative readiness rating for autonomous engineering tasks."@en ;
    rdfs:isDefinedBy :ontology ;
    rdfs:domain :CodingAgentHarness ;
    rdfs:range xsd:string .

:hasCorePhilosophy a rdf:Property ;
    rdfs:label "has core philosophy"@en ;
    rdfs:comment "Design philosophy of a coding agent harness."@en ;
    schema:name "has core philosophy"@en ;
    schema:description "Short statement of design philosophy."@en ;
    rdfs:isDefinedBy :ontology ;
    rdfs:domain :CodingAgentHarness ;
    rdfs:range xsd:string .

:hasSystemPromptOverhead a rdf:Property ;
    rdfs:label "has system prompt overhead"@en ;
    rdfs:comment "Approximate token overhead of the harness system prompt and default tool schemas."@en ;
    schema:name "has system prompt overhead"@en ;
    schema:description "Token budget consumed by harness overhead before user task tokens."@en ;
    rdfs:isDefinedBy :ontology ;
    rdfs:domain :CodingAgentHarness ;
    rdfs:range xsd:string .

:hasModelFlexibility a rdf:Property ;
    rdfs:label "has model flexibility"@en ;
    rdfs:comment "How freely the harness can switch LLM providers and models."@en ;
    schema:name "has model flexibility"@en ;
    schema:description "Degree of multi-provider and BYOK model support."@en ;
    rdfs:isDefinedBy :ontology ;
    rdfs:domain :CodingAgentHarness ;
    rdfs:range xsd:string .

# ── Main analysis article ────────────────────────────────────────────────────

:analysis a schema:Article, schema:TechArticle, schema:CreativeWork ;
    schema:name "How do Pi, OpenCode, Claude Code, and Codex compare as coding agent harnesses?"@en ;
    schema:headline "Coding Agent Harness Comparison: Pi vs OpenCode vs Claude Code vs Codex"@en ;
    schema:abstract "Tabulated comparison of four coding agent harnesses — Pi, OpenCode, Claude Code, and Codex (CLI) — covering creators, license, philosophy, tools, model support, extensibility, safety, strengths, weaknesses, best-fit use cases, and pricing (sources 2025–2026)."@en ;
    schema:description """Pi, OpenCode, Claude Code, and Codex are coding agent harnesses (wrappers around LLMs that provide tools for file I/O, shell commands, context management, and autonomous iteration on code tasks). They differ mainly in philosophy, model flexibility, feature richness, and openness. Pi is minimalist and transparent (MIT, ~4 core tools, very small system prompt). OpenCode is model-agnostic and community-driven (MIT, strong MCP/LSP orchestration). Claude Code is Anthropic's heavyweight batteries-included harness with deep multi-agent autonomy. Codex (CLI) is OpenAI's engineering-focused harness with strong OS-enforced sandboxing and Apache 2.0 open harness code (models closed). Choice heuristic: deep multi-step repo work → Claude Code; OpenAI ecosystem + reliability → Codex; maximum control/transparency → Pi; open multi-model without lock-in → OpenCode."""@en ;
    schema:articleBody """User prompt: How do Pi, OpenCode, Claude Code, and Codex compare as harnesses? I want this in tabulated form.

Answer (Grok, 2025–2026 sources): Coding agent harnesses wrap LLMs with tools for file I/O, shell, context, and autonomous code iteration. Key comparison dimensions include creator/backer, license/openness, core philosophy, system prompt overhead, default tools, model support, extensibility, safety/permissions, strengths, weaknesses, best-for, and pricing.

Pi (Mario Zechner / Earendil): MIT; minimalist & transparent with tiny prompt and 4 core tools; highly flexible multi-provider models; YOLO-by-default safety with container isolation preferred; best for custom loops and cost-sensitive multi-model work.

OpenCode (Anomaly ex-SST, community): MIT; model-agnostic practical open alternative; Claude-style tools plus LSP/MCP; safer configurable defaults; best for open multi-model daily use (e.g. OpenRouter).

Claude Code (Anthropic): proprietary; heavyweight batteries-included autonomy; large prompt/tool surface; primarily Claude models; deny-first permissions; best for complex multi-step repo work.

Codex CLI (OpenAI): Apache 2.0 harness (models closed); reliable engineering focus with OS sandboxing (Seatbelt/bubblewrap), network denied by default; primarily OpenAI/Codex models; best for GPT/Codex users wanting reliability and safe execution.

Summary: Pi = extreme minimal; Claude Code = feature-rich heavyweight; OpenCode and Codex sit between (openness vs sandbox reliability). Harness design itself meaningfully affects outcomes even with the same underlying model. Tools evolve quickly — check current docs."""@en ;
    schema:url <https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b> ;
    schema:datePublished "2026-08-11"^^xsd:date ;
    schema:dateCreated "2026-08-11T16:10:00Z"^^xsd:dateTime ;
    schema:dateModified "2026-08-11T16:10:00Z"^^xsd:dateTime ;
    schema:inLanguage "en" ;
    schema:author :grok ;
    schema:publisher <http://dbpedia.org/resource/X_(social_network)> ;
    schema:about :codingAgentHarnessConcept, :piHarness, :openCodeHarness, :claudeCodeHarness, :codexHarness,
        <http://dbpedia.org/resource/Artificial_intelligence>,
        <http://dbpedia.org/resource/Large_language_model>,
        <http://dbpedia.org/resource/Software_agent> ;
    schema:keywords "coding agent harness, Pi, OpenCode, Claude Code, Codex, AI coding tools, agentic development, MCP, sandboxing, BYOK"@en ;
    schema:relatedLink <https://vuink.com/post/grpufgnpxhcf-d-dpbz/comparisons/coding-agent-harness-comparison-2026>,
        <https://agenticschool.dev/courses/foundations/what-is-a-harness-claude-code-vs-codex-vs-pi-vs-opencode>,
        <https://zenn.dev/ncdc/articles/2b2593798e7342>,
        <https://pi.dev>,
        <https://opencode.ai>,
        <https://www.anthropic.com>,
        <https://openai.com>,
        <https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b> ;
    schema:isBasedOn :conversation ;
    schema:hasPart :ontology, :faqSection, :glossarySection, :howtoSection, :harnessSection, :dimensionSection,
        :summaryNotesSection, :orgSection, :comparisonTableSection ;
    prov:wasDerivedFrom <https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b> ;
    prov:wasGeneratedBy <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator#this>,
        <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/rdf-infographic-skill#this> .

:conversation a schema:SocialMediaPosting, schema:Conversation ;
    schema:name "Grok share — coding agent harness comparison"@en ;
    schema:description "Shared Grok conversation comparing Pi, OpenCode, Claude Code, and Codex as coding agent harnesses in tabulated form."@en ;
    schema:url <https://x.com/i/grok/share/a3cf868fd6434047b9534bb2f3baa44b> ;
    schema:headline "How do Pi, OpenCode, Claude Code, and Codex compare as harnesses?"@en ;
    schema:text "How do Pi, OpenCode, Claude Code, and Codex compare as harnesses? I want this in tabulated form."@en ;
    schema:author :grok ;
    schema:datePublished "2026-08-11"^^xsd:date ;
    schema:isPartOf :analysis ;
    schema:about :codingAgentHarnessConcept .

:codingAgentHarnessConcept a skos:Concept, schema:Thing ;
    schema:name "Coding agent harness"@en ;
    schema:description "A wrapper around LLMs that provides tools for file I/O, shell commands, context management, and autonomous iteration on code tasks."@en ;
    skos:prefLabel "coding agent harness"@en ;
    skos:definition "Software layer that turns a large language model into an agentic coding system by supplying tools, prompts, permissions, and orchestration."@en ;
    owl:sameAs <http://dbpedia.org/resource/Software_agent> .

# ── Skill provenance ─────────────────────────────────────────────────────────

<https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator#this> a schema:SoftwareApplication ;
    schema:name "kg-generator skill"@en ;
    schema:url <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator> ;
    schema:description "Generates comprehensive schema.org Knowledge Graphs (RDF-Turtle/JSON-LD) from file: or http(s): content sources."@en .

<https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/rdf-infographic-skill#this> a schema:SoftwareApplication ;
    schema:name "rdf-infographic-skill"@en ;
    schema:url <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/rdf-infographic-skill> ;
    schema:description "Transforms RDF knowledge graphs into interactive HTML infographics with D3 explorers, SPARQL workbenches, and resolver-backed entity links."@en .

:grok a schema:SoftwareApplication, schema:Person ;
    schema:name "Grok"@en ;
    schema:description "xAI conversational assistant that authored the tabulated harness comparison in the shared conversation."@en ;
    schema:url <https://x.ai/> ;
    schema:provider <http://dbpedia.org/resource/X_AI> ;
    owl:sameAs <https://x.com/grok#this> .

# ── People & orgs ────────────────────────────────────────────────────────────

:orgSection a schema:ArticleSection ;
    schema:name "Creators and organizations"@en ;
    schema:description "Backers and organizations behind the four coding agent harnesses."@en ;
    schema:isPartOf :analysis ;
    schema:hasPart <https://linkedin.com/in/kidehen#this>, :marioZechner, :earendil, :anomalyCo,
        <http://dbpedia.org/resource/Anthropic>, <http://dbpedia.org/resource/OpenAI> .

<https://linkedin.com/in/kidehen#this> a schema:Person ;
    schema:name "Kingsley Uyi Idehen"@en ;
    schema:description "Founder & CEO of OpenLink Software; Semantic Web pioneer and principal operator for this knowledge-graph collection. Curates agent skills and RDF-backed infographics connecting coding-agent harnesses to Linked Data tooling (Virtuoso, URIBurner)."@en ;
    schema:jobTitle "Founder & CEO"@en ;
    schema:worksFor <http://dbpedia.org/resource/OpenLink_Software> ;
    schema:email "kidehen@openlinksw.com" ;
    schema:url <https://www.linkedin.com/in/kidehen> ;
    owl:sameAs <https://www.linkedin.com/in/kidehen#this>, <https://x.com/kidehen#this>, <https://substack.com/@kidehen#this> .

:marioZechner a schema:Person ;
    schema:name "Mario Zechner"@en ;
    schema:description "Independent creator associated with the Pi coding agent harness (Earendil)."@en ;
    schema:worksFor :earendil .

:earendil a schema:Organization ;
    schema:name "Earendil"@en ;
    schema:description "Independent backer associated with the Pi coding agent harness."@en .

:anomalyCo a schema:Organization ;
    schema:name "Anomaly"@en ;
    schema:description "Organization (ex-SST roots) associated with the community-driven OpenCode harness."@en ;
    schema:description "Community-driven open-source coding agent project roots linked to Anomaly (ex-SST)."@en .

<http://dbpedia.org/resource/Anthropic> a schema:Organization ;
    schema:name "Anthropic"@en ;
    schema:description "AI research company that builds Claude models and the proprietary Claude Code coding agent harness compared in this analysis."@en ;
    schema:url <https://www.anthropic.com/> ;
    owl:sameAs <http://www.wikidata.org/entity/Q108712137> .

<http://dbpedia.org/resource/OpenAI> a schema:Organization ;
    schema:name "OpenAI"@en ;
    schema:description "AI research company behind Codex (CLI) and the GPT/Codex model family referenced in the harness comparison."@en ;
    schema:url <https://openai.com/> ;
    owl:sameAs <http://www.wikidata.org/entity/Q21708200> .

<http://dbpedia.org/resource/X_AI> a schema:Organization ;
    schema:name "xAI"@en ;
    schema:description "Company behind Grok, which authored the tabulated coding-agent harness comparison in the source conversation share."@en ;
    schema:url <https://x.ai/> .

<http://dbpedia.org/resource/X_(social_network)> a schema:Organization ;
    schema:name "X (social network)"@en ;
    schema:description "Social network that hosts the Grok conversation share used as the source document for this knowledge graph."@en ;
    schema:url <https://x.com/> .

# ── Harness products ─────────────────────────────────────────────────────────

:harnessSection a schema:ArticleSection ;
    schema:name "Coding agent harnesses"@en ;
    schema:description "The four compared harness products: Pi, OpenCode, Claude Code, and Codex CLI."@en ;
    schema:isPartOf :analysis ;
    schema:hasPart :piHarness, :openCodeHarness, :claudeCodeHarness, :codexHarness .

:piHarness a :CodingAgentHarness, schema:SoftwareApplication, schema:Product ;
    schema:name "Pi"@en ;
    schema:alternateName "Pi coding agent"@en ;
    schema:description "Minimalist MIT-licensed coding agent harness with a tiny system prompt, four core tools (read, write, edit, bash), excellent TypeScript extensibility, and highly flexible multi-provider model support (BYOK, local/Ollama)."@en ;
    schema:applicationCategory "DeveloperApplication"@en ;
    schema:operatingSystem "Cross-platform"@en ;
    schema:license "MIT"@en ;
    schema:creator :marioZechner ;
    schema:provider :earendil ;
    schema:url <https://pi.dev> ;
    schema:identifier "https://pi.dev" ;
    :hasCorePhilosophy "Minimalist and transparent: tiny prompt, 4 core tools, you own and extend everything"@en ;
    :hasSystemPromptOverhead "Very small (~200–1,000 tokens)"@en ;
    :hasModelFlexibility "Highly flexible (15+ providers, 300+ models, BYOK, local/Ollama)"@en ;
    :hasAutomationReadiness "High for custom/scripted loops; fewer built-in sub-agents without extensions"@en ;
    schema:featureList "4 core tools (read, write, edit, bash); optional read-only mode; TypeScript extensions, skills, packages, RPC/SDK; token efficiency; low lock-in"@en ;
    schema:additionalProperty :piPricing, :piSafety, :piBestFor, :piWeakness .

:piPricing a schema:PropertyValue ;
    schema:name "Pricing model"@en ;
    schema:value "Free (BYOK / pay provider)"@en .

:piSafety a schema:PropertyValue ;
    schema:name "Safety / permissions"@en ;
    schema:value "YOLO by default (user in control; container isolation preferred)"@en .

:piBestFor a schema:PropertyValue ;
    schema:name "Best for"@en ;
    schema:value "Custom/scripted loops, full visibility, builders who want control, multi-model/cost-sensitive work"@en .

:piWeakness a schema:PropertyValue ;
    schema:name "Key weakness"@en ;
    schema:value "Fewer built-ins (sub-agents/plan mode via extensions); less hand-holding"@en .

:openCodeHarness a :CodingAgentHarness, schema:SoftwareApplication, schema:Product ;
    schema:name "OpenCode"@en ;
    schema:description "Model-agnostic, community-driven MIT-licensed coding agent harness offering Claude-style tools plus LSP, MCP, and search orchestration, with safer configurable defaults and multi-session support."@en ;
    schema:applicationCategory "DeveloperApplication"@en ;
    schema:license "MIT"@en ;
    schema:provider :anomalyCo ;
    schema:url <https://opencode.ai> ;
    schema:identifier "https://opencode.ai" ;
    :hasCorePhilosophy "Model-agnostic, community-driven, practical open alternative with good orchestration"@en ;
    :hasSystemPromptOverhead "Moderate (~few–10k tokens range)"@en ;
    :hasModelFlexibility "Highly flexible (75+ providers via Models.dev, BYOK, local)"@en ;
    :hasAutomationReadiness "High for flexible daily multi-model use"@en ;
    schema:featureList "Claude-style tool set; LSP; MCP; search orchestration; plugins; multi-surface; multi-session"@en ;
    schema:additionalProperty :ocPricing, :ocSafety, :ocBestFor, :ocWeakness .

:ocPricing a schema:PropertyValue ;
    schema:name "Pricing model"@en ;
    schema:value "Free (BYOK / pay provider; some hosted options)"@en .

:ocSafety a schema:PropertyValue ;
    schema:name "Safety / permissions"@en ;
    schema:value "Safer defaults, configurable"@en .

:ocBestFor a schema:PropertyValue ;
    schema:name "Best for"@en ;
    schema:value "Open-source, model-agnostic setups (e.g., OpenRouter), flexible daily use"@en .

:ocWeakness a schema:PropertyValue ;
    schema:name "Key weakness"@en ;
    schema:value "Can feel less 'magical' than lab tools; community polish varies"@en .

:claudeCodeHarness a :CodingAgentHarness, schema:SoftwareApplication, schema:Product ;
    schema:name "Claude Code"@en ;
    schema:description "Anthropic's proprietary heavyweight coding agent harness with deep repository integration, multi-agent workflows, large tool surface (10–25+ tools), deny-first permissions, and polished long-horizon autonomy."@en ;
    schema:applicationCategory "DeveloperApplication"@en ;
    schema:license "Proprietary (closed)"@en ;
    schema:provider <http://dbpedia.org/resource/Anthropic> ;
    schema:url <https://www.anthropic.com> ;
    schema:identifier "https://www.anthropic.com" ;
    :hasCorePhilosophy "Heavyweight, batteries-included, deep integration and autonomy"@en ;
    :hasSystemPromptOverhead "Large (~10k+ tokens, extensive rules/tools)"@en ;
    :hasModelFlexibility "Primarily Claude models (limited others with setup)"@en ;
    :hasAutomationReadiness "Very high for complex multi-step repository work"@en ;
    schema:featureList "Read/Write/Edit/Bash/Glob/Grep/Web/Notebook/Task; sub-agents; teams; hooks; skills; MCP; CLAUDE.md rules"@en ;
    schema:additionalProperty :ccPricing, :ccSafety, :ccBestFor, :ccWeakness .

:ccPricing a schema:PropertyValue ;
    schema:name "Pricing model"@en ;
    schema:value "Subscription ($20–200/mo tiers) or API"@en .

:ccSafety a schema:PropertyValue ;
    schema:name "Safety / permissions"@en ;
    schema:value "Deny-first, rich permission modes, sandboxing"@en .

:ccBestFor a schema:PropertyValue ;
    schema:name "Best for"@en ;
    schema:value "Complex multi-step repo work, conventions/tests, autonomous deep engineering"@en .

:ccWeakness a schema:PropertyValue ;
    schema:name "Key weakness"@en ;
    schema:value "High token use/cost, model lock-in, more 'magic'/opacity"@en .

:codexHarness a :CodingAgentHarness, schema:SoftwareApplication, schema:Product ;
    schema:name "Codex (CLI)"@en ;
    schema:alternateName "OpenAI Codex CLI"@en ;
    schema:description "OpenAI's coding agent harness with Apache 2.0 open harness code (models closed), ~10 tools, strong OS-enforced sandboxing (Seatbelt/bubblewrap), network denied by default, and a reliability-first engineering focus."@en ;
    schema:applicationCategory "DeveloperApplication"@en ;
    schema:license "Apache 2.0 (harness open; models closed)"@en ;
    schema:provider <http://dbpedia.org/resource/OpenAI> ;
    schema:url <https://openai.com> ;
    schema:identifier "https://openai.com" ;
    :hasCorePhilosophy "Reliable engineering focus with strong sandboxing and model strength"@en ;
    :hasSystemPromptOverhead "Moderate / relatively efficient"@en ;
    :hasModelFlexibility "Primarily OpenAI/Codex models (Ollama official; others community)"@en ;
    :hasAutomationReadiness "High for structured tasks and reliability-sensitive work"@en ;
    schema:featureList "~10 tools; OS-enforced sandboxing; Seatbelt/bubblewrap; network denied by default; solid architecture"@en ;
    schema:additionalProperty :cxPricing, :cxSafety, :cxBestFor, :cxWeakness .

:cxPricing a schema:PropertyValue ;
    schema:name "Pricing model"@en ;
    schema:value "ChatGPT plan credits / API (tied to OpenAI)"@en .

:cxSafety a schema:PropertyValue ;
    schema:name "Safety / permissions"@en ;
    schema:value "Strong OS-enforced sandboxing (Seatbelt/bubblewrap), network denied by default"@en .

:cxBestFor a schema:PropertyValue ;
    schema:name "Best for"@en ;
    schema:value "GPT/Codex users wanting solid sandboxing and reliability; second opinions or structured tasks"@en .

:cxWeakness a schema:PropertyValue ;
    schema:name "Key weakness"@en ;
    schema:value "Model lock-in, less mature extensibility vs pure open tools"@en .

# ── Comparison dimensions ────────────────────────────────────────────────────

:dimensionSection a schema:ArticleSection ;
    schema:name "Comparison dimensions"@en ;
    schema:description "Aspects used in the tabulated harness comparison."@en ;
    schema:isPartOf :analysis ;
    schema:hasPart :dimCreator, :dimLicense, :dimPhilosophy, :dimPromptOverhead, :dimTools,
        :dimModels, :dimExtensibility, :dimSafety, :dimStrengths, :dimWeaknesses, :dimBestFor, :dimPricing .

:dimCreator a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Creator / Backer"@en ;
    schema:description "Organization or individual that creates or backs the harness."@en .

:dimLicense a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "License / Openness"@en ;
    schema:description "Software license and openness of harness source code versus model weights."@en .

:dimPhilosophy a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Core Philosophy"@en ;
    schema:description "Design intent: minimalist, model-agnostic, heavyweight, or reliability-first."@en .

:dimPromptOverhead a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "System Prompt / Overhead"@en ;
    schema:description "Approximate token cost of system prompt and default tool schemas."@en .

:dimTools a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Default Tools"@en ;
    schema:description "Built-in tool surface for file I/O, shell, search, MCP, and sub-agents."@en .

:dimModels a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Model Support"@en ;
    schema:description "Which LLM providers and models the harness can use."@en .

:dimExtensibility a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Extensibility"@en ;
    schema:description "Skills, plugins, MCP, hooks, SDK, and community extension mechanisms."@en .

:dimSafety a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Safety / Permissions"@en ;
    schema:description "Default permission posture and sandboxing model."@en .

:dimStrengths a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Key Strengths"@en ;
    schema:description "Primary advantages relative to peer harnesses."@en .

:dimWeaknesses a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Key Weaknesses"@en ;
    schema:description "Primary trade-offs relative to peer harnesses."@en .

:dimBestFor a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Best For"@en ;
    schema:description "Use cases where the harness is the strongest fit."@en .

:dimPricing a cdx:ComparisonDimension, schema:DefinedTerm ;
    schema:name "Pricing Model"@en ;
    schema:description "How users pay: free BYOK, subscription tiers, or API credits."@en .

:comparisonTableSection a schema:ArticleSection, schema:Table ;
    schema:name "Head-to-head comparison table"@en ;
    schema:description "Tabulated comparison of Pi, OpenCode, Claude Code, and Codex across twelve aspects from the Grok conversation. Each aspect column label denotes a :ComparisonDimension entity that MUST be resolver-linked in the HTML first column."@en ;
    schema:isPartOf :analysis ;
    schema:about :piHarness, :openCodeHarness, :claudeCodeHarness, :codexHarness,
        :dimCreator, :dimLicense, :dimPhilosophy, :dimPromptOverhead, :dimTools,
        :dimModels, :dimExtensibility, :dimSafety, :dimStrengths, :dimWeaknesses,
        :dimBestFor, :dimPricing ;
    schema:hasPart :dimCreator, :dimLicense, :dimPhilosophy, :dimPromptOverhead, :dimTools,
        :dimModels, :dimExtensibility, :dimSafety, :dimStrengths, :dimWeaknesses,
        :dimBestFor, :dimPricing .

:dimCreator schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimLicense schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimPhilosophy schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimPromptOverhead schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimTools schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimModels schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimExtensibility schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimSafety schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimStrengths schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimWeaknesses schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimBestFor schema:isPartOf :comparisonTableSection, :dimensionSection .
:dimPricing schema:isPartOf :comparisonTableSection, :dimensionSection .

# ── Summary notes / choice heuristic ─────────────────────────────────────────

:summaryNotesSection a schema:ArticleSection ;
    schema:name "Summary notes and choice heuristic"@en ;
    schema:description "Cross-cutting observations: minimal vs heavyweight, token efficiency, performance context, and selection heuristic."@en ;
    schema:isPartOf :analysis ;
    schema:hasPart :noteMinimalVsHeavy, :noteTokenEfficiency, :notePerformance, :noteChoiceHeuristic .

:noteMinimalVsHeavy a schema:Claim ;
    schema:name "Minimal vs heavyweight spectrum"@en ;
    schema:text "Pi sits at the extreme minimal end (less between you and the model). Claude Code is the feature-rich heavyweight. OpenCode and Codex sit in between, with OpenCode emphasizing openness/flexibility and Codex emphasizing engineering reliability plus sandboxing."@en ;
    schema:about :piHarness, :claudeCodeHarness, :openCodeHarness, :codexHarness .

:noteTokenEfficiency a schema:Claim ;
    schema:name "Token efficiency"@en ;
    schema:text "Pi and Codex often use far fewer input tokens than Claude Code on comparable tasks due to lighter prompts and tools."@en ;
    schema:about :piHarness, :codexHarness, :claudeCodeHarness .

:notePerformance a schema:Claim ;
    schema:name "Performance context"@en ;
    schema:text "Results vary by task and underlying model. Claude Code and Codex frequently top or trade places on complex autonomous work; Pi and OpenCode excel when flexibility, cost, or transparency matter. The harness itself meaningfully affects outcomes even with the same model."@en ;
    schema:about :codingAgentHarnessConcept .

:noteChoiceHeuristic a schema:Claim ;
    schema:name "Choice heuristic"@en ;
    schema:text "Deep multi-step repo work → Claude Code; OpenAI ecosystem and reliability → Codex; maximum control/transparency/custom loops → Pi; open multi-model without lock-in → OpenCode."@en ;
    schema:about :piHarness, :openCodeHarness, :claudeCodeHarness, :codexHarness .

# ── FAQ (12) ─────────────────────────────────────────────────────────────────

:faqSection a schema:FAQPage ;
    schema:name "FAQ — Coding agent harness comparison"@en ;
    schema:description "Twelve frequently asked questions about Pi, OpenCode, Claude Code, and Codex as coding agent harnesses."@en ;
    schema:isPartOf :analysis ;
    schema:mainEntity :q1, :q2, :q3, :q4, :q5, :q6, :q7, :q8, :q9, :q10, :q11, :q12 .

:q1 a schema:Question ;
    schema:name "What is a coding agent harness?"@en ;
    schema:text "What is a coding agent harness?"@en ;
    schema:acceptedAnswer :a1 .

:a1 a schema:Answer ;
    schema:text "A coding agent harness is a wrapper around one or more large language models that supplies tools for file I/O, shell commands, context management, and autonomous iteration on software tasks — turning a chat model into an agentic coding system."@en ;
    schema:about :codingAgentHarnessConcept .

:q2 a schema:Question ;
    schema:name "How do Pi, OpenCode, Claude Code, and Codex differ at a high level?"@en ;
    schema:text "How do Pi, OpenCode, Claude Code, and Codex differ at a high level?"@en ;
    schema:acceptedAnswer :a2 .

:a2 a schema:Answer ;
    schema:text "They differ mainly in philosophy, model flexibility, feature richness, and openness. Pi is minimalist and transparent; OpenCode is open and model-agnostic; Claude Code is a heavyweight batteries-included Anthropic product; Codex emphasizes engineering reliability and OS sandboxing in the OpenAI ecosystem."@en .

:q3 a schema:Question ;
    schema:name "Which harnesses are fully open source?"@en ;
    schema:text "Which harnesses are fully open source?"@en ;
    schema:acceptedAnswer :a3 .

:a3 a schema:Answer ;
    schema:text "Pi and OpenCode are MIT-licensed and fully open source. Codex's harness is Apache 2.0 open while its models remain closed. Claude Code is proprietary/closed."@en ;
    schema:about :piHarness, :openCodeHarness, :codexHarness, :claudeCodeHarness .

:q4 a schema:Question ;
    schema:name "Which harness is best for multi-model BYOK setups?"@en ;
    schema:text "Which harness is best for multi-model BYOK setups?"@en ;
    schema:acceptedAnswer :a4 .

:a4 a schema:Answer ;
    schema:text "Pi and OpenCode lead on model flexibility. Pi cites 15+ providers and 300+ models; OpenCode cites 75+ providers via Models.dev, both with BYOK and local options. Claude Code and Codex primarily target their lab's models."@en ;
    schema:about :piHarness, :openCodeHarness .

:q5 a schema:Question ;
    schema:name "Which harness has the smallest system-prompt overhead?"@en ;
    schema:text "Which harness has the smallest system-prompt overhead?"@en ;
    schema:acceptedAnswer :a5 .

:a5 a schema:Answer ;
    schema:text "Pi reports a very small overhead (~200–1,000 tokens). Codex is moderate/efficient. OpenCode is moderate (few–10k). Claude Code is large (~10k+ tokens with extensive rules and tools)."@en ;
    schema:about :piHarness .

:q6 a schema:Question ;
    schema:name "How do safety and permissions compare?"@en ;
    schema:text "How do safety and permissions compare?"@en ;
    schema:acceptedAnswer :a6 .

:a6 a schema:Answer ;
    schema:text "Pi defaults to YOLO with user control and prefers container isolation. OpenCode uses safer configurable defaults. Claude Code is deny-first with rich permission modes. Codex uses strong OS-enforced sandboxing (Seatbelt/bubblewrap) with network denied by default."@en .

:q7 a schema:Question ;
    schema:name "When should I choose Claude Code?"@en ;
    schema:text "When should I choose Claude Code?"@en ;
    schema:acceptedAnswer :a7 .

:a7 a schema:Answer ;
    schema:text "Choose Claude Code for complex multi-step repository work, strong convention/test adherence, multi-agent orchestration, and polished long-horizon autonomous engineering — accepting higher token cost and Claude-centric model lock-in."@en ;
    schema:about :claudeCodeHarness .

:q8 a schema:Question ;
    schema:name "When should I choose Pi?"@en ;
    schema:text "When should I choose Pi?"@en ;
    schema:acceptedAnswer :a8 .

:a8 a schema:Answer ;
    schema:text "Choose Pi for maximum control and transparency, custom/scripted loops, token efficiency, and multi-model or cost-sensitive workflows where you want minimal intermediary magic between you and the model."@en ;
    schema:about :piHarness .

:q9 a schema:Question ;
    schema:name "When should I choose OpenCode?"@en ;
    schema:text "When should I choose OpenCode?"@en ;
    schema:acceptedAnswer :a9 .

:a9 a schema:Answer ;
    schema:text "Choose OpenCode for open-source, model-agnostic daily driving — for example OpenRouter or multi-provider BYOK — with solid MCP/LSP orchestration and community plugins without proprietary lock-in."@en ;
    schema:about :openCodeHarness .

:q10 a schema:Question ;
    schema:name "When should I choose Codex CLI?"@en ;
    schema:text "When should I choose Codex CLI?"@en ;
    schema:acceptedAnswer :a10 .

:a10 a schema:Answer ;
    schema:text "Choose Codex CLI if you are invested in the OpenAI/ChatGPT ecosystem and want solid OS sandboxing, reliability, and structured task execution, or a strong second opinion beside another harness."@en ;
    schema:about :codexHarness .

:q11 a schema:Question ;
    schema:name "Does the harness matter if the underlying model is the same?"@en ;
    schema:text "Does the harness matter if the underlying model is the same?"@en ;
    schema:acceptedAnswer :a11 .

:a11 a schema:Answer ;
    schema:text "Yes. Sources emphasize that the harness meaningfully affects outcomes even with the same model — via prompt overhead, tool design, permission defaults, multi-agent orchestration, and sandboxing constraints."@en ;
    schema:about :codingAgentHarnessConcept .

:q12 a schema:Question ;
    schema:name "What is a practical multi-harness strategy?"@en ;
    schema:text "What is a practical multi-harness strategy?"@en ;
    schema:acceptedAnswer :a12 .

:a12 a schema:Answer ;
    schema:text "Many practitioners keep more than one harness installed and switch by task: Claude Code for deep repo autonomy, Codex for OpenAI reliability and sandboxing, Pi for transparent custom loops, OpenCode for open multi-model work. Docs and features change quickly, so re-check current releases."@en .

# ── Glossary (10) ────────────────────────────────────────────────────────────

:glossarySection a schema:DefinedTermSet, skos:ConceptScheme ;
    schema:name "Glossary — coding agent harness terms"@en ;
    schema:description "Ten defined terms used throughout the harness comparison."@en ;
    schema:isPartOf :analysis ;
    schema:hasDefinedTerm :termHarness, :termBYOK, :termMCP, :termLSP, :termSandboxing,
        :termSystemPrompt, :termSubAgent, :termYOLO, :termTokenEfficiency, :termModelLockIn ;
    skos:hasTopConcept :termHarness, :termBYOK, :termMCP, :termLSP, :termSandboxing,
        :termSystemPrompt, :termSubAgent, :termYOLO, :termTokenEfficiency, :termModelLockIn .

:termHarness a schema:DefinedTerm, skos:Concept ;
    schema:name "Coding agent harness"@en ;
    schema:description "Wrapper around LLMs providing tools, context management, and orchestration for autonomous coding."@en ;
    skos:prefLabel "coding agent harness"@en ;
    skos:definition "Software environment that agentifies an LLM for software engineering tasks."@en ;
    skos:inScheme :glossarySection .

:termBYOK a schema:DefinedTerm, skos:Concept ;
    schema:name "BYOK"@en ;
    schema:description "Bring Your Own Key — the user supplies API keys for LLM providers rather than paying only through a fixed subscription."@en ;
    skos:prefLabel "BYOK"@en ;
    skos:definition "Bring Your Own Key model for LLM provider authentication and billing."@en ;
    skos:inScheme :glossarySection .

:termMCP a schema:DefinedTerm, skos:Concept ;
    schema:name "MCP"@en ;
    schema:description "Model Context Protocol — a standard way for agents to attach external tools and data sources."@en ;
    skos:prefLabel "MCP"@en ;
    skos:definition "Protocol for connecting AI agents to tools and contextual resources."@en ;
    skos:inScheme :glossarySection .

:termLSP a schema:DefinedTerm, skos:Concept ;
    schema:name "LSP"@en ;
    schema:description "Language Server Protocol — used by some harnesses for structured code intelligence (diagnostics, symbols, navigation)."@en ;
    skos:prefLabel "LSP"@en ;
    skos:definition "Protocol that exposes language-aware editor services to tools and agents."@en ;
    skos:inScheme :glossarySection .

:termSandboxing a schema:DefinedTerm, skos:Concept ;
    schema:name "Sandboxing"@en ;
    schema:description "Isolation of agent-executed commands from the host system (containers, Seatbelt, bubblewrap, network deny-by-default)."@en ;
    skos:prefLabel "sandboxing"@en ;
    skos:definition "Runtime isolation that limits what an agent process may read, write, or network to."@en ;
    skos:inScheme :glossarySection .

:termSystemPrompt a schema:DefinedTerm, skos:Concept ;
    schema:name "System prompt overhead"@en ;
    schema:description "Tokens consumed by the harness's standing instructions and tool schemas before the user's task tokens."@en ;
    skos:prefLabel "system prompt overhead"@en ;
    skos:definition "Fixed or semi-fixed token cost of harness instructions and tool definitions."@en ;
    skos:inScheme :glossarySection .

:termSubAgent a schema:DefinedTerm, skos:Concept ;
    schema:name "Sub-agent"@en ;
    schema:description "A delegated agent instance spawned by a parent harness to handle a scoped subtask."@en ;
    skos:prefLabel "sub-agent"@en ;
    skos:definition "Child agent process or session used for task decomposition."@en ;
    skos:inScheme :glossarySection .

:termYOLO a schema:DefinedTerm, skos:Concept ;
    schema:name "YOLO mode"@en ;
    schema:description "Permission posture that allows the agent broad freedom by default, relying on the user or outer isolation for safety."@en ;
    skos:prefLabel "YOLO mode"@en ;
    skos:definition "Permissive default execution mode with minimal interactive approval prompts."@en ;
    skos:inScheme :glossarySection .

:termTokenEfficiency a schema:DefinedTerm, skos:Concept ;
    schema:name "Token efficiency"@en ;
    schema:description "How few input tokens a harness needs for comparable tasks — driven by prompt size and tool schemas."@en ;
    skos:prefLabel "token efficiency"@en ;
    skos:definition "Relative input-token thrift of a harness on similar workloads."@en ;
    skos:inScheme :glossarySection .

:termModelLockIn a schema:DefinedTerm, skos:Concept ;
    schema:name "Model lock-in"@en ;
    schema:description "Dependency on a single lab's models or APIs that raises switching costs across harnesses and providers."@en ;
    skos:prefLabel "model lock-in"@en ;
    skos:definition "Economic and technical friction that keeps users on one model family."@en ;
    skos:inScheme :glossarySection .

# ── HowTo (7 steps) ──────────────────────────────────────────────────────────

:howtoSection a schema:HowTo ;
    schema:name "How to choose a coding agent harness"@en ;
    schema:description "Seven-step process for selecting among Pi, OpenCode, Claude Code, and Codex based on task profile, openness needs, safety posture, and cost."@en ;
    schema:isPartOf :analysis ;
    schema:step :step1, :step2, :step3, :step4, :step5, :step6, :step7 ;
    schema:totalTime "P0DT0H30M" .

:step1 a schema:HowToStep ;
    schema:position 1 ;
    schema:name "Clarify the dominant workload"@en ;
    schema:text "Decide whether your primary work is deep multi-step repository autonomy, structured single tasks, custom scripted loops, or daily multi-model exploration."@en ;
    schema:position "1"^^xsd:integer .

:step2 a schema:HowToStep ;
    schema:position 2 ;
    schema:name "Decide openness and lock-in tolerance"@en ;
    schema:text "If you need fully open harness source and provider freedom, shortlist Pi and OpenCode. If you accept lab lock-in for polish, consider Claude Code or Codex."@en ;
    schema:position "2"^^xsd:integer .

:step3 a schema:HowToStep ;
    schema:position 3 ;
    schema:name "Match safety posture to environment"@en ;
    schema:text "Prefer deny-first or OS sandboxing (Claude Code, Codex) on shared/production machines; Pi's YOLO mode is better with strong container isolation and trusted local repos."@en ;
    schema:position "3"^^xsd:integer .

:step4 a schema:HowToStep ;
    schema:position 4 ;
    schema:name "Budget tokens and dollars"@en ;
    schema:text "Estimate monthly spend. Heavyweight prompts and multi-agent Claude Code workflows can cost more; Pi and Codex often use fewer input tokens; BYOK open harnesses shift cost to provider APIs."@en ;
    schema:position "4"^^xsd:integer .

:step5 a schema:HowToStep ;
    schema:position 5 ;
    schema:name "Check model access you already have"@en ;
    schema:text "If you already pay for Claude, Claude Code is a natural fit. ChatGPT/API users lean Codex. Multi-provider or local-model users lean Pi or OpenCode."@en ;
    schema:position "5"^^xsd:integer .

:step6 a schema:HowToStep ;
    schema:position 6 ;
    schema:name "Prototype on one real repository task"@en ;
    schema:text "Run the same non-trivial task (test fix + PR draft) in your top two harnesses and compare autonomy quality, permission friction, and token use — not just marketing claims."@en ;
    schema:position "6"^^xsd:integer .

:step7 a schema:HowToStep ;
    schema:position 7 ;
    schema:name "Keep a multi-harness toolkit"@en ;
    schema:text "Install more than one harness and switch by task class. Revisit docs often — features, stars, and benchmarks in this space move quickly."@en ;
    schema:position "7"^^xsd:integer .
