@prefix core: <http://proethica.org/ontology/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix iao: <http://purl.obolibrary.org/obo/IAO_> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pcsh: <http://proethica.org/shapes/core#> .
@prefix proeth: <http://proethica.org/ontology/intermediate#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

proeth:FundamentalEthicalPrinciple a owl:Class ;
    rdfs:label "Fundamental Ethical Principle"@en ;
    iao:0000115 "A universal moral foundation that serves as the highest-level abstraction in professional ethics, requiring extensive interpretation through concrete cases (BFO: generically dependent continuant)"@en ;
    iao:0000119 "Hallamaa and Kalliokoski (2022). AI Ethics as Applied Ethics. Frontiers in Computer Science 4: 776837 (doi:10.3389/fcomp.2022.776837).",
        "McLaren (2003). Extensionally defining principles and cases in ethics: An AI model. Artificial Intelligence 150(1-2): 145-181.",
        "Morley et al. (2021). Ethics as a Service: A Pragmatic Operationalisation of AI Ethics. Minds and Machines 31(2): 239-256 (doi:10.1007/s11023-021-09563-w).",
        "Taddeo et al. (2024). From AI Ethics Principles to Practices: A Teleological Methodology to Apply AI Ethics Principles in the Defence Domain. Philosophy & Technology 37(1): 42 (doi:10.1007/s13347-024-00710-6)." ;
    dcterms:source <https://doi.org/10.1007/s11023-021-09563-w>,
        <https://doi.org/10.1007/s13347-024-00710-6>,
        <https://doi.org/10.1016/S0004-3702(03)00135-8>,
        <https://doi.org/10.3389/fcomp.2022.776837> ;
    rdfs:comment "Examples: Public Welfare Paramount, Respect for Persons, Justice, Beneficence. These require extensive interpretation and balancing in specific contexts."@en ;
    rdfs:subClassOf core:Principle ;
    skos:changeNote "2026-07-06: the McLaren clause no longer attributes the example pair public welfare and respect for persons to the source (respect for persons does not occur in McLaren; public welfare only as a case title in his corpus list) and now uses the verified McLaren constructs, abstract and open-textured principles extensionally defined through decided cases. The constitutional-foundations clause co-cites Morley et al. 2021, the origin of the analogy, matching the citation form of the dissertation."@en ;
    skos:definition "According to McLaren (2003), fundamental principles are abstract and open-textured, and gain operational meaning through extensional definition in decided ethics cases and professional code applications. These principles function as constitutional-like foundations (Morley et al. 2021; Taddeo et al. 2024) that mediate moral ideals into professional practice (Hallamaa and Kalliokoski 2022)."@en .

pcsh:CaseAnnotationShape a sh:NodeShape ;
    rdfs:label "Shared per-case annotation schema (all nine components)"@en ;
    rdfs:comment "The cross-component annotation fields on committed case individuals: proeth:confidence (extraction confidence, decimal; all components except Action, whose Step-3 contract carries no confidence field), proeth:textReferences (verbatim supporting quotes, universal), proeth-prov sourceText (the source snippet, on the Step-1/2 provenance layers; Step-3 A/E individuals ground via textReferences only), and the involvement gloss (proeth:caseInvolvement on role individuals, proeth:caseContext on obligation, capability, and constraint individuals). Values are per-individual; the fields do not individuate any type."@en ;
    sh:property [ sh:description "Extraction confidence for this individual (0 to 1)." ;
            sh:name "confidence" ;
            sh:order 1 ;
            sh:path proeth:confidence ],
        [ sh:description "Verbatim case quotes supporting this individual." ;
            sh:name "text references" ;
            sh:order 2 ;
            sh:path proeth:textReferences ],
        [ sh:description "How this individual figures in the case narrative (role individuals; the same text is routed into rdfs:comment)." ;
            sh:name "case involvement" ;
            sh:order 3 ;
            sh:path proeth:caseInvolvement ],
        [ sh:description "Grounding context in this case (obligation, capability, and constraint individuals)." ;
            sh:name "case context" ;
            sh:order 4 ;
            sh:path proeth:caseContext ] ;
    sh:targetClass core:Action,
        core:Capability,
        core:Constraint,
        core:Event,
        core:Obligation,
        core:Principle,
        core:Resource,
        core:Role,
        core:State .

pcsh:PrincipleDefinitionShape a sh:NodeShape ;
    rdfs:label "Principle definition schema (type-level, descriptive, field contract)"@en ;
    rdfs:comment "What individuates a principle TYPE: its canonical kind (drives the four-kind subClassOf typing; the canonical leaf becomes the rdf:type) and the extensional cases that ground it (McLaren). The five per-case narrative literals and the invokedBy edge are per-individual and now declared on PrinciplePropertyShape, mirroring the RoleDefinitionShape/ProfessionalRolePropertyShape split so the {{ principle_schema }} prompt separates the type judgment from what the case supplies. Descriptive only (no validation result); principle_category is a routing input, not stored as a literal."@en ;
    sh:property [ sh:description "The controlled principle kind, which drives the four-kind subClassOf typing: FundamentalEthicalPrinciple, ProfessionalVirtuePrinciple, RelationalPrinciple, DomainSpecificPrinciple. The canonical leaf label becomes the rdf:type; the category is a routing input, not stored as a literal." ;
            sh:name "principle kind" ;
            sh:order 1 ;
            sh:path proeth:principleCategory ],
        [ sh:description "Class-level prior cases that instantiate the principle (McLaren extensional grounding); an optional class-mint field." ;
            sh:name "extensional cases" ;
            sh:order 2 ;
            sh:path proeth:extensionalCases ] ;
    sh:targetClass core:Principle .

pcsh:PrinciplePropertyShape a sh:NodeShape ;
    rdfs:label "Principle per-case schema (individual data, non-definitional)"@en ;
    rdfs:comment "What a principle INDIVIDUAL is described by in a specific case: the five narrative literals the defeasibility pipeline consumes and the agent that invokes it. These do NOT individuate the principle TYPE (that is PrincipleDefinitionShape); their values are per-case, asserted on the individual. Descriptive only."@en ;
    sh:property [ sh:description "Per-case reading of what the principle requires in this situation (a defeasibility-pipeline source field)." ;
            sh:name "interpretation" ;
            sh:order 1 ;
            sh:path proeth:interpretation ],
        [ sh:description "How the principle is concretely expressed in the case (a defeasibility-pipeline source field)." ;
            sh:name "concrete expression" ;
            sh:order 2 ;
            sh:path proeth:concreteExpression ],
        [ sh:description "What the principle is applied to in the case (the situation or party it bears on)." ;
            sh:name "applied to" ;
            sh:order 3 ;
            sh:path proeth:appliedTo ],
        [ sh:description "The competing principle or value this principle is balanced against in the case, recorded as a literal; extraction records the tension but asserts no defeat or precedence, and the defeasibility edges are materialized by a separate pass from this field." ;
            sh:name "balancing with" ;
            sh:order 4 ;
            sh:path proeth:balancingWith ],
        [ sh:description "How the case resolves the tension involving this principle (a defeasibility-pipeline source field)." ;
            sh:name "tension resolution" ;
            sh:order 5 ;
            sh:path proeth:tensionResolution ],
        [ sh:description "The agent who invokes the principle, via the P->Agent invokedBy edge (resolved to a case Agent by embedding shortlist + LLM select; a Board-pattern invoking party resolves deterministically to the case-scoped NSPE Board of Ethical Review Agent). Range: Agent." ;
            sh:name "invoked by" ;
            sh:order 6 ;
            sh:path core:invokedBy ] ;
    sh:targetClass core:Principle .

