Skip to content

Make prompt history the default search scope#39

Merged
tony merged 5 commits into
masterfrom
streamline-00
May 31, 2026
Merged

Make prompt history the default search scope#39
tony merged 5 commits into
masterfrom
streamline-00

Conversation

@tony
Copy link
Copy Markdown
Owner

@tony tony commented May 31, 2026

Summary

  • Make prompt-scope search the default, including dedicated prompt-history stores.
  • Add explicit scope/--scope selection for prompts, conversations, and all records across CLI, query language, MCP, and library APIs.
  • Update docs, MCP guidance, and changelog copy for the prompt-vs-conversation boundary.

Closes #38.

Test Plan

  • rm -rf docs/_build; uv run ruff check . --fix --show-fixes; uv run ruff format .; uv run ty check; uv run py.test --reruns 0 -vvv; just build-docs;

tony added 3 commits May 31, 2026 12:16
why: Prompt-history stores should participate in the default prompt search, while full conversation transcripts remain an explicit opt-in surface. Naming that boundary as scope gives CLI, query, and MCP callers a single user-facing selector.
what:
- Treat dedicated prompt-history records as prompts and classify conversation scope by store role.
- Replace search and grep --type with --scope for prompt, conversation, and all searches.
- Rename MCP search inputs and capability metadata to expose scope, with tests covering the new defaults.
why: The search breadth selector is now scope in the public CLI and MCP surfaces. Keeping internal dataclass fields, type aliases, and test fixtures named search_type would preserve the ambiguity that the new vocabulary removes.
what:
- Rename SearchType/SearchTypeName aliases to SearchScope/SearchScopeName.
- Rename SearchQuery, SearchArgs, and GrepArgs fields from search_type to scope.
- Update engine, CLI, TUI, MCP, and tests to use scope throughout the internal API.
why: The new scope vocabulary changes how users choose default prompt search versus explicit conversation search. The docs and MCP-facing guidance need to teach that boundary consistently and stop pointing at removed search_type/search_history surfaces.
what:
- Update README, CLI, MCP, library, query-language, backend, and changelog docs for --scope and scope: usage.
- Refresh docs-only FastMCP signatures and library snippets to use scope.
- Adjust user-facing MCP/TUI/source descriptions from prompt-history wording to prompt/conversation scope wording.
why: Prompt-scope search should prefer dedicated prompt-history stores when they are present. Filtering only by record kind allowed user turns from Claude project transcripts to leak into default grep/search results and made broad default searches slower than promised.
what:
- Track agents with discovered prompt-history sources and skip their chat transcript sources during prompt-scope planning.
- Keep record-level scope matching local to record kind so transcript-only source sets still work.
- Add regression coverage for Claude history versus project transcripts and source planning.
why: Grep output is line-oriented. Letting bare patterns match source metadata such as paths could emit heading-only records when the record text had no matching line, which made default terminal output look like empty responses.
what:
- Add an internal search match-surface selector to SearchQuery.
- Make grep use the text-only surface while regular search keeps the metadata-rich haystack.
- Preserve the selected surface when rebuilding parsed query-language searches.
- Add regression coverage for terms that appear only in a source path.
@tony tony merged commit b2cdead into master May 31, 2026
3 checks passed
@tony tony deleted the streamline-00 branch May 31, 2026 18:59
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.

Make prompt history the default search scope; require opt-in for conversations

1 participant