Dev Intel Pipeline v2 — multi-language semantic graph extractor
Phase 1: extract.js — tree-sitter AST parser (TS/JS/Python/Go/Java/Bash) + config parsers (YAML/HCL) Phase 2: graph.js — in-memory directed graph store with build/query/diff CLI Phase 3: namespace.js — cross-repo namespace registry with 3-tier resolution Phase 4: semantic-diff.js — categorized diffs with impact scoring (0-100) Phase 5: pipeline.js — batch extraction, incremental diffing, benchmarking Benchmark: 4,325 files, 21,646 nodes, 133,979 edges in 67s (15ms/file) BMad SPA reviews: all phases GO
This commit is contained in:
241
test/ground-truth/python-service.json
Normal file
241
test/ground-truth/python-service.json
Normal file
@@ -0,0 +1,241 @@
|
||||
{
|
||||
"file": "/tmp/test_service.py",
|
||||
"language": "python",
|
||||
"entities": [
|
||||
{
|
||||
"id": "test_service.py",
|
||||
"type": "Module",
|
||||
"name": "test_service.py",
|
||||
"kind": "module",
|
||||
"visibility": "public",
|
||||
"line_range": [
|
||||
1,
|
||||
34
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dep:os",
|
||||
"type": "Dependency",
|
||||
"name": "os",
|
||||
"kind": "import",
|
||||
"visibility": "internal",
|
||||
"line_range": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dep:typing",
|
||||
"type": "Dependency",
|
||||
"name": "typing",
|
||||
"kind": "import",
|
||||
"visibility": "internal",
|
||||
"line_range": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dep:dataclasses",
|
||||
"type": "Dependency",
|
||||
"name": "dataclasses",
|
||||
"kind": "import",
|
||||
"visibility": "internal",
|
||||
"line_range": [
|
||||
3,
|
||||
3
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dep:.config",
|
||||
"type": "Dependency",
|
||||
"name": ".config",
|
||||
"kind": "import",
|
||||
"visibility": "internal",
|
||||
"line_range": [
|
||||
4,
|
||||
4
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "dep:.database",
|
||||
"type": "Dependency",
|
||||
"name": ".database",
|
||||
"kind": "import",
|
||||
"visibility": "internal",
|
||||
"line_range": [
|
||||
5,
|
||||
5
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:TenantConfig",
|
||||
"type": "Class",
|
||||
"name": "TenantConfig",
|
||||
"kind": "class",
|
||||
"visibility": "public",
|
||||
"line_range": [
|
||||
8,
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:TenantService",
|
||||
"type": "Class",
|
||||
"name": "TenantService",
|
||||
"kind": "class",
|
||||
"visibility": "public",
|
||||
"line_range": [
|
||||
13,
|
||||
30
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:TenantService:__init__",
|
||||
"type": "Function",
|
||||
"name": "__init__",
|
||||
"kind": "method",
|
||||
"visibility": "private",
|
||||
"line_range": [
|
||||
14,
|
||||
16
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:TenantService:get_tenant",
|
||||
"type": "Function",
|
||||
"name": "get_tenant",
|
||||
"kind": "method",
|
||||
"visibility": "public",
|
||||
"line_range": [
|
||||
18,
|
||||
22
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:TenantService:_enrich",
|
||||
"type": "Function",
|
||||
"name": "_enrich",
|
||||
"kind": "method",
|
||||
"visibility": "protected",
|
||||
"line_range": [
|
||||
24,
|
||||
26
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:TenantService:create_tenant",
|
||||
"type": "Function",
|
||||
"name": "create_tenant",
|
||||
"kind": "method",
|
||||
"visibility": "public",
|
||||
"line_range": [
|
||||
28,
|
||||
30
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "test_service.py:health_check",
|
||||
"type": "Function",
|
||||
"name": "health_check",
|
||||
"kind": "function",
|
||||
"visibility": "public",
|
||||
"line_range": [
|
||||
32,
|
||||
33
|
||||
]
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
{
|
||||
"type": "IMPORTS",
|
||||
"source": "test_service.py",
|
||||
"target": "dep:os"
|
||||
},
|
||||
{
|
||||
"type": "IMPORTS",
|
||||
"source": "test_service.py",
|
||||
"target": "dep:typing"
|
||||
},
|
||||
{
|
||||
"type": "IMPORTS",
|
||||
"source": "test_service.py",
|
||||
"target": "dep:dataclasses"
|
||||
},
|
||||
{
|
||||
"type": "IMPORTS",
|
||||
"source": "test_service.py",
|
||||
"target": "dep:.config"
|
||||
},
|
||||
{
|
||||
"type": "IMPORTS",
|
||||
"source": "test_service.py",
|
||||
"target": "dep:.database"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py",
|
||||
"target": "test_service.py:TenantConfig"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py",
|
||||
"target": "test_service.py:TenantService"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py:TenantService",
|
||||
"target": "test_service.py:TenantService:__init__"
|
||||
},
|
||||
{
|
||||
"type": "CALLS",
|
||||
"source": "test_service.py:TenantService:__init__",
|
||||
"target": "load_config"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py:TenantService",
|
||||
"target": "test_service.py:TenantService:get_tenant"
|
||||
},
|
||||
{
|
||||
"type": "CALLS",
|
||||
"source": "test_service.py:TenantService:get_tenant",
|
||||
"target": "self.db.query"
|
||||
},
|
||||
{
|
||||
"type": "CALLS",
|
||||
"source": "test_service.py:TenantService:get_tenant",
|
||||
"target": "self._enrich"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py:TenantService",
|
||||
"target": "test_service.py:TenantService:_enrich"
|
||||
},
|
||||
{
|
||||
"type": "CALLS",
|
||||
"source": "test_service.py:TenantService:_enrich",
|
||||
"target": "self.config.get"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py:TenantService",
|
||||
"target": "test_service.py:TenantService:create_tenant"
|
||||
},
|
||||
{
|
||||
"type": "CALLS",
|
||||
"source": "test_service.py:TenantService:create_tenant",
|
||||
"target": "TenantConfig"
|
||||
},
|
||||
{
|
||||
"type": "CALLS",
|
||||
"source": "test_service.py:TenantService:create_tenant",
|
||||
"target": "self.db.insert"
|
||||
},
|
||||
{
|
||||
"type": "CONTAINS",
|
||||
"source": "test_service.py",
|
||||
"target": "test_service.py:health_check"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user