Skip to content

feat: dependency graph section in llms-full.txt - #80

Merged
wuzzzzaah merged 4 commits into
mainfrom
feat-dependency-graph-17053758233463198368
May 21, 2026
Merged

feat: dependency graph section in llms-full.txt#80
wuzzzzaah merged 4 commits into
mainfrom
feat-dependency-graph-17053758233463198368

Conversation

@wuzzzzaah

Copy link
Copy Markdown
Owner

This PR adds a "Dependency Graph" section to the llms-full.txt output.

Key changes:

  • src/llmstxt_gen/parsers/base.py: Added imports field to ParsedModule.
  • 14 language parsers in src/llmstxt_gen/parsers/: Implemented logic to extract import/include/require/use statements and populate the imports list.
  • 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 to render_full that displays these dependencies.
  • tests/test_renderer.py: Added test_render_full_includes_dependency_graph to 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.user resolving to src/models/user.py).

Fixes #64


PR created automatically by Jules for task 17053758233463198368 started by @wuzzzzaah

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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

wuzzzzaah and others added 3 commits May 21, 2026 17:12
…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>
@wuzzzzaah
wuzzzzaah merged commit db7748d into main May 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: cross-module import dependency graph section

1 participant