Skills

Temporal

Temporal graph operations on Semantica, scoped queries at a point in time, graph...

Install

npx skills add semantica-agi/semantica --skill temporal -g -a claude-code -y
Category
Engineering
Updated
3d ago
License
MIT
Context cost
Lightabout 1,057 tokens
Runs scripts
No, instructions only

What it does

Temporal graph operations on Semantica, scoped queries at a point in time, graph snapshots, node change timelines, temporal causal analysis, and graph state reconstruction. Uses AgentContext.find_precedents(as_of=), ContextGraph.state_at(), CausalChainAnalyzer.trace_at_time(), and TemporalQueryRewriter. Sub-commands: query, snapshot, timeline, causal-at, precedents-at.

/semantica:temporal

Temporal graph operations. Usage: /semantica:temporal <sub-command> [args]

$ARGUMENTS = sub-command + query/node + date expression.


query "<question>" [at|before|after <date>]

Temporally-scoped natural-language graph query.

from semantica.kg.temporal_query_rewriter import TemporalQueryRewriter
from semantica.kg.temporal_normalizer import TemporalNormalizer

normalizer = TemporalNormalizer()
# Normalize natural date expressions: "last month", "Q3 2024", "2025-01-15"
date = normalizer.normalize(date_expr)

rewriter = TemporalQueryRewriter()
# Rewrite query with temporal constraint
rewritten = rewriter.rewrite(
    query=question,
    temporal_constraint={"op": direction, "value": date},  # op: "at"|"before"|"after"
)

Then run the rewritten query through AgentContext.retrieve() or ContextGraph.query().

Return ranked results with Valid From, Valid Until, Active At <date> columns. Mark nodes that were not yet created at the target time as [not yet created].


snapshot <date>

Reconstruct the full graph state as it existed at a specific point in time.

from semantica.context import ContextGraph

graph = ContextGraph(advanced_analytics=True)

# state_at returns a dict snapshot of the graph at that timestamp
snapshot = graph.state_at(timestamp=date)  # ISO string or datetime

Output:

Graph snapshot at <date>:
  Nodes:       N  (M added since prev snapshot, K removed)
  Edges:       P
  Density:     0.21
  Communities: Q

Active decision categories at <date>:
  | Category | Count | Avg Confidence |

Top 10 nodes (by degree at <date>):
  | Node | Type | Degree |

[Compact Mermaid graph TD, top-10 most connected nodes at that time]

timeline <node_id>

Show attribute and relationship changes for a node across its full history.

from semantica.context import ContextGraph

graph = ContextGraph()
Read the whole SKILL.md on GitHub

More in Engineering