Skip to content

Add provenance-preserving project structure graph adapters #22

Description

@AjnasNB

Goal

Add deterministic, provenance-preserving project-structure adapters that turn code, schemas, and selected documents into compact queryable relations without copying another project's implementation or turning derived graph output into authority.

Acceptance criteria

  • Start with language-aware AST/import/symbol extraction for a narrow reviewed language set; every node and edge cites an exact file identity and source span.
  • Mark relations as extracted or inferred. Inference requires an explicit adapter/model identity, confidence, source set, and reproducible prompt/config fingerprint.
  • Store source observations as normal Qarinah events; graph/community/index files remain disposable derived projections.
  • Incremental rebuilds detect additions, changes, renames, and deletions by content identity and cannot leave stale authoritative-looking edges.
  • Hybrid retrieval can combine project structure, temporal decisions, crawler evidence, and Maqam receipts under one token budget while preserving conflicts and supersession.
  • Secrets, ignored files, binaries, generated directories, hidden reasoning, and paths outside the trusted real workspace root are excluded by default.
  • Offline fixtures cover cycles, duplicate symbols, aliases, malformed files, huge files, symlinks/junctions, rename history, poisoned indexes, and deterministic clean rebuilds on Node 22/24/26.
  • Codex and Claude skills expose scoped query workflows; they do not auto-inject the whole graph into every prompt.

Non-goals

No universal semantic understanding, no replacement for compilers or language servers, no unbounded repository ingestion, and no claim that inferred relations are source truth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededintegrationAgent, governance, crawler, or platform integrationroadmapPlanned beyond the initial foundationsecurity-boundaryRequires explicit threat-boundary review

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions