Skip to content

feat: prefer package.json description over README-inferred#1107

Merged
taras merged 1 commit intov4from
feat/package-json-description
Mar 3, 2026
Merged

feat: prefer package.json description over README-inferred#1107
taras merged 1 commit intov4from
feat/package-json-description

Conversation

@taras
Copy link
Member

@taras taras commented Feb 12, 2026

Motivation

With thefrontside/effectionx#151 merged, all @effectionx/* packages now have concise description fields in their package.json files. These descriptions are written specifically for npm search and AI agent discovery.

The current website reads descriptions from README files, parsing them through a rehype pipeline that extracts the first paragraph. This produces verbose, 200-character excerpts that aren't ideal for the /llms.txt route or package listings.

Approach

Update the package abstraction to prefer package.json description over README-inferred description:

  1. Add description to schemas:

    • PackageJsonSchema in www/lib/package/node.ts
    • PackageManifest interface in www/lib/package/types.ts
  2. Update getManifest() to include description in returned manifest

  3. Update getDescription() in both node.ts and deno.ts to:

    • Check manifest description first
    • Fall back to README-inferred description when not present

This ensures the /llms.txt route generates concise, agent-friendly descriptions like:

- [@effectionx/process](https://frontside.com/effection/x/process): Spawn and manage child processes with structured concurrency
- [@effectionx/websocket](https://frontside.com/effection/x/websocket): WebSocket client with stream-based message handling and automatic cleanup

Instead of verbose paragraph excerpts.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/effection@1107

commit: c9ac74d

Copy link
Member

@cowboyd cowboyd left a comment

Choose a reason for hiding this comment

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

Shouldn't the llms-txt-route be in the sitemap?

Update Node package adapter to read description from package.json
manifest and fall back to README extraction when not present.

This ensures the /llms.txt route and package listings show concise,
agent-friendly descriptions written specifically for npm search and
AI discovery.

Changes:
- Add description to PackageJsonSchema
- Add description to PackageManifest interface
- Update getManifest() to include description
- Update getDescription() to prefer manifest over README
@taras taras force-pushed the feat/package-json-description branch from afef6cf to 17ebdeb Compare March 2, 2026 21:28
@taras
Copy link
Member Author

taras commented Mar 2, 2026

Rebased onto v4 to resolve conflicts.

Regarding the sitemap question: yes! PR #1106 (which merged separately) added SitemapRoute support with a routemap function, so /llms.txt is now included in the sitemap.

This PR now just focuses on the core change: making getDescription() prefer package.json description over README-inferred description.

@taras taras requested a review from cowboyd March 2, 2026 21:33
@taras taras enabled auto-merge (squash) March 2, 2026 21:33
@taras taras disabled auto-merge March 2, 2026 21:33
@taras taras enabled auto-merge (squash) March 2, 2026 21:33
@taras taras merged commit 735b66f into v4 Mar 3, 2026
16 checks passed
@taras taras deleted the feat/package-json-description branch March 3, 2026 02:58
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.

2 participants