Skip to content

Instantly share code, notes, and snippets.

@louspringer
Created November 11, 2025 20:12
Show Gist options
  • Select an option

  • Save louspringer/482d1da4266a702afe310675f9333928 to your computer and use it in GitHub Desktop.

Select an option

Save louspringer/482d1da4266a702afe310675f9333928 to your computer and use it in GitHub Desktop.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@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 sh: <http://www.w3.org/ns/shacl#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix meta: <https://nkllon.com/meta#> .
@prefix stake: <https://nkllon.com/stake#> .
@prefix vis: <https://nkllon.com/vision#> .
@prefix math: <https://nkllon.com/math#> .
######################################################################
# Stakeholder‑Vision Gradient Spore
# Version: 0.1.0
# License: MIT (© 2025 Lou Springer)
# Namespace root: https://nkllon.com/
######################################################################
vis: a owl:Ontology ;
rdfs:label "Stakeholder‑Vision Gradient Spore" ;
dc:creator "Lou Springer" ;
dc:license <https://opensource.org/licenses/MIT> .
######################################################################
# 1) Core Classes
######################################################################
vis:Stakeholder a rdfs:Class ; rdfs:label "Stakeholder" .
vis:UtilityFunction a rdfs:Class ; rdfs:label "Utility Function" .
vis:Domain a rdfs:Class ; rdfs:label "Acceptable Domain" .
vis:Boundary a rdfs:Class ; rdfs:label "Boundary (∂D)" .
vis:GradientField a rdfs:Class ; rdfs:label "Gradient Field" .
vis:VisionAttractor a rdfs:Class ; rdfs:label "Vision Attractor" .
vis:Ensemble a rdfs:Class ; rdfs:label "Stakeholder Ensemble" .
vis:Observation a rdfs:Class ; rdfs:label "Observation/Evidence" .
vis:ControlParameter a rdfs:Class ; rdfs:label "Control Parameter (λ)" .
math:Vector a rdfs:Class ; rdfs:label "Vector" .
math:RScalar a rdfs:Class ; rdfs:label "Real Scalar" .
######################################################################
# 2) Properties
######################################################################
# Structure
vis:hasUtility a rdf:Property ; rdfs:domain vis:Stakeholder ; rdfs:range vis:UtilityFunction .
vis:hasDomain a rdf:Property ; rdfs:domain vis:Stakeholder ; rdfs:range vis:Domain .
vis:hasWeight a rdf:Property ; rdfs:domain vis:Stakeholder ; rdfs:range xsd:double ; rdfs:comment "w_i ∈ [0,1]" .
vis:inEnsemble a rdf:Property ; rdfs:domain vis:Stakeholder ; rdfs:range vis:Ensemble .
vis:correlationRho a rdf:Property ; rdfs:domain vis:Ensemble ; rdfs:range xsd:double ; rdfs:comment "Mean inter‑stakeholder belief correlation ρ ∈ [0,1]" .
# Geometry & dynamics
vis:gradientAt a rdf:Property ; rdfs:domain vis:UtilityFunction ; rdfs:range math:Vector ; rdfs:comment "∇U_i(x)" .
vis:jacobianEigRe a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:double ; rdfs:comment "Re(λ_max(J)) near 0 ⇒ bifurcation edge" .
vis:freeEnergy a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:double ; rdfs:comment "Collective free energy F(x)" .
vis:onBoundaryOf a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range vis:Boundary .
vis:intersects a rdf:Property ; rdfs:domain vis:Boundary ; rdfs:range vis:Domain .
# Publication & alignment
vis:publicationURL a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range rdfs:Resource .
vis:publishedDate a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:date .
vis:alignmentScore a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:double ; rdfs:comment "cosine‑based alignment to North‑Star vector ∈ [0,1]" .
vis:drawsFrom a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range vis:Stakeholder ; rdfs:comment "agents/perspectives materially used" .
vis:decisionRule a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:string ; rdfs:comment "One‑sentence decision rule published in article" .
vis:boundaryTradeoff a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:string ; rdfs:comment "Key trade‑off resolved" .
vis:reflectionNote a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:string ; rdfs:comment "Learning to carry forward" .
# Semantics
vis:contributesTo a rdf:Property ; rdfs:domain vis:Stakeholder ; rdfs:range vis:VisionAttractor .
vis:hasEvidence a rdf:Property ; rdfs:domain vis:Stakeholder ; rdfs:range vis:Observation .
vis:controls a rdf:Property ; rdfs:domain vis:ControlParameter ; rdfs:range vis:VisionAttractor .
# Convenience data properties
math:vectorLiteral a rdf:Property ; rdfs:domain math:Vector ; rdfs:range xsd:string ; rdfs:comment "e.g., '[0.6, -0.2, 0.3]' (JSON‑ish)" .
vis:rhoThreshold a rdf:Property ; rdfs:domain vis:Ensemble ; rdfs:range xsd:double ; rdfs:comment "Max allowed ρ for useful diversity" .
vis:epsilon a rdf:Property ; rdfs:domain vis:VisionAttractor ; rdfs:range xsd:double ; rdfs:comment "Tolerance for |Re(λ)| ≤ ε" .
######################################################################
# 3) Axioms / Helpful Annotations
######################################################################
vis:ensembleErrorFormula a rdfs:Resource ;
rdfs:comment "E[ε_ensemble] ≈ ε̄·(ρ + (1−ρ)/n) ; diversity ⇒ lower ρ ⇒ lower error" .
vis:boundaryInsight a rdfs:Resource ;
rdfs:comment "Interesting behavior occurs on ∂D where gradients are non‑aligned: ∇U_i(x) ≠ ∇U_j(x)." .
######################################################################
# 4) SHACL Shapes (governance constraints)
######################################################################
# Stakeholder weights in [0,1]
vis:StakeholderShape a sh:NodeShape ;
sh:targetClass vis:Stakeholder ;
sh:property [ sh:path vis:hasWeight ; sh:minInclusive 0.0 ; sh:maxInclusive 1.0 ; sh:datatype xsd:double ] ;
sh:property [ sh:path vis:hasDomain ; sh:minCount 1 ] ;
sh:property [ sh:path vis:hasUtility ; sh:minCount 1 ] .
# Ensemble diversity constraint ρ ≤ ρ* (default 0.6)
vis:EnsembleShape a sh:NodeShape ;
sh:targetClass vis:Ensemble ;
sh:property [ sh:path vis:correlationRho ; sh:datatype xsd:double ; sh:maxInclusive 0.6 ] ;
sh:property [ sh:path vis:rhoThreshold ; sh:hasValue 0.6 ] .
# Vision attractor at edge of stability: |Re(λ)| ≤ ε (default ε=0.05) + required publication metadata
vis:AttractorShape a sh:NodeShape ;
sh:targetClass vis:VisionAttractor ;
sh:property [ sh:path vis:jacobianEigRe ; sh:datatype xsd:double ; sh:minInclusive -0.05 ; sh:maxInclusive 0.05 ] ;
sh:property [ sh:path vis:epsilon ; sh:hasValue 0.05 ] ;
sh:property [ sh:path vis:freeEnergy ; sh:datatype xsd:double ] ;
sh:property [ sh:path vis:publicationURL ; sh:minCount 1 ] ;
sh:property [ sh:path vis:publishedDate ; sh:minCount 1 ] ;
sh:property [ sh:path vis:decisionRule ; sh:minCount 1 ] ;
sh:property [ sh:path vis:boundaryTradeoff ; sh:minCount 1 ] .
# Boundary must intersect ≥2 stakeholder domains
vis:BoundaryShape a sh:NodeShape ;
sh:targetClass vis:Boundary ;
sh:property [ sh:path vis:intersects ; sh:minCount 2 ] .
######################################################################
# 5) Minimal Example (3‑stakeholder toy)
######################################################################
# Ensemble
stake:team a vis:Ensemble ;
vis:correlationRho "0.38"^^xsd:double ;
vis:rhoThreshold "0.6"^^xsd:double .
# Stakeholders (agents/perspectives)
stake:ops a vis:Stakeholder ; vis:hasWeight "0.35"^^xsd:double ; vis:inEnsemble stake:team .
stake:fin a vis:Stakeholder ; vis:hasWeight "0.30"^^xsd:double ; vis:inEnsemble stake:team .
stake:prod a vis:Stakeholder ; vis:hasWeight "0.35"^^xsd:double ; vis:inEnsemble stake:team .
# Domains
stake:D_ops a vis:Domain .
stake:D_fin a vis:Domain .
stake:D_prod a vis:Domain .
stake:B a vis:Boundary ; vis:intersects stake:D_ops , stake:D_fin , stake:D_prod .
# Utilities and gradients at a candidate x*
stake:U_ops a vis:UtilityFunction ; vis:gradientAt [ a math:Vector ; math:vectorLiteral "[0.6,-0.1,0.2]" ] .
stake:U_fin a vis:UtilityFunction ; vis:gradientAt [ a math:Vector ; math:vectorLiteral "[-0.5,0.3,0.1]" ] .
stake:U_prod a vis:UtilityFunction ; vis:gradientAt [ a math:Vector ; math:vectorLiteral "[0.2,0.2,-0.1]" ] .
stake:ops vis:hasDomain stake:D_ops ; vis:hasUtility stake:U_ops .
stake:fin vis:hasDomain stake:D_fin ; vis:hasUtility stake:U_fin .
stake:prod vis:hasDomain stake:D_prod ; vis:hasUtility stake:U_prod .
# Candidate vision attractor on the boundary (edge of coherence)
stake:visionX a vis:VisionAttractor ;
vis:onBoundaryOf stake:B ;
vis:freeEnergy "1.73"^^xsd:double ;
vis:jacobianEigRe "0.01"^^xsd:double ;
vis:epsilon "0.05"^^xsd:double ;
vis:publicationURL <https://example.com/article-X> ;
vis:publishedDate "2025-10-30"^^xsd:date ;
vis:decisionRule "If A & B, prefer X because Y." ;
vis:boundaryTradeoff "Speed vs. auditability" ;
vis:reflectionNote "Next: add counter‑agent for risk." ;
vis:alignmentScore "0.84"^^xsd:double ;
vis:drawsFrom stake:ops , stake:prod ;
dc:creator "Lou Springer" ;
dc:license <https://opensource.org/licenses/MIT> ;
prov:wasDerivedFrom stake:ops , stake:fin , stake:prod .
# Evidence / provenance (optional)
stake:revQ3 a vis:Observation .
stake:ops vis:hasEvidence stake:revQ3 .
######################################################################
# 6) Publication stubs (replace placeholders as you publish)
######################################################################
# Article A (published)
stake:li_A a vis:VisionAttractor ;
rdfs:label "Series: Part 1" ;
vis:publicationURL <https://www.linkedin.com/posts/...> ;
vis:publishedDate "2025-10-30"^^xsd:date ;
vis:decisionRule "…" ;
vis:boundaryTradeoff "…" ;
vis:alignmentScore "0.00"^^xsd:double ;
vis:drawsFrom stake:ops , stake:fin ;
dc:license <https://opensource.org/licenses/MIT> .
# Article B (published)
stake:li_B a vis:VisionAttractor ;
rdfs:label "Series: Part 2" ;
vis:publicationURL <https://www.linkedin.com/posts/...> ;
vis:publishedDate "2025-11-07"^^xsd:date ;
vis:decisionRule "…" ;
vis:boundaryTradeoff "…" ;
vis:alignmentScore "0.00"^^xsd:double ;
vis:drawsFrom stake:ops , stake:prod ;
dc:license <https://opensource.org/licenses/MIT> .
######################################################################
# 7) SPARQL Queries (reference – run externally)
# Note: The following are comments for convenience; copy into your SPARQL client.
######################################################################
# 7.1) Find boundary candidates where gradients are non‑aligned
# PREFIX vis: <https://nkllon.com/vision#>
# PREFIX math: <https://nkllon.com/math#>
# SELECT ?boundary ?attractor ?g_ops ?g_fin ?g_prod
# WHERE {
# ?attractor a vis:VisionAttractor ; vis:onBoundaryOf ?boundary .
# ?u1 a vis:UtilityFunction ; vis:gradientAt ?v1 . ?v1 math:vectorLiteral ?g_ops .
# ?u2 a vis:UtilityFunction ; vis:gradientAt ?v2 . ?v2 math:vectorLiteral ?g_fin .
# ?u3 a vis:UtilityFunction ; vis:gradientAt ?v3 . ?v3 math:vectorLiteral ?g_prod .
# FILTER (?g_ops != ?g_fin && ?g_ops != ?g_prod && ?g_fin != ?g_prod)
# }
# 7.2) Edge‑of‑stability attractors (|Re(λ)| ≤ ε)
# PREFIX vis: <https://nkllon.com/vision#>
# SELECT ?x ?eig ?eps ?F
# WHERE {
# ?x a vis:VisionAttractor ; vis:jacobianEigRe ?eig ; vis:epsilon ?eps ; vis:freeEnergy ?F .
# FILTER (abs(?eig) <= ?eps)
# }
# ORDER BY ?F
# 7.3) Diversity gate: ensembles with useful heterogeneity (ρ ≤ ρ*)
# PREFIX vis: <https://nkllon.com/vision#>
# SELECT ?team ?rho ?rhoStar
# WHERE {
# ?team a vis:Ensemble ; vis:correlationRho ?rho ; vis:rhoThreshold ?rhoStar .
# FILTER (?rho <= ?rhoStar)
# }
# 7.4) Weighted gradient balance check (metadata extraction)
# PREFIX vis: <https://nkllon.com/vision#>
# PREFIX math: <https://nkllon.com/math#>
# SELECT ?stake ?w ?g
# WHERE {
# ?stake a vis:Stakeholder ; vis:hasWeight ?w ; vis:hasUtility ?u .
# ?u vis:gradientAt ?v .
# ?v math:vectorLiteral ?g .
# }
######################################################################
# 8) Heuristic evaluation pack (notes – non-normative)
# See README for the process boilerplate and checklist.
######################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment