Section 07 - pluggable ingest driver (INV-3a)
Goal
Replace the ori-hardcoded per-repo ingest driver with a generic, repo-parameterized driver so the symbol graph can ingest ANY registered language’s source. The symbol ingester core is ALREADY tree-sitter- pluggable; this section lifts the Rust/ori coupling out of the DRIVER and makes the AIMS/ontology overlay an optional capability tier the query surface tolerates.
Implementation Sketch
The coupling is NOT in the ingest core — intel_repo/neo4j/parser_adapter.py (ParseResult,
parse_repo) + extract_symbols.py (normalized kind vocabulary) + upsert_file_symbols are
language-agnostic, and languages.yaml already lists TypeScript full-coverage with queries/typescript/*.scm
written. The coupling lives in:
intel_repo/neo4j/sync_ori_graph.py— hardcodesORI_REPO_NAME = "ori"(:54), thecompiler_reposource root (:61), rust-only.rsconfig (:199-208).intel_repo/neo4j/ori_scope.py— ori-specific include/exclude globs.intel_repo/neo4j/query_graph.py— several subcommands default--repo "ori"(:1311,1370,1445,2371,3391).- The AIMS overlay (
:CfgBlock/:SpecClause/:ErrorCode/:CompilerPhase) + the Rust-only CPG extractor (extractor/cpg/src/main.rs:103syn::parse_file) — off the symbol-graph critical path.
Work:
- New
intel_repo/neo4j/sync_code_graph.py(orrepo_scope.py) parameterized byrepo_id+ scope, reading a project’s ownrepos.yaml/languages.yamlself-entry; lift the generic core out ofsync_ori_graph.pyso it becomes a thin caller. Generalizeori_scope.py. - Parameterize the
--repo "ori"defaults inquery_graph.pyso a non-ori project is the default repo. - Treat the AIMS/ontology overlay as an OPTIONAL tier skipped when the language has no CPG/ontology plug-in; the query surface must tolerate its absence (degradation already exists).
Spec & Rule References
INV-3 (mission). intelligence.md (graph contract). missions.md §Tooling.
Layer Coverage
Tooling-scope (intel infra): L1-L11 N/A. L12 = sync_code_graph.py ingesting a fixture repo by repo_id
against a throwaway neo4j. pytest gate: intel_repo/tests/ (test_sync_code_graph_generic.py new;
intel_repo/.venv/bin/python -m pytest).
Work Items
- Add intel_repo/neo4j/sync_code_graph.py parameterized by repo_id + scope; lift the generic core out of sync_ori_graph.py so it becomes a thin caller; generalize ori_scope.py.
- Parameterize the —repo “ori” defaults in query_graph.py so a non-ori project is the default repo.
- Make the AIMS/ontology overlay an optional tier the query surface tolerates when absent.
Items
- Verify the GitHub issue-tracker ingest (intel_repo/neo4j/import_graph.py) is repo-generic + syncing across every registered repo, pin it with a regression test (test_issue_ingest_generic), and confirm the §07 code-symbol driver refactor (sync_code_graph.py) does not break the issue/PR ingest path.
Fresh intel (regenerated)
{ “schema_version”: 1, “target”: { “kind”: “plan-section”, “ref”: “installable-harness/s-eed6d80b” }, “generated_at”: “2026-06-25T16:36:04.185581+00:00”, “graph_state”: { “head_sha”: “b74d6b9a”, “last_code_import_at”: “2026-06-25T16:33:44.846Z”, “embedding_stale”: false, “insights_stale”: false, “cpg_stale”: false }, “surfaces”: {}, “summary”: “intel-package[plan-section:installable-harness/s-eed6d80b] agent-authored dossier”, “degraded”: false, “dossier”: { “objective_symbols”: [], “tiers”: {}, “agent_authored”: true, “difficulty”: { “class”: “routine”, “research_online”: false, “research_mode”: “auto”, “signals”: [], “plan_dir”: “/home/eric/projects/ori_lang/plans/installable-harness” } } }
(full dossier: pluggable-ingest-driver—s-eed6d80b.intel.json)