predicate-skill 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/catalog/catalog.json +36 -0
- package/catalog/codebase.shacl.ttl +24 -0
- package/catalog/codebase.ttl +92 -0
- package/catalog/fhir-core.ttl +32 -0
- package/catalog/foaf.ttl +55 -0
- package/catalog/schema-org-lite.ttl +63 -0
- package/catalog/top.ttl +20 -0
- package/cli.bundle.mjs +3 -0
- package/meta/predicate-meta.ttl +99 -0
- package/meta/version.json +6 -0
- package/package.json +4 -2
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0.0",
|
|
3
|
+
"ontologies": [
|
|
4
|
+
{
|
|
5
|
+
"name": "top",
|
|
6
|
+
"description": "Minimal upper ontology — Thing, dependsOn, relatedTo",
|
|
7
|
+
"license": "CC0",
|
|
8
|
+
"files": ["top.ttl"]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"name": "codebase",
|
|
12
|
+
"description": "Software code structure (files, symbols, calls, modifications)",
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"files": ["codebase.ttl"],
|
|
15
|
+
"shapes": "codebase.shacl.ttl"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "foaf",
|
|
19
|
+
"description": "Friend-of-a-friend — faithful subset of xmlns.com/foaf/0.1",
|
|
20
|
+
"license": "CC0",
|
|
21
|
+
"files": ["foaf.ttl"]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "schema-org-lite",
|
|
25
|
+
"description": "Web entities — faithful subset of schema.org core (soft-typed)",
|
|
26
|
+
"license": "CC-BY-4.0",
|
|
27
|
+
"files": ["schema-org-lite.ttl"]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "fhir-core",
|
|
31
|
+
"description": "HL7 FHIR R4 resource class vocabulary (class hierarchy only; load fhir.ttl for full data modeling)",
|
|
32
|
+
"license": "HL7",
|
|
33
|
+
"files": ["fhir-core.ttl"]
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
|
2
|
+
@prefix : <https://predicate.dev/codebase#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
|
|
5
|
+
:FileShape a sh:NodeShape ;
|
|
6
|
+
sh:targetClass :File ;
|
|
7
|
+
sh:property [
|
|
8
|
+
sh:path :path ; sh:datatype xsd:string ;
|
|
9
|
+
sh:minCount 1 ; sh:maxCount 1
|
|
10
|
+
] .
|
|
11
|
+
|
|
12
|
+
:SymbolShape a sh:NodeShape ;
|
|
13
|
+
sh:targetClass :Symbol ;
|
|
14
|
+
sh:property [
|
|
15
|
+
sh:path :declaredIn ; sh:class :File ;
|
|
16
|
+
sh:minCount 1 ; sh:maxCount 1
|
|
17
|
+
] .
|
|
18
|
+
|
|
19
|
+
:CommitShape a sh:NodeShape ;
|
|
20
|
+
sh:targetClass :Commit ;
|
|
21
|
+
sh:property [
|
|
22
|
+
sh:path :sha ; sh:datatype xsd:string ;
|
|
23
|
+
sh:minCount 1 ; sh:maxCount 1
|
|
24
|
+
] .
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@prefix : <https://predicate.dev/codebase#> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
6
|
+
|
|
7
|
+
# --- Classes -------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
:Artifact a owl:Class ; rdfs:label "Artifact" .
|
|
10
|
+
:File a owl:Class ; rdfs:subClassOf :Artifact ; rdfs:label "File" .
|
|
11
|
+
:Symbol a owl:Class ; rdfs:subClassOf :Artifact ; rdfs:label "Symbol" .
|
|
12
|
+
:Function a owl:Class ; rdfs:subClassOf :Symbol ; rdfs:label "Function" .
|
|
13
|
+
:Class a owl:Class ; rdfs:subClassOf :Symbol ; rdfs:label "Class" .
|
|
14
|
+
:Module a owl:Class ; rdfs:subClassOf :Artifact ; rdfs:label "Module" .
|
|
15
|
+
:Package a owl:Class ; rdfs:subClassOf :Artifact ; rdfs:label "Package" .
|
|
16
|
+
:EnvVar a owl:Class ; rdfs:subClassOf :Artifact ; rdfs:label "EnvVar" .
|
|
17
|
+
:Commit a owl:Class ; rdfs:label "Commit" .
|
|
18
|
+
:Test a owl:Class ; rdfs:subClassOf :Artifact ; rdfs:label "Test" .
|
|
19
|
+
:Command a owl:Class ; rdfs:label "Shell command invocation" .
|
|
20
|
+
|
|
21
|
+
:Hotspot a owl:Class ; rdfs:subClassOf :File ; rdfs:label "File modified in many sessions" .
|
|
22
|
+
:FlakyCommand a owl:Class ; rdfs:subClassOf :Command ; rdfs:label "Command that has failed in multiple sessions" .
|
|
23
|
+
:ActiveFile a owl:Class ; rdfs:subClassOf :File ; rdfs:label "File modified in the most recent session" .
|
|
24
|
+
|
|
25
|
+
:Function owl:disjointWith :Class .
|
|
26
|
+
:File owl:disjointWith :Symbol .
|
|
27
|
+
|
|
28
|
+
# --- Properties ----------------------------------------------------
|
|
29
|
+
|
|
30
|
+
:declaredIn a owl:ObjectProperty ;
|
|
31
|
+
rdfs:domain :Symbol ; rdfs:range :File ;
|
|
32
|
+
rdfs:label "declared in" .
|
|
33
|
+
|
|
34
|
+
:imports a owl:ObjectProperty , owl:TransitiveProperty ;
|
|
35
|
+
rdfs:domain :Artifact ; rdfs:range :Artifact ;
|
|
36
|
+
rdfs:label "imports" .
|
|
37
|
+
|
|
38
|
+
:calls a owl:ObjectProperty , owl:TransitiveProperty ;
|
|
39
|
+
rdfs:domain :Function ; rdfs:range :Function ;
|
|
40
|
+
rdfs:label "calls" .
|
|
41
|
+
|
|
42
|
+
:reads a owl:ObjectProperty ;
|
|
43
|
+
rdfs:domain :Function ; rdfs:range :EnvVar ;
|
|
44
|
+
rdfs:label "reads env var" .
|
|
45
|
+
|
|
46
|
+
:dependsOn a owl:ObjectProperty , owl:TransitiveProperty ;
|
|
47
|
+
rdfs:label "depends on" .
|
|
48
|
+
|
|
49
|
+
# Property chain: f calls g ∧ g declaredIn h → f dependsOn h
|
|
50
|
+
:dependsOn owl:propertyChainAxiom ( :calls :declaredIn ) .
|
|
51
|
+
|
|
52
|
+
# Imports implies dependsOn
|
|
53
|
+
:imports rdfs:subPropertyOf :dependsOn .
|
|
54
|
+
|
|
55
|
+
:testedBy a owl:ObjectProperty ;
|
|
56
|
+
owl:inverseOf :tests ;
|
|
57
|
+
rdfs:label "tested by" .
|
|
58
|
+
|
|
59
|
+
:tests a owl:ObjectProperty ;
|
|
60
|
+
rdfs:domain :Test ; rdfs:range :Symbol ;
|
|
61
|
+
rdfs:label "tests" .
|
|
62
|
+
|
|
63
|
+
:lastModifiedIn a owl:ObjectProperty , owl:FunctionalProperty ;
|
|
64
|
+
rdfs:domain :Artifact ; rdfs:range :Commit ;
|
|
65
|
+
rdfs:label "last modified in" .
|
|
66
|
+
|
|
67
|
+
:path a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
68
|
+
rdfs:domain :File ; rdfs:range xsd:string ;
|
|
69
|
+
rdfs:label "path" .
|
|
70
|
+
|
|
71
|
+
:sha a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
72
|
+
rdfs:domain :Commit ; rdfs:range xsd:string ;
|
|
73
|
+
rdfs:label "sha" .
|
|
74
|
+
|
|
75
|
+
# --- Action predicates (used by the Stop-hook deterministic extractor) ---
|
|
76
|
+
|
|
77
|
+
:commandText a owl:DatatypeProperty ;
|
|
78
|
+
rdfs:domain :Command ; rdfs:range xsd:string ;
|
|
79
|
+
rdfs:label "The literal command string." .
|
|
80
|
+
|
|
81
|
+
:modifiedIn a owl:ObjectProperty ;
|
|
82
|
+
rdfs:domain :File ; rdfs:range <https://predicate.dev/meta#Session> ;
|
|
83
|
+
rdfs:label "File was modified during this session." .
|
|
84
|
+
:createdIn a owl:ObjectProperty ;
|
|
85
|
+
rdfs:domain :File ; rdfs:range <https://predicate.dev/meta#Session> ;
|
|
86
|
+
rdfs:label "File was newly created in this session." .
|
|
87
|
+
:succeededIn a owl:ObjectProperty ;
|
|
88
|
+
rdfs:domain :Command ; rdfs:range <https://predicate.dev/meta#Session> ;
|
|
89
|
+
rdfs:label "Command exited 0 in this session." .
|
|
90
|
+
:failedIn a owl:ObjectProperty ;
|
|
91
|
+
rdfs:domain :Command ; rdfs:range <https://predicate.dev/meta#Session> ;
|
|
92
|
+
rdfs:label "Command exited non-zero in this session." .
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@prefix fhir: <http://hl7.org/fhir/> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
|
|
6
|
+
# FHIR core — TRUE subset of HL7 FHIR R4 resource-type vocabulary.
|
|
7
|
+
# Upstream: http://hl7.org/fhir/R4/ License: see HL7 terms
|
|
8
|
+
#
|
|
9
|
+
# This file ships ONLY the resource class hierarchy. The published
|
|
10
|
+
# HL7 FHIR RDF ontology (http://hl7.org/fhir/fhir.ttl) uses a rich
|
|
11
|
+
# value-type metamodel (fhir:link, fhir:CodeableConcept, fhir:Reference,
|
|
12
|
+
# wrapped scalar values, etc.) — flattening Patient.subject, Observation.code
|
|
13
|
+
# etc. into bare OWL properties with rdfs:range xsd:string would NOT be a
|
|
14
|
+
# subset of FHIR-RDF; it would contradict it. So we omit those axioms.
|
|
15
|
+
#
|
|
16
|
+
# If you need full FHIR data modeling, load HL7's published RDF ontology
|
|
17
|
+
# directly (predicate init --mode upload --file fhir.ttl).
|
|
18
|
+
|
|
19
|
+
fhir:Resource a owl:Class ; rdfs:label "Resource" .
|
|
20
|
+
|
|
21
|
+
fhir:Patient a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Patient" .
|
|
22
|
+
fhir:Practitioner a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Practitioner" .
|
|
23
|
+
fhir:Organization a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Organization" .
|
|
24
|
+
fhir:Encounter a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Encounter" .
|
|
25
|
+
fhir:Observation a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Observation" .
|
|
26
|
+
fhir:Condition a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Condition" .
|
|
27
|
+
fhir:Medication a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Medication" .
|
|
28
|
+
fhir:MedicationRequest a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Medication Request" .
|
|
29
|
+
fhir:Procedure a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Procedure" .
|
|
30
|
+
fhir:DiagnosticReport a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Diagnostic Report" .
|
|
31
|
+
fhir:AllergyIntolerance a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Allergy Intolerance" .
|
|
32
|
+
fhir:Immunization a owl:Class ; rdfs:subClassOf fhir:Resource ; rdfs:label "Immunization" .
|
package/catalog/foaf.ttl
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
|
|
6
|
+
# FOAF (Friend Of A Friend) — true subset of the upstream vocabulary.
|
|
7
|
+
# Upstream: http://xmlns.com/foaf/spec/ License: CC0
|
|
8
|
+
# Every axiom below is also asserted (or is strictly entailed) by the
|
|
9
|
+
# published FOAF ontology. We add nothing FOAF does not say.
|
|
10
|
+
|
|
11
|
+
# --- Classes -------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
foaf:Agent a owl:Class ; rdfs:label "Agent" .
|
|
14
|
+
foaf:Person a owl:Class ; rdfs:subClassOf foaf:Agent ; rdfs:label "Person" .
|
|
15
|
+
foaf:Organization a owl:Class ; rdfs:subClassOf foaf:Agent ; rdfs:label "Organization" .
|
|
16
|
+
foaf:Group a owl:Class ; rdfs:subClassOf foaf:Agent ; rdfs:label "Group" .
|
|
17
|
+
foaf:Document a owl:Class ; rdfs:label "Document" .
|
|
18
|
+
foaf:Image a owl:Class ; rdfs:subClassOf foaf:Document ; rdfs:label "Image" .
|
|
19
|
+
foaf:OnlineAccount a owl:Class ; rdfs:label "Online Account" .
|
|
20
|
+
|
|
21
|
+
# --- Object properties --------------------------------------------
|
|
22
|
+
|
|
23
|
+
foaf:knows a owl:ObjectProperty ;
|
|
24
|
+
rdfs:domain foaf:Person ; rdfs:range foaf:Person ;
|
|
25
|
+
rdfs:label "knows" .
|
|
26
|
+
|
|
27
|
+
foaf:member a owl:ObjectProperty ;
|
|
28
|
+
rdfs:domain foaf:Group ; rdfs:range foaf:Agent ;
|
|
29
|
+
rdfs:label "member" .
|
|
30
|
+
|
|
31
|
+
foaf:made a owl:ObjectProperty ;
|
|
32
|
+
rdfs:domain foaf:Agent ;
|
|
33
|
+
rdfs:label "made" .
|
|
34
|
+
|
|
35
|
+
foaf:maker a owl:ObjectProperty ;
|
|
36
|
+
rdfs:range foaf:Agent ;
|
|
37
|
+
owl:inverseOf foaf:made ;
|
|
38
|
+
rdfs:label "maker" .
|
|
39
|
+
|
|
40
|
+
# --- Datatype properties ------------------------------------------
|
|
41
|
+
|
|
42
|
+
# Domains left unconstrained where the FOAF spec does so — over-tightening
|
|
43
|
+
# (e.g. domain foaf:Person on foaf:name) would be a non-subset extension.
|
|
44
|
+
|
|
45
|
+
foaf:name a owl:DatatypeProperty ; rdfs:label "name" .
|
|
46
|
+
foaf:firstName a owl:DatatypeProperty ; rdfs:domain foaf:Person ; rdfs:label "first name" .
|
|
47
|
+
foaf:lastName a owl:DatatypeProperty ; rdfs:domain foaf:Person ; rdfs:label "last name" .
|
|
48
|
+
foaf:age a owl:DatatypeProperty ; rdfs:domain foaf:Agent ; rdfs:label "age" .
|
|
49
|
+
foaf:homepage a owl:DatatypeProperty ; rdfs:label "homepage" .
|
|
50
|
+
|
|
51
|
+
# foaf:mbox is the canonical FOAF identity property — InverseFunctional
|
|
52
|
+
# is core to its meaning. Domain is Agent, not Person.
|
|
53
|
+
foaf:mbox a owl:DatatypeProperty , owl:InverseFunctionalProperty ;
|
|
54
|
+
rdfs:domain foaf:Agent ;
|
|
55
|
+
rdfs:label "email" .
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@prefix schema: <https://schema.org/> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
|
|
6
|
+
# Schema.org-lite — true subset of schema.org's published vocabulary.
|
|
7
|
+
# Upstream: https://schema.org/ License: CC-BY-4.0
|
|
8
|
+
#
|
|
9
|
+
# Schema.org deliberately does NOT use rdfs:domain / rdfs:range on its
|
|
10
|
+
# properties — it uses its own schema:domainIncludes / schema:rangeIncludes,
|
|
11
|
+
# which are "soft" expected-type hints, not OWL-style strict constraints.
|
|
12
|
+
# We follow that convention so anything we publish is a faithful subset.
|
|
13
|
+
|
|
14
|
+
schema:domainIncludes a rdf:Property ; rdfs:label "domain includes" .
|
|
15
|
+
schema:rangeIncludes a rdf:Property ; rdfs:label "range includes" .
|
|
16
|
+
|
|
17
|
+
# --- Classes (real schema.org hierarchy) --------------------------
|
|
18
|
+
|
|
19
|
+
schema:Thing a owl:Class ; rdfs:label "Thing" .
|
|
20
|
+
schema:Person a owl:Class ; rdfs:subClassOf schema:Thing ; rdfs:label "Person" .
|
|
21
|
+
schema:Organization a owl:Class ; rdfs:subClassOf schema:Thing ; rdfs:label "Organization" .
|
|
22
|
+
schema:Place a owl:Class ; rdfs:subClassOf schema:Thing ; rdfs:label "Place" .
|
|
23
|
+
schema:Event a owl:Class ; rdfs:subClassOf schema:Thing ; rdfs:label "Event" .
|
|
24
|
+
schema:Product a owl:Class ; rdfs:subClassOf schema:Thing ; rdfs:label "Product" .
|
|
25
|
+
|
|
26
|
+
schema:CreativeWork a owl:Class ; rdfs:subClassOf schema:Thing ; rdfs:label "Creative Work" .
|
|
27
|
+
schema:Article a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Article" .
|
|
28
|
+
schema:Book a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Book" .
|
|
29
|
+
schema:Movie a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Movie" .
|
|
30
|
+
schema:Recipe a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Recipe" .
|
|
31
|
+
schema:Review a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Review" .
|
|
32
|
+
schema:WebPage a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Web Page" .
|
|
33
|
+
schema:SoftwareApplication a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Software Application" .
|
|
34
|
+
schema:Dataset a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Dataset" .
|
|
35
|
+
schema:ImageObject a owl:Class ; rdfs:subClassOf schema:CreativeWork ; rdfs:label "Image Object" .
|
|
36
|
+
|
|
37
|
+
# --- Datatype-ish properties --------------------------------------
|
|
38
|
+
|
|
39
|
+
schema:name a rdf:Property ; rdfs:label "name" .
|
|
40
|
+
schema:description a rdf:Property ; rdfs:label "description" .
|
|
41
|
+
schema:url a rdf:Property ; rdfs:label "url" .
|
|
42
|
+
schema:identifier a rdf:Property ; rdfs:label "identifier" .
|
|
43
|
+
schema:datePublished a rdf:Property ; rdfs:label "date published" .
|
|
44
|
+
schema:dateCreated a rdf:Property ; rdfs:label "date created" .
|
|
45
|
+
schema:dateModified a rdf:Property ; rdfs:label "date modified" .
|
|
46
|
+
|
|
47
|
+
# --- Object-ish properties (schema-style soft typing) -------------
|
|
48
|
+
|
|
49
|
+
schema:author a rdf:Property ;
|
|
50
|
+
schema:rangeIncludes schema:Person , schema:Organization ;
|
|
51
|
+
rdfs:label "author" .
|
|
52
|
+
schema:publisher a rdf:Property ;
|
|
53
|
+
schema:rangeIncludes schema:Organization , schema:Person ;
|
|
54
|
+
rdfs:label "publisher" .
|
|
55
|
+
schema:image a rdf:Property ;
|
|
56
|
+
schema:rangeIncludes schema:ImageObject , schema:URL ;
|
|
57
|
+
rdfs:label "image" .
|
|
58
|
+
schema:about a rdf:Property ;
|
|
59
|
+
schema:rangeIncludes schema:Thing ;
|
|
60
|
+
rdfs:label "about" .
|
|
61
|
+
schema:location a rdf:Property ;
|
|
62
|
+
schema:rangeIncludes schema:Place , schema:Organization ;
|
|
63
|
+
rdfs:label "location" .
|
package/catalog/top.ttl
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@prefix : <https://predicate.dev/top#> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
|
|
6
|
+
# Minimal upper ontology (Predicate v2.0 "start-empty" mode seed)
|
|
7
|
+
|
|
8
|
+
:Thing a owl:Class ;
|
|
9
|
+
rdfs:label "Thing" ;
|
|
10
|
+
rdfs:comment "The universal class. Everything is a Thing." .
|
|
11
|
+
|
|
12
|
+
:dependsOn a owl:ObjectProperty , owl:TransitiveProperty ;
|
|
13
|
+
rdfs:domain :Thing ; rdfs:range :Thing ;
|
|
14
|
+
rdfs:label "depends on" ;
|
|
15
|
+
rdfs:comment "Asymmetric directional dependency. Transitive: A→B and B→C implies A→C." .
|
|
16
|
+
|
|
17
|
+
:relatedTo a owl:ObjectProperty , owl:SymmetricProperty ;
|
|
18
|
+
rdfs:domain :Thing ; rdfs:range :Thing ;
|
|
19
|
+
rdfs:label "related to" ;
|
|
20
|
+
rdfs:comment "Generic symmetric association." .
|
package/cli.bundle.mjs
CHANGED
|
@@ -17302,6 +17302,9 @@ function hasFlag(args, name) {
|
|
|
17302
17302
|
function findCatalogDir() {
|
|
17303
17303
|
const here = dirname2(fileURLToPath2(import.meta.url));
|
|
17304
17304
|
const candidates = [
|
|
17305
|
+
// Bundled-alongside-CLI layout (predicate-skill global install).
|
|
17306
|
+
join2(here, "catalog"),
|
|
17307
|
+
// Monorepo / source-tree layouts.
|
|
17305
17308
|
join2(here, "..", "..", "..", "predicate-ontology", "catalog"),
|
|
17306
17309
|
join2(here, "..", "predicate-ontology", "catalog"),
|
|
17307
17310
|
join2(here, "..", "..", "predicate-ontology", "catalog"),
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
@prefix pred: <https://predicate.dev/meta#> .
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
6
|
+
|
|
7
|
+
# --- Event class hierarchy ---------------------------------------
|
|
8
|
+
|
|
9
|
+
pred:Event a owl:Class ; rdfs:label "Predicate lifecycle event" .
|
|
10
|
+
|
|
11
|
+
pred:SchemaProposed a owl:Class ; rdfs:subClassOf pred:Event .
|
|
12
|
+
pred:SchemaValidationPassed a owl:Class ; rdfs:subClassOf pred:Event .
|
|
13
|
+
pred:SchemaValidationFailed a owl:Class ; rdfs:subClassOf pred:Event .
|
|
14
|
+
pred:SchemaPromoted a owl:Class ; rdfs:subClassOf pred:Event .
|
|
15
|
+
pred:SchemaRejected a owl:Class ; rdfs:subClassOf pred:Event .
|
|
16
|
+
pred:SchemaRolledBack a owl:Class ; rdfs:subClassOf pred:Event .
|
|
17
|
+
pred:TBoxVersionAdvanced a owl:Class ; rdfs:subClassOf pred:Event .
|
|
18
|
+
|
|
19
|
+
pred:GoalCreated a owl:Class ; rdfs:subClassOf pred:Event .
|
|
20
|
+
pred:GoalStatusChanged a owl:Class ; rdfs:subClassOf pred:Event .
|
|
21
|
+
|
|
22
|
+
pred:InconsistencyDetected a owl:Class ; rdfs:subClassOf pred:Event .
|
|
23
|
+
pred:MaintenanceRun a owl:Class ; rdfs:subClassOf pred:Event .
|
|
24
|
+
|
|
25
|
+
# --- Common event properties -------------------------------------
|
|
26
|
+
|
|
27
|
+
pred:at a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
28
|
+
rdfs:domain pred:Event ; rdfs:range xsd:dateTime .
|
|
29
|
+
pred:actor a owl:DatatypeProperty ;
|
|
30
|
+
rdfs:domain pred:Event ; rdfs:range xsd:string .
|
|
31
|
+
pred:goal a owl:ObjectProperty ; rdfs:domain pred:Event .
|
|
32
|
+
pred:payload a owl:DatatypeProperty ;
|
|
33
|
+
rdfs:domain pred:Event ; rdfs:range xsd:string .
|
|
34
|
+
|
|
35
|
+
# --- Provenance properties (already used by kg_assert RDF-star) --
|
|
36
|
+
|
|
37
|
+
pred:source a owl:DatatypeProperty ; rdfs:range xsd:string .
|
|
38
|
+
pred:confidence a owl:DatatypeProperty ; rdfs:range xsd:decimal .
|
|
39
|
+
pred:method a owl:DatatypeProperty ; rdfs:range xsd:string .
|
|
40
|
+
pred:timestamp a owl:DatatypeProperty ; rdfs:range xsd:dateTime .
|
|
41
|
+
|
|
42
|
+
# --- Query/usage event class (already used by kg_ask) ------------
|
|
43
|
+
|
|
44
|
+
pred:Query a owl:Class ; rdfs:label "Query execution record" .
|
|
45
|
+
pred:question a owl:DatatypeProperty ; rdfs:domain pred:Query ; rdfs:range xsd:string .
|
|
46
|
+
pred:sparql a owl:DatatypeProperty ; rdfs:domain pred:Query ; rdfs:range xsd:string .
|
|
47
|
+
pred:rowCount a owl:DatatypeProperty ; rdfs:domain pred:Query ; rdfs:range xsd:integer .
|
|
48
|
+
pred:elapsedMs a owl:DatatypeProperty ; rdfs:domain pred:Query ; rdfs:range xsd:integer .
|
|
49
|
+
|
|
50
|
+
# --- Tool-call capture event class (used by kg_capture) ----------
|
|
51
|
+
|
|
52
|
+
pred:ToolCall a owl:Class ; rdfs:label "Captured tool invocation" .
|
|
53
|
+
|
|
54
|
+
pred:toolName a owl:DatatypeProperty ;
|
|
55
|
+
rdfs:domain pred:ToolCall ; rdfs:range xsd:string .
|
|
56
|
+
pred:toolInput a owl:DatatypeProperty ;
|
|
57
|
+
rdfs:domain pred:ToolCall ; rdfs:range xsd:string .
|
|
58
|
+
pred:toolOutput a owl:DatatypeProperty ;
|
|
59
|
+
rdfs:domain pred:ToolCall ; rdfs:range xsd:string .
|
|
60
|
+
pred:sessionId a owl:DatatypeProperty ;
|
|
61
|
+
rdfs:domain pred:ToolCall ; rdfs:range xsd:string .
|
|
62
|
+
pred:phase a owl:DatatypeProperty ;
|
|
63
|
+
rdfs:domain pred:ToolCall ; rdfs:range xsd:string .
|
|
64
|
+
|
|
65
|
+
# --- Session class (used by the Stop-hook extractor) -------------
|
|
66
|
+
|
|
67
|
+
pred:Session a owl:Class ; rdfs:label "Development session" .
|
|
68
|
+
pred:startedAt a owl:DatatypeProperty ;
|
|
69
|
+
rdfs:domain pred:Session ; rdfs:range xsd:dateTime .
|
|
70
|
+
pred:endedAt a owl:DatatypeProperty ;
|
|
71
|
+
rdfs:domain pred:Session ; rdfs:range xsd:dateTime .
|
|
72
|
+
|
|
73
|
+
# --- Peer registry (federation) ----------------------------------
|
|
74
|
+
|
|
75
|
+
pred:Peer a owl:Class ; rdfs:label "Registered federation peer" .
|
|
76
|
+
pred:peerName a owl:DatatypeProperty ;
|
|
77
|
+
rdfs:domain pred:Peer ; rdfs:range xsd:string .
|
|
78
|
+
pred:peerEndpoint a owl:DatatypeProperty ;
|
|
79
|
+
rdfs:domain pred:Peer ; rdfs:range xsd:anyURI .
|
|
80
|
+
pred:peerAddedAt a owl:DatatypeProperty ;
|
|
81
|
+
rdfs:domain pred:Peer ; rdfs:range xsd:dateTime .
|
|
82
|
+
pred:peerKind a owl:DatatypeProperty ;
|
|
83
|
+
rdfs:domain pred:Peer ; rdfs:range xsd:string ;
|
|
84
|
+
rdfs:label "Peer kind tag: 'team' (default) or 'external-ld'" .
|
|
85
|
+
|
|
86
|
+
# --- Bootstrap/init config (v2.0) --------------------------------
|
|
87
|
+
|
|
88
|
+
pred:Config a owl:Class ; rdfs:label "Predicate runtime config singleton" .
|
|
89
|
+
pred:initMode a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
90
|
+
rdfs:domain pred:Config ; rdfs:range xsd:string ;
|
|
91
|
+
rdfs:comment "One of: community | upload | empty" .
|
|
92
|
+
pred:initOntology a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
93
|
+
rdfs:domain pred:Config ; rdfs:range xsd:string ;
|
|
94
|
+
rdfs:comment "Catalog name (e.g. codebase, foaf), or 'user' for upload, or 'top' for empty" .
|
|
95
|
+
pred:schemaLearningEnabled a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
96
|
+
rdfs:domain pred:Config ; rdfs:range xsd:boolean ;
|
|
97
|
+
rdfs:comment "When false, Generalizer skips auto-proposal generation (Sweeper still promotes existing staging)" .
|
|
98
|
+
pred:initializedAt a owl:DatatypeProperty , owl:FunctionalProperty ;
|
|
99
|
+
rdfs:domain pred:Config ; rdfs:range xsd:dateTime .
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "predicate-skill",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Local reasoning knowledge graph (RDF/OWL) for AI agents — Claude Code plugin + MCP server + predicate CLI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Nordic Agents Research",
|
|
@@ -30,13 +30,15 @@
|
|
|
30
30
|
"commands",
|
|
31
31
|
"hooks",
|
|
32
32
|
"compose",
|
|
33
|
+
"catalog",
|
|
34
|
+
"meta",
|
|
33
35
|
"dashboard",
|
|
34
36
|
"LICENSE",
|
|
35
37
|
"README.md"
|
|
36
38
|
],
|
|
37
39
|
"scripts": {
|
|
38
40
|
"bundle": "node scripts/bundle.mjs",
|
|
39
|
-
"prepublishOnly": "node scripts/bundle.mjs && node -e \"const fs=require('fs');for(const f of ['server.bundle.mjs','cli.bundle.mjs']){if(!fs.existsSync(f)){console.error('missing '+f);process.exit(1)}}\""
|
|
41
|
+
"prepublishOnly": "node scripts/bundle.mjs && node -e \"const fs=require('fs');for(const f of ['server.bundle.mjs','cli.bundle.mjs','catalog/catalog.json','meta/predicate-meta.ttl']){if(!fs.existsSync(f)){console.error('missing '+f);process.exit(1)}}\""
|
|
40
42
|
},
|
|
41
43
|
"engines": {
|
|
42
44
|
"node": ">=20"
|