Skip to content

feat: add dynamic /llms.txt route for AI agent discovery#1106

Open
taras wants to merge 1 commit intov4from
llms-txt-route
Open

feat: add dynamic /llms.txt route for AI agent discovery#1106
taras wants to merge 1 commit intov4from
llms-txt-route

Conversation

@taras
Copy link
Member

@taras taras commented Feb 12, 2026

Motivation

AI agents have almost zero knowledge (~10-15% confidence) of @effectionx/* packages. When tested, agents couldn't recommend packages like @effectionx/process for process spawning or @effectionx/websocket for 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.txt route that generates a machine-readable index following the llmstxt.org standard:

  • Uses useWorkspaces("thefrontside/effectionx") to clone/read the effectionx monorepo
  • Enumerates all 23 packages using all() for concurrent resolution
  • Extracts name and description from each package
  • Truncates descriptions to first sentence for agent-friendly consumption
  • Returns plain text Response with proper Content-Type header

Also updates the <link rel="alternate"> in HTML head and footer link to point to /llms.txt instead of /assets/llms.txt (static file kept as fallback for cached URLs).

Pattern follows blogFeedRoute*handler() returns Response, no routemap (keeps it out of sitemap.xml but staticalize will discover it via the <link> tag).

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).
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/thefrontside/effection@1106

commit: 423b972

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.

1 participant