| name | knowledge-graph-query |
| description | Query the SEA-Forge™ Knowledge Graph using SPARQL to retrieve concepts, relationships, and semantic patterns. Use for semantic lookups, concept validation, relationship discovery, and ontology exploration. Integrates with DomainForge™ and Oxigraph. |
| license | Complete terms in LICENSE.txt |
Knowledge Graph Query
Query SEA-Forge™'s Knowledge Graph using SPARQL to discover concepts, validate semantic references, and explore ontology relationships.
For reference: DomainForge Handbook | SDS-003: Knowledge Graph Service
When to Use This Skill
- Validate ConceptId: Check if
sea:BoundedContextexists - Find Related Concepts: What concepts link to
sea:Deployment? - Discover Patterns: What artifacts are in stage "IntellectualCapital"?
- Ontology Exploration: Browse available concepts
- Semantic Anchoring: Link artifacts to Knowledge Graph
Quick Reference
Basic Queries
# Find all concepts in SEA ontology
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?concept ?label
WHERE {
?concept a sea:Concept ;
rdfs:label ?label .
}
Validate ConceptId
PREFIX sea: <http://sea-forge.org/ontology#>
ASK {
sea:BoundedContext a sea:Concept .
}
# Returns: true if exists
Find Related Concepts
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?related ?relationship
WHERE {
sea:Deployment ?relationship ?related .
}
Common Query Patterns
1. List All Bounded Contexts
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?context ?description
WHERE {
?context a sea:BoundedContext ;
sea:description ?description .
}
2. Find Artifacts by Stage
PREFIX sea: <http://sea-forge.org/ontology#>
SELECT ?artifact ?title ?stage
WHERE {
?artifact a sea:Artifact ;
sea:title ?title ;
sea:stage ?stage .
FILTER(?stage = "IntellectualCapital")
}
3. Discover Concept Hierarchy
PREFIX sea: <http://sea-forge.org/ontology#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?subclass ?superclass
WHERE {
?subclass rdfs:subClassOf ?superclass .
}
Integration with SEA-Forge™
CADSL Semantic Anchoring
Validate semantic refs before generating artifacts:
# Check if conceptId exists
query = """
ASK {
sea:QualityGate a sea:Concept .
}
"""
exists = kg_service.query(query)
if exists:
# Safe to use in artifact
artifact["semanticRefs"] = ["sea:QualityGate"]
Case Management Enrichment
Link cases to domain concepts:
SELECT ?case ?concept ?relationship
WHERE {
?case a sea:Case ;
sea:relatedTo ?concept .
?concept a sea:Concept .
}