Skip to content

feat: per-module metadata front-matter block in llms-full.txt - #79

Merged
wuzzzzaah merged 2 commits into
mainfrom
feat/per-module-frontmatter-11875131242123459741
May 21, 2026
Merged

feat: per-module metadata front-matter block in llms-full.txt#79
wuzzzzaah merged 2 commits into
mainfrom
feat/per-module-frontmatter-11875131242123459741

Conversation

@wuzzzzaah

Copy link
Copy Markdown
Owner

Adding per-module metadata front-matter block in llms-full.txt. Added emit_frontmatter to LlmsTxtConfig, imports to ParsedModule, and --emit-frontmatter flag to CLI. Implemented import extraction in Python and TypeScript parsers. Updated render_full to emit YAML block when enabled. Added relevant tests.

Fixes #63


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

Each module section in `llms-full.txt` now optionally includes a structured YAML
metadata block containing:
- language: The module's programming language.
- exports: List of top-level functions, classes, and constants.
- imports: List of module-level imports (currently for Python and TypeScript).
- routes: List of HTTP routes (method and path).

This feature is opt-in via the `--emit-frontmatter` CLI flag or by setting
`emit_frontmatter = true` in the `[tool.llmstxt_gen]` section of `pyproject.toml`.

Extraction of imports is implemented for:
- Python: handles `import`, `import as`, and `from ... import` (including relative).
- TypeScript: handles `import ... from '...'` and direct `import '...'`.

YAML generation uses JSON encoding for lists to ensure safe escaping.

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.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wuzzzzaah
wuzzzzaah merged commit 5f8f7fd 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: per-module metadata front-matter block in llms-full.txt

1 participant