diff --git a/CHANGELOG.md b/CHANGELOG.md index a49dc1cb..6a6a8cda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ Full release notes with details on each version: [GitHub Releases](https://github.com/safishamsi/graphify/releases) +## 0.4.22 (2026-04-18) + +- Fix: AST cache written to `src/graphify-out/cache/` instead of project root when all code files share a common prefix like `src/` — `extract()` now called with explicit `cache_root=watch_path` in `_rebuild_code` and `cache_root=Path('.')` in the Codex skill AST step (#429) +- Fix: `.mdx` files silently skipped during detection — added `.mdx` to `DOC_EXTENSIONS` in `detect.py`; MDX-based corpora (Next.js, Docusaurus, Astro) now indexed correctly (#428) + ## 0.4.21 (2026-04-17) - Fix: `graphify cluster-only` crashed with `KeyError: 'total_files'` in `report.py` — cluster-only skips detection so the stats dict was empty; now passes a `warning` key so the report skips the file-stats section (#422) diff --git a/graphify/detect.py b/graphify/detect.py index 2f3473a6..a01f9535 100644 --- a/graphify/detect.py +++ b/graphify/detect.py @@ -19,7 +19,7 @@ class FileType(str, Enum): _MANIFEST_PATH = "graphify-out/manifest.json" CODE_EXTENSIONS = {'.py', '.ts', '.js', '.jsx', '.tsx', '.mjs', '.ejs', '.go', '.rs', '.java', '.cpp', '.cc', '.cxx', '.c', '.h', '.hpp', '.rb', '.swift', '.kt', '.kts', '.cs', '.scala', '.php', '.lua', '.toc', '.zig', '.ps1', '.ex', '.exs', '.m', '.mm', '.jl', '.vue', '.svelte', '.dart', '.v', '.sv'} -DOC_EXTENSIONS = {'.md', '.txt', '.rst'} +DOC_EXTENSIONS = {'.md', '.mdx', '.txt', '.rst'} PAPER_EXTENSIONS = {'.pdf'} IMAGE_EXTENSIONS = {'.png', '.jpg', '.jpeg', '.gif', '.webp', '.svg'} OFFICE_EXTENSIONS = {'.docx', '.xlsx'} diff --git a/graphify/skill.md b/graphify/skill.md index 6ec8ae2d..9bbaa0a9 100644 --- a/graphify/skill.md +++ b/graphify/skill.md @@ -185,7 +185,7 @@ for f in detect.get('files', {}).get('code', []): code_files.extend(collect_files(Path(f)) if Path(f).is_dir() else [Path(f)]) if code_files: - result = extract(code_files) + result = extract(code_files, cache_root=Path('.')) Path('graphify-out/.graphify_ast.json').write_text(json.dumps(result, indent=2)) print(f'AST: {len(result[\"nodes\"])} nodes, {len(result[\"edges\"])} edges') else: diff --git a/graphify/watch.py b/graphify/watch.py index e1d07d1b..3bd08ec2 100644 --- a/graphify/watch.py +++ b/graphify/watch.py @@ -34,7 +34,7 @@ def _rebuild_code(watch_path: Path, *, follow_symlinks: bool = False) -> bool: print("[graphify watch] No code files found - nothing to rebuild.") return False - result = extract(code_files) + result = extract(code_files, cache_root=watch_path) # Preserve semantic nodes/edges from a previous full run. # AST-only rebuild replaces code nodes; doc/paper/image nodes are kept. diff --git a/pyproject.toml b/pyproject.toml index 7b19fb3f..e18e8857 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "graphifyy" -version = "0.4.21" +version = "0.4.22" description = "AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, Aider, OpenClaw, Factory Droid, Trae, Hermes, Kiro, Google Antigravity) - turn any folder of code, docs, papers, images, or videos into a queryable knowledge graph" readme = "README.md" license = { file = "LICENSE" }