feat(search): --content ranks conversation text; --raw keeps grep parity - #33
Merged
Conversation
Default --content now parses candidate sessions and counts only conversation text (user prompts, assistant text+thinking), so ranking follows discussion instead of injected boilerplate. Role-labeled previews in table and --json; path added to session/content JSON results. --raw keeps the old grep-parity raw line scan. A cheap raw prefilter gates the parse, skipped when JSON escaping could hide the query. Makefile build refreshes a stale root ./ccx. See docs/devlog/2026-08-03-content-search-noise.org. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
--contentwas grep parity over raw transcript lines, so injected noise dominated ranking: a Stop-hook line fired every turn put a 327-hit boilerplate session first while the session that actually designed the topic ranked #3.--contentparses candidate sessions (all providers, sidechains included) and counts only conversation text — user prompts and assistant text/thinking. Hook attachments, tool results, command echoes, meta lines count zero.--rawkeeps the old grep-parity line scan verbatim.[user]/[assistant]/[agent]) in table and--json(previews, max 3);pathadded to session/content JSON results.make buildrefreshes a stale root./ccxso it can't shadow fresh builds.Evidence
Devlog:
docs/devlog/2026-08-03-content-search-noise.org(findings + resolution). Live acceptance:ccx search --content deadmanranks the naming-verdict session #1 (27 conversation hits, preview shows it); the 330-raw-hit boilerplate session is absent from default, still #1 under--raw. Timing at par: 20s signal vs 23s raw.Tests
go test ./...green; new:TestScanConversationText*,TestMatchSnippet,TestRawPrefilterSafe.🤖 Generated with Claude Code