Skip to content

feat(types): add layered search output (--layer 1/2/3)#717

Merged
AlexMikhalev merged 1 commit intomainfrom
task/88-layered-search
Mar 26, 2026
Merged

feat(types): add layered search output (--layer 1/2/3)#717
AlexMikhalev merged 1 commit intomainfrom
task/88-layered-search

Conversation

@AlexMikhalev
Copy link
Copy Markdown
Contributor

Summary

  • Adds Layer enum (One/Two/Three) to terraphim_types controlling search result detail level
  • Layer 1: title + tags only (~50 tokens/result) for token-efficient AI workflows
  • Layer 2: + first paragraph summary (~150 tokens/result)
  • Layer 3: full content (current default, backwards compatible)
  • CLI flag --layer, HTTP query parameter, and result filtering all wired
  • Updated all 25 affected files with new field (struct initialisers + imports)

Test plan

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo fmt --all --check passes
  • cargo test --workspace passes
  • Verify default layer is backwards-compatible (Layer::One via serde default)

Refs #88

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

…ciency

Add Layer enum (One/Two/Three) to SearchQuery controlling result detail:
- Layer 1: title + tags only (~50 tokens/result)
- Layer 2: + first paragraph summary (~150 tokens/result)
- Layer 3: full content (current default, backwards compatible)

CLI flag --layer, HTTP query parameter, and result filtering all wired.

Refs #88

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AlexMikhalev AlexMikhalev force-pushed the task/88-layered-search branch from 822aa68 to fdd0043 Compare March 26, 2026 12:23
@AlexMikhalev AlexMikhalev merged commit d2a8b72 into main Mar 26, 2026
27 of 39 checks passed
@AlexMikhalev AlexMikhalev deleted the task/88-layered-search branch March 26, 2026 14:05
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.

1 participant