feat: dependency graph section in llms-full.txt - #80
Conversation
Implemented extraction of import statements across all 14 supported languages using tree-sitter. Added an `imports` field to the `ParsedModule` dataclass to store raw import strings. Updated `render_full` in `renderer.py` to resolve these imports to internal module paths and emit a "Dependency Graph" adjacency list in `llms-full.txt`. Added unit tests in `tests/test_renderer.py` to verify correct rendering and internal path resolution. Verified that all 157 tests pass. Co-authored-by: wuzzzzaah <1645504+wuzzzzaah@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…merge main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…typescript.py Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rge with main) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This PR adds a "Dependency Graph" section to the
llms-full.txtoutput.Key changes:
src/llmstxt_gen/parsers/base.py: Addedimportsfield toParsedModule.src/llmstxt_gen/parsers/: Implemented logic to extract import/include/require/use statements and populate theimportslist.src/llmstxt_gen/renderer.py: Implemented a path mapping resolution helper that matches import strings (dotted or sub-paths) against project modules. Added a section torender_fullthat displays these dependencies.tests/test_renderer.py: Addedtest_render_full_includes_dependency_graphto ensure proper functionality and filtering of third-party imports.The dependency graph helps LLMs understand project structure by identifying entry points vs internals. Module paths are resolved even when imported via dotted names or sub-paths (e.g.,
models.userresolving tosrc/models/user.py).Fixes #64
PR created automatically by Jules for task 17053758233463198368 started by @wuzzzzaah