@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#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix cli: <http://ggen.io/ontology/cli-copilot#> .

# Ontology definition
cli:CLICopilotOntology a owl:Ontology ;
    rdfs:label "CLI Copilot Ontology" ;
    dc:description "RDF ontology for intelligent CLI command assistance" ;
    dc:creator "ggen-team" ;
    owl:versionInfo "1.0.0" .

# Core Classes
cli:Copilot a owl:Class ; rdfs:label "CLI Copilot" ; rdfs:comment "Intelligent CLI assistant" .
cli:Command a owl:Class ; rdfs:label "Command" ; rdfs:comment "CLI command" .
cli:Shell a owl:Class ; rdfs:label "Shell" ; rdfs:comment "Command shell" .
cli:History a owl:Class ; rdfs:label "Command History" ; rdfs:comment "Historical command data" .
cli:SafetyCheck a owl:Class ; rdfs:label "Safety Check" ; rdfs:comment "Command safety validation" .
cli:Suggestion a owl:Class ; rdfs:label "Suggestion" ; rdfs:comment "Command suggestion" .
cli:Translation a owl:Class ; rdfs:label "Translation" ; rdfs:comment "Natural language to command translation" .
cli:Workflow a owl:Class ; rdfs:label "Workflow" ; rdfs:comment "Command workflow automation" .

# Shell instances
cli:Bash a cli:Shell ; rdfs:label "Bash" ; cli:shellPath "/bin/bash" .
cli:Zsh a cli:Shell ; rdfs:label "Zsh" ; cli:shellPath "/bin/zsh" .
cli:Fish a cli:Shell ; rdfs:label "Fish" ; cli:shellPath "/usr/bin/fish" .
cli:PowerShell a cli:Shell ; rdfs:label "PowerShell" ; cli:shellPath "pwsh" .

# Properties
cli:hasShell a owl:ObjectProperty ; rdfs:domain cli:Copilot ; rdfs:range cli:Shell .
cli:executes a owl:ObjectProperty ; rdfs:domain cli:Copilot ; rdfs:range cli:Command .
cli:suggests a owl:ObjectProperty ; rdfs:domain cli:Copilot ; rdfs:range cli:Suggestion .
cli:validates a owl:ObjectProperty ; rdfs:domain cli:Copilot ; rdfs:range cli:SafetyCheck .
cli:commandText a owl:DatatypeProperty ; rdfs:domain cli:Command ; rdfs:range xsd:string .
cli:description a owl:DatatypeProperty ; rdfs:domain cli:Command ; rdfs:range xsd:string .
cli:isDangerous a owl:DatatypeProperty ; rdfs:domain cli:Command ; rdfs:range xsd:boolean .
cli:requiresConfirmation a owl:DatatypeProperty ; rdfs:domain cli:Command ; rdfs:range xsd:boolean .
cli:successRate a owl:DatatypeProperty ; rdfs:domain cli:Command ; rdfs:range xsd:float .
cli:timestamp a owl:DatatypeProperty ; rdfs:domain cli:Command ; rdfs:range xsd:dateTime .
cli:userInput a owl:DatatypeProperty ; rdfs:domain cli:Translation ; rdfs:range xsd:string .
cli:translatedCommand a owl:DatatypeProperty ; rdfs:domain cli:Translation ; rdfs:range xsd:string .
cli:confidence a owl:DatatypeProperty ; rdfs:domain cli:Translation ; rdfs:range xsd:float .

# Safety Checks
cli:PermissionCheck a cli:SafetyCheck ; rdfs:label "Permission Check" ; cli:description "Validate file/directory permissions" .
cli:PathValidation a cli:SafetyCheck ; rdfs:label "Path Validation" ; cli:description "Validate file paths" .
cli:DestructiveOpCheck a cli:SafetyCheck ; rdfs:label "Destructive Operation Check" ; cli:description "Detect destructive operations (rm, dd, etc.)" .
cli:NetworkCheck a cli:SafetyCheck ; rdfs:label "Network Check" ; cli:description "Validate network operations" .
cli:SystemCheck a cli:SafetyCheck ; rdfs:label "System Check" ; cli:description "Validate system-level operations" .

# Command Categories
cli:FileOperation a cli:Command ; rdfs:label "File Operation" ; cli:description "File/directory manipulation" .
cli:GitOperation a cli:Command ; rdfs:label "Git Operation" ; cli:description "Git version control" .
cli:PackageManager a cli:Command ; rdfs:label "Package Manager" ; cli:description "Package management (npm, cargo, pip)" .
cli:DockerCommand a cli:Command ; rdfs:label "Docker Command" ; cli:description "Docker containerization" .
cli:KubernetesCommand a cli:Command ; rdfs:label "Kubernetes Command" ; cli:description "Kubernetes orchestration" .
cli:NetworkCommand a cli:Command ; rdfs:label "Network Command" ; cli:description "Network utilities" .
cli:SystemCommand a cli:Command ; rdfs:label "System Command" ; cli:description "System administration" .

# Workflow Patterns
cli:Pipeline a cli:Workflow ; rdfs:label "Pipeline" ; cli:description "Command pipeline automation" .
cli:Script a cli:Workflow ; rdfs:label "Script" ; cli:description "Shell script generation" .
cli:Alias a cli:Workflow ; rdfs:label "Alias" ; cli:description "Command alias creation" .
cli:Function a cli:Workflow ; rdfs:label "Function" ; cli:description "Shell function generation" .
