From 0e1b03c30fdbcd4d09e34dcaed81db6e7c8c0a07 Mon Sep 17 00:00:00 2001 From: PathGao <42336971+PathGao@users.noreply.github.com> Date: Wed, 29 Jul 2026 12:39:19 +0800 Subject: [PATCH] docs(architecture): point new language extractors at extractors/, not extract.py The 'Adding a new language extractor' steps still said to add the function to extract.py, but extract.py is being split into graphify/extractors/ (issue #1212) and seventeen languages already live there behind facade re-exports. A contributor following the architecture doc adds code to the exact file the migration is draining. Point step 1 at the package and the MIGRATION.md playbook, and fold the mandatory facade re-export into step 2. Co-Authored-By: Claude Fable 5 --- ARCHITECTURE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 5672bf0df..a4b6342fa 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -57,8 +57,8 @@ Every extractor returns: ## Adding a new language extractor -1. Add a `extract_(path: Path) -> dict` function in `extract.py` following the existing pattern (tree-sitter parse → walk nodes → collect `nodes` and `edges` → call-graph second pass for INFERRED `calls` edges). -2. Register the file suffix in `extract()` dispatch and `collect_files()`. +1. Add a `graphify/extractors/.py` module with an `extract_(path: Path) -> dict` function following the existing pattern (tree-sitter parse → walk nodes → collect `nodes` and `edges` → call-graph second pass for INFERRED `calls` edges). New extractors go in the `extractors/` package, not `extract.py` — the monolith is being split (`graphify/extractors/MIGRATION.md` has the porting playbook and current status). +2. Re-export the function from `extract.py` (`from graphify.extractors. import extract_ # noqa: F401`) and register the file suffix in `extract()` dispatch and `collect_files()`. 3. Add the suffix to `CODE_EXTENSIONS` in `detect.py` and `_WATCHED_EXTENSIONS` in `watch.py`. 4. Add the tree-sitter package to `pyproject.toml` dependencies. 5. Add a fixture file to `tests/fixtures/` and tests to `tests/test_languages.py`.