@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:WhistleblowerPersonalConsciencePrinciple a owl:Class ;
    rdfs:label "Whistleblower Personal Conscience Principle"@en ;
    proeth:extensionalCases "NSPE BER Case 82-5",
        "NSPE BER Case 99-8" ;
    proeth:groundingStatus "Partially derived: the reporting duty grounds to NSPE II.1.f / II.1.a; the personal-conscience surplus beyond what the rules compel is extensional, grounded in BER Cases 99-8 and 82-5 (cited 2026-07-06)." ;
    proeth:nspeReference "Rule of Practice II.1.f" ;
    iao:0000115 "The value that a professional may act on personal conscience to disclose conduct that endangers the public, beyond the minimum the rules compel."@en ;
    iao:0000119 "National Society of Professional Engineers, Board of Ethical Review (1999). Case 99-8, Incomplete Plans and Specifications - Engineer, Government, and Contractor Responsibilities." ;
    dcterms:source <https://doi.org/10.1016/S0004-3702(03)00135-8>,
        "NSPE Code of Ethics Rule of Practice II.1.f" ;
    rdfs:comment "The value that a professional may act on personal conscience to disclose conduct that endangers the public, beyond the minimum the rules compel."@en ;
    rdfs:subClassOf proeth:ProfessionalVirtuePrinciple ;
    skos:changeNote "2026-07-06: the beyond-the-minimum personal-conscience value is the Board's case-law doctrine, not the II.1.f text (a mandatory reporting rule); grounded extensionally in BER Case 99-8, whose discussion states that the ethical duty or right becomes a matter of personal conscience, quoting the doctrine's origin in BER Case 82-5 (verified against the case text). The II.1.f anchor remains the provision tier."@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 .

