@prefix hh:   <https://herdhound.dev/ns#> .
@prefix rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl:  <http://www.w3.org/2002/07/owl#> .

<https://herdhound.dev/ns> a owl:Ontology ;
    rdfs:label "HerdHound harness vocabulary" ;
    rdfs:comment "Terms that tie ontology concepts to Claude Code tool calls, and guardrail rules on them." .

hh:Rule a rdfs:Class ;
    rdfs:label "Rule" ;
    rdfs:comment "A guardrail. It fires for a tool call that is an instance of a concept it applies to, and its severity decides what happens." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:matchTool a rdf:Property ;
    rdfs:label "match tool" ;
    rdfs:comment "A regular expression that must match the whole tool name, such as Bash, Read|Write|Edit or mcp__.*. A concept with only this matcher matches every call of those tools." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:matchInput a rdf:Property ;
    rdfs:label "match input" ;
    rdfs:comment "A regular expression searched in the Bash command, or in the tool input as JSON for other tools. Backslashes are doubled in Turtle strings. Patterns use ASCII rules ((?i), \\w, \\s and \\b ignore non-ASCII letters); start one with (?u) for full Unicode." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:matchPath a rdf:Property ;
    rdfs:label "match path" ;
    rdfs:comment "A glob matched against file_path, path or notebook_path: * stays within a folder, ** crosses folders, ? is one character. It matches the whole path or its tail." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:appliesTo a rdf:Property ;
    rdfs:label "applies to" ;
    rdfs:domain hh:Rule ;
    rdfs:comment "The concept a rule guards. The rule fires for calls that are that concept or anything below it in the taxonomy." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:requires a rdf:Property ;
    rdfs:label "requires" ;
    rdfs:domain hh:Rule ;
    rdfs:comment "The rule fires only while no earlier call in the session was this concept: \"do X before Y\"." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:severity a rdf:Property ;
    rdfs:label "severity" ;
    rdfs:domain hh:Rule ;
    rdfs:comment "\"deny\" blocks the call, \"ask\" asks the user, \"warn\" (the default) tells the agent and lets the call run. When several rules fire, the strictest wins." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:message a rdf:Property ;
    rdfs:label "message" ;
    rdfs:domain hh:Rule ;
    rdfs:comment "What the agent reads when the rule fires. Say what to do instead." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .

hh:seeAlso a rdf:Property ;
    rdfs:label "see also" ;
    rdfs:domain hh:Rule ;
    rdfs:comment "A concept the agent should look up next, named in the message it gets." ;
    rdfs:isDefinedBy <https://herdhound.dev/ns> .
