Skip to content

Conversation

@josh-wong
Copy link
Member

Description

This PR updates the process for generating llms-full.txt during Docusaurus site builds, switching from the default plugin-based method to a custom script that leverages gitingest for richer documentation context. The main changes introduce a new Python script, update build tooling, and provide detailed documentation for this new workflow.

Related issues and/or PRs

Changes made

  • Added scripts/generate-llms-full.py, a Python script that installs gitingest if necessary and generates llms-full.txt with improved metadata and context for AI models.
  • The build script in package.json now runs a new generate-llms-full step, which executes the Python script to generate a comprehensive llms-full.txt by using gitingest.
  • Updated docusaurus.config.js to disable the plugin's built-in generateLLMsFullTxt option, clarifying that the new method is preferred and referencing the documentation for details.
  • Added scripts/README.md, which explains the motivation, usage, requirements, and benefits of the new generate-llms-full.py script and the gitingest-based workflow.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have updated the side navigation as necessary.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Introduces `scripts/generate-llms-full.py` to generate `llms-full.txt` by leveraging the gitingest package instead of `docusaurus-plugin-llms`. The script handles installation of gitingest if missing, configures include/exclude patterns, and writes the output to the build directory.
Introduces a new npm script `generate-llms-full` that runs a Python script for generating LLMs data. The build process now includes this step to ensure LLMs data is generated during builds.
Set `generateLLMsFullTxt` to false in `docusaurus-plugin-llms` configuration. This change is made because gitingest is now used to generate a more detailed llms-full.txt file.
Introduces documentation explaining the purpose, usage, requirements, and configuration of the `generate-llms-full.py` script. The README details how the script uses gitingest to create an AI-friendly `llms-full.txt` file with enhanced context for documentation.
@josh-wong josh-wong requested a review from Copilot August 7, 2025 05:11
@josh-wong josh-wong self-assigned this Aug 7, 2025
@josh-wong josh-wong added the improvement Improvements made to an existing feature label Aug 7, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @josh-wong, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've updated our Docusaurus site's build process to generate a more intelligent llms-full.txt file. Previously, the default plugin generated this file without sufficient context for AI models. My changes introduce a custom Python script that uses gitingest to include essential metadata and structural information, significantly improving how AI models can understand and utilize our documentation. This ensures that our documentation is better optimized for consumption by large language models, providing them with richer and more accurate context.

Highlights

  • Custom LLM Text Generation: I've introduced a new Python script (scripts/generate-llms-full.py) that leverages the gitingest tool to create a more comprehensive llms-full.txt file. This new file includes crucial front-matter metadata and directory structure, providing AI models with richer context about our documentation.
  • Build Process Integration: I've updated package.json to integrate the new Python script directly into our Docusaurus build process. This ensures that the enhanced llms-full.txt is automatically generated whenever the site is built, streamlining our documentation workflow.
  • Plugin Configuration Update: I've modified docusaurus.config.js to disable the default generateLLMsFullTxt option within the docusaurus-plugin-llms. This change explicitly signals our preference for the new gitingest-based generation method, avoiding redundant or less effective outputs.
  • Comprehensive Documentation: To ensure clarity and ease of use, I've added a detailed scripts/README.md. This new documentation explains the rationale behind the gitingest workflow, provides instructions on how to use the generate-llms-full.py script, lists its requirements, and outlines the significant benefits it offers over the previous method.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the process for generating llms-full.txt files by replacing the default plugin-based method with a custom Python script that leverages gitingest for enhanced documentation context and metadata inclusion.

  • Introduces a Python script that automatically installs and uses gitingest to generate comprehensive llms-full.txt files
  • Updates the build process to include the new script while disabling the plugin's built-in generation
  • Adds comprehensive documentation explaining the motivation and workflow for the new approach

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
scripts/generate-llms-full.py New Python script that uses gitingest to generate llms-full.txt with front-matter metadata and directory context
scripts/README.md Documentation explaining the script's purpose, usage, and benefits over the plugin approach
package.json Updated build script to include the new generate-llms-full step with fallback Python commands
docusaurus.config.js Disabled plugin's generateLLMsFullTxt option with reference to new documentation

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Python script to generate llms-full.txt using gitingest, which is a great improvement for including richer context in the documentation for AI models. The changes are well-structured, and the new README provides excellent documentation. My review includes a few suggestions to improve the robustness of the build script and the code quality of the new Python script.

@josh-wong josh-wong merged commit 23c0ac9 into main Aug 7, 2025
1 check passed
@josh-wong josh-wong deleted the generate-llms-full.txt-by-using-gitingest-script branch August 7, 2025 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvements made to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant