Skip to content

Clarify trial filter help: facility modes, phase 1/2 semantics, sex all no-op#213

Merged
imaurer merged 2 commits intomainfrom
ux-trial-filter-help-text
Mar 14, 2026
Merged

Clarify trial filter help: facility modes, phase 1/2 semantics, sex all no-op#213
imaurer merged 2 commits intomainfrom
ux-trial-filter-help-text

Conversation

@imaurer
Copy link
Collaborator

@imaurer imaurer commented Mar 14, 2026

Summary

Improves the clarity of biomcp search trial help text for three filter flags that had confusing or missing guidance:

  • --facility: Now distinguishes between text-search mode (cheap, plain string match) and geo-verify mode (materially more expensive, triggers N extra fetches per result) that activates when --lat/--lon/--distance are also provided.
  • --phase 1/2: Now explains that the value 1/2 matches the ClinicalTrials.gov combined Phase 1/Phase 2 label (studies tagged as both phases simultaneously), not Phase 1 OR Phase 2.
  • --sex all: Now explains that all (also any/both) resolves to no sex restriction — no sex filter is sent to ClinicalTrials.gov — so users know the flag is a no-op rather than a missing echo.

No changes to underlying filter logic, parsers, search, or render behavior.

Changes

  • src/cli/mod.rs: Updated doc comments for --facility, --phase, and --sex; added render_trial_search_long_help() helper and three CLI help contract tests.
  • spec/04-trial.md: Added "Trial Help Explains Special Filter Semantics" spec section asserting all three clarified surfaces.

Test plan

  • cargo test — 619 passed, 0 failed
  • cargo clippy --all-targets --all-features — clean
  • cargo fmt --check — clean
  • make spec — 103 passed (pre-existing Gene→Articles network timeout in spec/02-gene.md is unrelated)
  • biomcp search trial --help — all three clarifications visible in rendered output

@imaurer imaurer merged commit 4fc426f into main Mar 14, 2026
4 of 5 checks passed
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