Tool · Workflows & capabilities / Data & provenance
Capability Graph Importer
Turn capability packages and Foundry blueprints into a graph plan you can inspect before importing.
Repository: CinvanaAI/capability-graph-importer
Recorded synthetic example. Source with a complete offline example.
See the idea in action.
Two packages, ten nodes, eight edges, and the exact source filenames and SHA-256 hashes in the final plan.
Normalize Text as JSON and Format Name as a historical-style text blueprint.
{
"schema_version": "capability-graph.plan.v1",
"source_label": "Synthetic Packages",
"nodes": [
{
"id": "package:Format Name",
"label": "Package",
"properties": {
"name": "Format Name",
"source": "Synthetic Packages"
}
},
{
"id": "logic:Format Name",
"label": "Logic",
"properties": {
"package_name": "Format Name",
"source": "def format_name(value):\n return value.strip().title()"
}
},
{
"id": "argument:Format Name:value",
"label": "Argument",
"properties": {
"name": "value",
"record": {
"name": "value"
}
}
},
{
"id": "return:Format Name:formatted",
"label": "Return",
"properties": {
"name": "formatted",
"record": {
"name": "formatted"
}
}
},
{
"id": "recognition:Format Name:synthetic-example",
"label": "Recognition",
"properties": {
"name": "synthetic-example",
"record": {
"name": "synthetic-example"
}
}
},
{
"id": "package:Normalize Text",
"label": "Package",
"properties": {
"name": "Normalize Text",
"source": "Synthetic Packages"
}
},
{
"id": "logic:Normalize Text",
"label": "Logic",
"properties": {
"package_name": "Normalize Text",
"source": "def normalize(value):\n return value.strip().lower()"
}
},
{
"id": "argument:Normalize Text:value",
"label": "Argument",
"properties": {
"name": "value",
"record": {
"name": "value"
}
}
},
{
"id": "return:Normalize Text:normalized",
"label": "Return",
"properties": {
"name": "normalized",
"record": {
"name": "normalized"
}
}
},
{
"id": "recognition:Normalize Text:synthetic-example",
"label": "Recognition",
"properties": {
"name": "synthetic-example",
"record": {
"name": "synthetic-example"
}
}
}
],
"edges": [
{
"from": "package:Format Name",
"type": "HAS_LOGIC",
"to": "logic:Format Name"
},
{
"from": "package:Format Name",
"type": "HAS_ARGUMENT",
"to": "argument:Format Name:value"
},
{
"from": "package:Format Name",
"type": "HAS_RETURN",
"to": "return:Format Name:formatted"
},
{
"from": "package:Format Name",
"type": "USES_RECOGNITION",
"to": "recognition:Format Name:synthetic-example"
},
{
"from": "package:Normalize Text",
"type": "HAS_LOGIC",
"to": "logic:Normalize Text"
},
{
"from": "package:Normalize Text",
"type": "HAS_ARGUMENT",
"to": "argument:Normalize Text:value"
},
{
"from": "package:Normalize Text",
"type": "HAS_RETURN",
"to": "return:Normalize Text:normalized"
},
{
"from": "package:Normalize Text",
"type": "USES_RECOGNITION",
"to": "recognition:Normalize Text:synthetic-example"
}
],
"provenance": {
"package:Format Name": [
{
"source_type": "blueprint",
"source_file": "format.blueprint.txt",
"source_sha256": "beb4cf17f0fcd9b2f00dab8d9be04423213ac98856a2fc5ccce462e908780ac7"
}
],
"package:Normalize Text": [
{
"source_type": "json",
"source_file": "normalize.package.json",
"source_sha256": "0f408e7fa02525a17f10703fdb5f955e7c914a56145e0e003989bbf1f62f327a"
}
]
},
"conflicts": []
}Try the example.
From the repository root, follow the dependency requirements in the README. This example uses supplied synthetic material.
python -m pip install -e . python -m examples.walkthrough
Two packages, ten nodes, eight edges, and the exact source filenames and SHA-256 hashes in the final plan.
Complete setup and instructions ↗The interesting part.
Conflicting duplicate definitions require an explicit preference and can retain the conflicting sources.
Where it came from.
Graph-import script in the historical Python Agent Foundry workbench.
Rebuilds discovery, merging and graph projection as a deterministic graph plan with source evidence.
It ends at a graph plan; the historical direct database writer is not the public interface.
Follow the family: Builder, Factory and the Python Foundry
- Extracted fromPython Agent Foundry Workbench
See the integrated setting from which this independently useful mechanism was separated. Rebuilt from the historical script; the public interface now emits a plan.
Source ↗