feat: offer find in every actions footer - #47
Merged
Conversation
find is the cheapest way to go deeper on a rendered page: one command lands on the block that matters, where read needs the right number first and next pages toward it. SKILL.md already lists it first under "going further, cheapest first", but no footer offered it, and the footer is what an agent actually reads, so callers were steered toward read, next, and raw instead. The entry now appears in all three footers, after do and before read, so the order matches the skill. On find's own output it turns the "narrow the query" hint into an action. Cost on the fixtures is 3 or 4 tokens per render (news 127 to 131, login 30 to 33, forum 695 to 699). Skipping one next on a long page pays for a hundred of those. The test checks the same three footer sites as the stub probe: find is present and listed ahead of read. It fails on main. Closes #46.
Merged
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.
Closes #46.
What this changes
find <query>is implemented and dispatched but appeared in noactions:footer. The footer is the line an agent reads to pick its next command, so callers were steered towardread,next, andraweven thoughskills/web-browsing-cli/SKILL.mdlistsfindfirst under "going further, cheapest first".All three footers now offer it, after
do <n>and beforeread <n>so the order matches the skill:src/render.jsactions: do <n> | find <query> | read <n> | next | rawsrc/act.js, find with one matchactions: do <n> | find <query> | read <n> | next | rawsrc/act.js, find with several matchesactions: do <n> | find <query> | read <n> | next | rawOn find's own output this turns the existing "narrow the query" hint into an action. The README example footer gains the entry too.
SKILL.mdneeded no change.Token cost
Measured with
renderat the default budget on every HTML fixture intests/pages:A single
nextat the default budget is about 500 tokens, so one skipped page pays for over a hundred renders carrying the entry.Test
tests/act.test.jsgets a sibling of the stub probe from #45, checking the same three footer sites:find <query>is present in each and listed ahead ofread <n>. Verified it fails on main:Full suite: 188 passing, offline, no new dependencies.