nexyron.abstraction_graph.refresh

Generic Description

nexyron.abstraction_graph.refresh materializes the abstraction catalog into the normal LPG store.

CALL nexyron.abstraction_graph.refresh()
YIELD active_node_count, active_edge_count
RETURN active_node_count, active_edge_count

Catalog and projection procedures manage projected graphs, aggregate views, procedure metadata, and abstraction graph projections used by analytical workflows.

Consumer-Level Explanation

Use this when real abstractions and source-grounded knowledge assertions must behave like ordinary graph data. After refresh, active abstractions are nodes with the __AbstractionArtifact and __AbstractionActive labels, and live knowledge assertions between knowledge-capable abstractions are stored as normal relationships using their declared relationship type. The allowed knowledge assertion endpoint kinds are ACTOR, EVENT, STAGE, SOCIETY, ENVIRONMENT, and LENS. Reports, analysis runs, wiki pages, models, and rulesets are artifact/provenance records; those artifact records are not projected as knowledge assertion endpoints.

That means ordinary Cypher can inspect and aggregate the abstraction graph:

MATCH (n:__AbstractionArtifact)
WHERE n.abstraction_status = 'active'
RETURN n.artifact_kind, count(n)

Conceptual Explanation

The catalog remains the source of truth. The materialized graph is a read model for traversal, reporting, graph data-quality work, and algorithm projection.

Concept-only abstractions with no source_query are still materialized. They receive source_backed = false, but they are real LPG nodes in the abstraction graph read model. Source-backed abstractions receive source_backed = true.

Removed catalog items are not deleted from the graph. They are marked abstraction_status = 'stale', lose the __AbstractionActive label, and keep their old properties for auditability.

More Detailed Explanation

In practical queries, start by deciding the row grain you want after the call: one row per node, one row per path, one row per registry object, one row per artifact, or one row per summary. Then keep that grain explicit with YIELD and named projections. That is the difference between a useful planner-facing example and a vague call that downstream tooling cannot safely compose. For contract-driven procedures, the executable examples on these pages intentionally inspect procedure metadata unless the required named artifacts are created in the same example.

Advanced Example

CREATE ABSTRACTION ACTOR Kid DESCRIPTION 'Child concept';
CREATE ABSTRACTION ENVIRONMENT IceCream DESCRIPTION 'Product concept';
CALL nexyron.knowledge_assertion_register({
  name: 'KnowledgeAssertion:Kid:IceCream:relate',
  edge_type: 'RELATE_TO',
  source_kind: 'ACTOR',
  source_name: 'Kid',
  target_kind: 'ENVIRONMENT',
  target_name: 'IceCream',
  description: 'Kids like ice cream.'
});

CALL nexyron.abstraction_graph.refresh();

MATCH (k:__AbstractionArtifact)-[x:RELATE_TO]->(p:__AbstractionArtifact)
WHERE x.abstraction_status = 'active'
RETURN k.name, p.name, x.description, x.source_backed

Real Use Cases

Real Limitations And Tradeoffs