Repository navigation
Add function-handler section to llms.txt and urlcode docs search CLI - #432
Merged
Merged
Conversation
…h CLI
- llms.txt: document the function handler shape (request, {args, env, route}),
string-form vs long-form args binding, and point at 'urlcode docs search'
instead of grepping llms-full.txt for a routine question.
- CLI: add 'urlcode docs search TEXT [--json]', with parity to MCP search_docs
(at most three bounded excerpts from the packaged agent docs corpus).
- Update docs/TOOLING.md, CLI capability matrix (capabilities --json tooling
list) and CLI help/usage for the new command.
- Add a CLI test asserting bounded excerpt output and the no-args/unknown
error cases.
- Add a changeset.
Closes #406
Co-Authored-By: Claude Sonnet 5 <[email protected]>
This was referenced Sep 22, 2026
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.
Summary
llms.txt: the(request, {args, env, route})signature, string-form vs long-formargsbinding, and a pointer tourlcode docs searchinstead of greppingllms-full.txt.urlcode docs search TEXT [--json], a CLI command with parity to the MCPsearch_docstool: at most three bounded excerpts from the packaged agent docs corpus (samesearchDocsimplementation insrc/agent-context.ts).docs/TOOLING.mdto document the CLI equivalent, the CLI usage/help text, and thecapabilities --jsontooling list.test/recipes.test.ts) asserting bounded excerpt output, thematched:/text format, and the no-args/unknown-subcommand error cases.Context
From #406: a benchmark run showed an agent reading
llms.txt(14 KB), then running four grep passes plus two reads overllms-full.txt(240 KB) hunting for the function handler signature andargsbinding, becausellms.txtdidn't answer those questions and there was no bounded CLI search comparable to the MCPsearch_docstool.Verification
npm run verify(lint, typecheck, check, build, full test suite including workspace packages) passes clean on this branch, rebased onto latestmain.node src/cli.ts docs search "function args env"and confirmed bounded excerpt output matchingsearch_docs's shape.npm run docs:llms(thellms-full.txtgenerator) produces no diff after thellms.txtchange, confirming it stays in sync.Closes #406
🤖 Generated with Claude Code