Split llms-full.txt into llms-chat-apps.txt and llms-agents.txt #463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split LLM ingestion bundles into llms-chat-apps.txt and llms-agents.txt and update generator in generate_llms_full.py to build three targeted files from docs/pages
Introduce a configurable
generate_llms_txtin generate_llms_full.py that assembles content from selecteddocs/pagessubdirectories and generatesllms-chat-apps.txt,llms-agents.txt, andllms-full.txt; update the workflow to ignorellms-*.txtand add an npm script to run the generator; revise chat-apps intro docs to reference the new files.📍Where to Start
Start with the
__main__script block and thegenerate_llms_txtfunction in generate_llms_full.py.📊 Macroscope summarized 2abc30b. 1 file reviewed, 3 issues evaluated, 3 issues filtered, 0 comments posted
🗂️ Filtered Issues
llms/generate_llms_full.py — 0 comments posted, 3 evaluated, 3 filtered
os.makedirs(output_dir)is called outside the surroundingtryblock and withoutexist_ok=True. This can raise aFileExistsErrororPermissionErrordue to a race between the existence check and directory creation, or if a file already exists atoutput_dir. Because it is outside thetry, the exception will terminate the script without the intended error handling/logging. Move the creation inside thetryor useos.makedirs(output_dir, exist_ok=True)and catch exceptions. [ Already posted ]isinstance(content, str) and content.startswith("Error:"). This will falsely classify a legitimate markdown file whose content begins with "Error:" as unreadable and skip it. Use a structured return (e.g.,(ok, content)), exceptions, or a sentinel type/value to distinguish read errors from valid file content. [ Already posted ]print(f"Successfully processed {len(processed_files)} Markdown files into {output_file}")even whenprocessed_filesis empty. The calling script treats an empty result as a failure and exits with error. This creates contradictory success/failure messaging for the same operation, confusing operators and automated log parsers. Adjust logging to report zero-file cases as a warning or failure consistently with the caller. [ Low confidence ]