From 9f8b8b0072d88565cc2826b6f85dbec4095d9de2 Mon Sep 17 00:00:00 2001 From: Safi Date: Mon, 18 May 2026 18:26:11 +0100 Subject: [PATCH] docs: clarify code-only corpora skip semantic extraction (closes #836) Co-Authored-By: Claude Sonnet 4.6 --- docs/how-it-works.md | 2 ++ tests/test_install_strings.py | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 83fbedbb..990e9933 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -7,6 +7,8 @@ graphify processes your files in three passes: **Pass 1 — Code structure (free, no API calls)** Tree-sitter parses your code files and extracts classes, functions, imports, call graphs, and inline comments. This runs locally with no LLM involved. 25 languages supported. SQL files get special treatment: tables, views, foreign keys, and JOIN relationships are extracted deterministically. +Code files are not sent to the LLM semantic extractor in the normal pipeline. If a corpus contains only code files, Pass 3 is skipped entirely; semantic extraction is reserved for docs, papers, images, and transcripts. + **Pass 2 — Video and audio (local, no API calls)** Video and audio files are transcribed with faster-whisper. To focus the transcript on your domain, the transcription prompt is seeded with your top god nodes (the most-connected concepts in your code graph so far). Transcripts are cached — re-runs skip already-processed files. diff --git a/tests/test_install_strings.py b/tests/test_install_strings.py index 5bb94e83..99535542 100644 --- a/tests/test_install_strings.py +++ b/tests/test_install_strings.py @@ -120,3 +120,11 @@ def test_report_is_still_referenced_as_fallback(): def test_agents_section_does_not_skip_dirty_graph_output(): assert "Dirty graphify-out/ files are expected" in _AGENTS_MD_SECTION assert "not a reason to skip graphify" in _AGENTS_MD_SECTION + + +def test_how_it_works_clarifies_code_only_semantic_extraction(): + from pathlib import Path + doc = (Path(__file__).parent.parent / "docs" / "how-it-works.md").read_text(encoding="utf-8") + assert "Code files are not sent to the LLM semantic extractor" in doc + assert "code files, Pass 3 is skipped entirely" in doc + assert "docs, papers, images, and transcripts" in doc