feat: add dynamic /llms.txt route for AI agent discovery#1106
Open
feat: add dynamic /llms.txt route for AI agent discovery#1106
Conversation
Generate machine-readable index of EffectionX packages using the llmstxt.org standard. The route: - Uses useWorkspaces() to enumerate all @effectionx/* packages - Extracts name and description from each package - Returns plain text with proper Content-Type header Also updates HTML link href and footer to point to /llms.txt instead of /assets/llms.txt (static file kept as fallback).
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
AI agents have almost zero knowledge (~10-15% confidence) of
@effectionx/*packages. When tested, agents couldn't recommend packages like@effectionx/processfor process spawning or@effectionx/websocketfor WebSocket connections.The llms.txt standard provides a machine-readable format for helping AI agents discover and understand project capabilities.
Approach
Add a dynamic
/llms.txtroute that generates a machine-readable index following the llmstxt.org standard:useWorkspaces("thefrontside/effectionx")to clone/read the effectionx monorepoall()for concurrent resolutionContent-TypeheaderAlso updates the
<link rel="alternate">in HTML head and footer link to point to/llms.txtinstead of/assets/llms.txt(static file kept as fallback for cached URLs).Pattern follows
blogFeedRoute—*handler()returnsResponse, noroutemap(keeps it out of sitemap.xml but staticalize will discover it via the<link>tag).