Index of every page on this site: llms.txt
All skills
semantica-agi avatar

/validate

@63eabcc
by Semanticasemantica-agi/semantica15k stars
1,750
Run it yourself

Validate Semantica pipelines, extraction quality, graph schemas, and ontology consistency. Returns structured error/warning checklists. Uses PipelineValidator, PipelineBuilder.validate_pipeline(), GraphValidator, and OntologyValidator. Sub-commands: pipeline, step, dependencies, extraction, graph, ontology, performance.

Requires /semantica
  • 1 file
  • 5.2 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/semantica-agi/semantica/validate

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈83 tokens for metadata: the name and description. ≈1.2k when used: this file.

Description uses 4.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈332 characters, or 4.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

/semantica:validate

Validate pipeline and graph quality. Usage: /semantica:validate <target> [options]

$ARGUMENTS = target type + optional config or path.


pipeline [--config '<json>']

Validate a full pipeline builder configuration.

from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator

builder = PipelineBuilder()
if config_json:
    import json
    builder.build_pipeline(json.loads(config_json))

# PipelineBuilder has its own quick validate
quick = builder.validate_pipeline()  # returns Dict

# PipelineValidator gives full ValidationResult(valid, errors, warnings)
# Does NOT raise — always returns a result object
validator = PipelineValidator()
result = validator.validate(builder)

# Also check inter-step dependencies
deps = validator.check_dependencies(builder)

Output:

Pipeline Validation:  VALID ✓  |  INVALID ✗
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Steps:    N registered
Valid:    M steps

Errors (K):
  ✗ [step_name] <error message>

Warnings (J):
  ⚠ [step_name] <warning message>

Dependencies:
  ✓ All dependencies resolved
  ✗ Step "<name>" depends on missing step "<dep>"

Result: <valid> — K errors, J warnings

step <step_name> [--type <type>] [--constraints '<json>']

Validate a single pipeline step.

from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator
import json

builder = PipelineBuilder()
step = builder.get_step(step_name)

validator = PipelineValidator()
result = validator.validate_step(
    step=step,
    **json.loads(constraints_json) if constraints_json else {},
)

Output: same checklist format but scoped to a single step.


dependencies

Check all inter-step dependency resolution for the active pipeline.

from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator

builder = PipelineBuilder()
validator = PipelineValidator()

deps = validator.check_dependencies(builder)

Output:

Dependency Graph:
  | Step | Depends On | Status |
  | step_A | — | ✓ |
  | step_B | step_A | ✓ |
  | step_C | step_X | ✗ MISSING |

Cycles detected: YES / NO
Missing steps:   [list]

extraction <file_path>

Validate extraction quality for a file — entity confidence, relation density, coverage.

from semantica.semantic_extract.extraction_validator import ExtractionValidator
from semantica.semantic_extract import (
    NamedEntityRecognizer,
    RelationExtractor,
)
from semantica.semantic_extract.cache import extraction_cache

extraction_cache.clear()  # prevent cross-invocation cache pollution

text = open(file_path).read()

ner = NamedEntityRecognizer()
rel = RelationExtractor()
entities = ner.extract(text)
relations = rel.extract(text)

validator = ExtractionValidator()
issues = validator.validate(entities, relations)

Output:

Extraction Validation: <file_path>
  Entities:    N extracted
  Relations:   M extracted
  Avg confidence: 0.83

Errors (K):
  ✗ <issue>

Warnings (J):
  ⚠ <warning>

Quality score: X/100

graph

Check schema conformance, referential integrity, and structural health.

from semantica.kg.graph_validator import GraphValidator
from semantica.context import ContextGraph

graph = ContextGraph()
validator = GraphValidator(graph)
result = validator.validate()

Output:

Graph Validation:
  Nodes:         N  |  Edges: M
  Node types:    K valid, J unknown
  
Referential integrity:
  ✗ Dangling edge: <source> → <missing target>

Schema conformance:
  ✗ Node "<id>" missing required property "<prop>"

Result: N errors, M warnings

ontology

Validate ontology consistency and evaluate competency questions.

from semantica.ontology import OntologyValidator

validator = OntologyValidator()
result = validator.validate()
cq_results = validator.evaluate_competency_questions()

Output:

Ontology Validation:
  Classes:      N
  Properties:   M
  Consistent:   YES ✓  |  NO ✗

Competency questions:
  ✓ "Can we find all instances of X?" — answered
  ✗ "Is Y a subclass of Z?" — failed: <reason>

Result: N consistency errors, M CQ failures

performance

Validate pipeline performance characteristics — bottlenecks, parallelism, and resource use.

from semantica.pipeline.pipeline_builder import PipelineBuilder
from semantica.pipeline.pipeline_validator import PipelineValidator

builder = PipelineBuilder()
pipeline = builder.build()
validator = PipelineValidator()

perf = validator.validate_performance(pipeline)

Output: step-by-step timing estimates, parallelism opportunities, and recommended parallelism level.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 63eabcc. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago

README badge

README badge for semantica-agi/semantica/validate