Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6444e07
fix: preserve unified search partial result state
jlitola Aug 27, 2026
2269026
feat: add unified search presentation model
jlitola Aug 27, 2026
a005625
fix: complete unified search action facts
jlitola Aug 27, 2026
6150eb2
fix: retain progress target presentation facts
jlitola Aug 27, 2026
458e3ca
test: align n8n source readiness fixture
jlitola Aug 27, 2026
ce5b201
feat: migrate MCP search text to presentation model
jlitola Aug 27, 2026
1c70d5e
test: align tool and smoke search contracts
jlitola Aug 27, 2026
42ea820
test: reject all legacy search headers
jlitola Aug 27, 2026
020520e
fix: preserve search recovery and source provenance
jlitola Aug 27, 2026
8358717
docs: document outcome-first search contract
jlitola Aug 27, 2026
963902a
fix: bound unified search summaries
jlitola Aug 27, 2026
982cc78
fix: retain unified search query and site context
jlitola Aug 27, 2026
7a32352
chore: remove dead unified search trailer
jlitola Aug 27, 2026
b17adbe
fix: classify symbol readiness as code
jlitola Aug 27, 2026
b1aa34a
fix: harden unified search provenance
jlitola Aug 27, 2026
0467e7b
refactor: simplify unified search projection
jlitola Aug 27, 2026
fa73ef9
fix: preserve unified search target context
jlitola Aug 27, 2026
f37df0a
refactor: restore alternative merge behavior
jlitola Aug 27, 2026
704815a
refactor: separate searched source targets
jlitola Aug 27, 2026
53d8eb0
fix: preserve indexing freshness evidence
jlitola Aug 27, 2026
53c710d
fix: avoid duplicate readiness targets
jlitola Aug 27, 2026
3dcb5cc
docs: record completed search output phase
jlitola Aug 27, 2026
78fdfcf
Merge remote-tracking branch 'origin/main' into jlitola/ux-search-out…
jlitola Aug 27, 2026
a57d44d
docs: record integrated search verification
jlitola Aug 27, 2026
911f67d
refactor: share search text across CLI and MCP
jlitola Aug 27, 2026
16df3d5
docs: record shared search formatter contract
jlitola Aug 27, 2026
19ce936
test: strengthen CLI search smoke contract
jlitola Aug 27, 2026
49e495b
fix: keep search pagination surface-native
jlitola Aug 27, 2026
e1c0e00
test: lock CLI search text dialect
jlitola Aug 27, 2026
9157eae
test: accept terminal search smoke outcomes
jlitola Aug 27, 2026
79afea3
docs: close shared search formatter verification
jlitola Aug 27, 2026
720c641
Merge remote-tracking branch 'origin/main' into jlitola/ux-search-out…
jlitola Aug 27, 2026
7d4dbbd
docs: record latest main integration
jlitola Aug 27, 2026
d93d36a
fix: group search readiness by target
jlitola Aug 27, 2026
a687e8c
fix: preserve search target boundaries
jlitola Aug 27, 2026
d714cfc
fix: report exact search target state
jlitola Aug 27, 2026
5577670
fix: adapt search output to terminal width
jlitola Aug 28, 2026
256a6db
fix: preserve useful indexed refs
jlitola Aug 28, 2026
8f05cca
fix: compact completed search results
jlitola Aug 28, 2026
24ff6db
fix: preserve compact result edge cases
jlitola Aug 28, 2026
ef74408
fix: use ASCII search hit separators
jlitola Aug 28, 2026
a0633d0
test: preserve Unicode search payload punctuation
jlitola Aug 28, 2026
eb57874
fix: preserve search follow-up locators
jlitola Aug 28, 2026
83cde61
test: align CLI search output expectations
jlitola Aug 28, 2026
2556232
docs: document unified search separators
jlitola Aug 28, 2026
2cce8f5
fix: preserve search hit hierarchy
jlitola Aug 28, 2026
ab46bea
fix: validate wrapped search hit headers
jlitola Aug 28, 2026
b736444
fix: accept repository title wrapping
jlitola Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changes/search-output-hierarchy.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"githits": patch
"@githits/mcp": patch
---

- **Clarify unified search output** - Add exact partial-result truth to JSON and route `githits` and `@githits/mcp` search/search-status through one outcome-first formatter with compact completed-result headlines, numbered locator-first human hits that retain docs page IDs for `docs_read`, ASCII formatter-authored punctuation, source provenance, target-grouped readiness when trust facts require it, terminal-aware CLI wrapping, concise session/action rows, bounded provenance, ANSI hierarchy, and surface-native continuation guidance while preserving Unicode backend payload text.
27 changes: 20 additions & 7 deletions docs/implementation/cli-commands.md

Large diffs are not rendered by default.

64 changes: 59 additions & 5 deletions docs/implementation/mcp-cli-parity.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,59 @@ test suite anchors the doc.
healthy source status remains suppressed for non-empty success. Text advice
is renderer-only and never replaces structured JSON.

### Search output parity

CLI human `search` / `search-status` and MCP `search` / `search_status` default
`text-v1` use one shared formatter. The presentation model owns target groups,
readiness, trust limits, and action selection; the text renderer owns wording,
wrapping, hit anatomy, and ordering. Callers provide ANSI enablement,
surface-native action syntax, and an optional output width. CLI supplies its
current terminal width; MCP uses the formatter's 80-column default. The order is
outcome headline, target blocks with
identity plus grouped readiness/usable alternatives, warnings and results, an
optional session summary, and one positive next action.

`PENDING`, `INDEXING`, and `SEARCHING` remain distinct. Active empty output uses
`Indexing - no results yet`; an active response without a snapshot uses
`Indexing - no result snapshot yet`, with corresponding lifecycle labels for
other active states. Active result counts use `interim` when `partialResults` is
false and `partial` when it is true. When session facts exist, the renderer may
emit one optional session row composed from available facts: `Search <ref>` when
a reference exists, aggregate `<ready>/<total> target(s) ready` when progress
exists, and a lifecycle summary when a reference has no progress. The combined
form is `Search <ref> | <ready>/<total> target(s) ready`; completed output
without session facts may omit it. A reference appears once in that row when
available and once in the follow-up action when the action carries it. Terminal
and unknown statuses retain their exact status. Site suggestions remain ordered
advisory labels and are never selected automatically.

`evidenceNotice` remains exact in JSON and is not rendered as a generic
mutable-evidence slogan. Concrete stale, provisional, pending, and coverage
facts remain grouped under targets; parser/query and structured-constraint facts
appear once below the outcome. Promoted lifecycle warning prose, raw reason
codes, indexing references, and opaque evidence text stay out of default text.
Reissuing the same search is valid and waits on the same underlying work; text
does not emit negative repeat or poll policy directives.

MCP renders `Next: search_status search_ref=... wait_timeout_ms=...`; CLI renders
`Next: githits search-status ... --wait ...`. The session row and continuation
action use the same reference when both are present; raw diagnostic fields are
never rendered. Search-result follow-ups likewise use
`code_read` / `docs_read` in MCP and `githits code read` / `githits docs read` in
CLI. ANSI-stripped CLI output shares the same hierarchy and wording as no-color
MCP text apart from those supplied command dialects; line breaks can differ
because CLI uses the terminal width while MCP uses the 80-column default.

CLI `--json` output and MCP `format: "json"` output remain the structured parity
boundary: every
result-bearing initial payload and stored `search_status.result` carries the
backend's exact `partialResults: boolean`, including both `false` and `true`;
payloads with no result snapshot omit that field. Full `warnings[]`, source
diagnostics, evidence notices, reason codes, references, and alternative lists
remain available in JSON even when MCP text classifies or bounds them for
readability. The shared JSON parity tests compare these envelopes deeply; only
surface-native follow-up and pagination syntax plus ANSI differ.

### `PARITY-ERROR-ENVELOPE`

- Every error result, on both surfaces, carries
Expand Down Expand Up @@ -269,8 +322,9 @@ test suite anchors the doc.

### `PARITY-SHARED-TEXT-FORMATTER`

- Terminal rendering and MCP text rendering may share formatter code when
the output is useful to both humans and agents.
- Unified search terminal and MCP text rendering use one shared formatter;
other text surfaces may share formatter code when the output is useful to
both humans and agents.
- Shared formatters must accept surface-specific hints so MCP never emits
CLI-only instructions like `--verbose` or `--lifecycle all`.
- Default MCP success output should be compact `text-v1`; programmatic
Expand Down Expand Up @@ -311,9 +365,9 @@ When a new tool lands with both MCP and CLI surfaces:

## Non-goals

- **Forcing identical default prose.** CLI terminal output and MCP text
are related products, not identical products. Share formatters only
when the shape is useful on both surfaces and hints can be made
- **Forcing identical default prose outside unified search.** Unified search
deliberately shares wording, hierarchy, and wrapping; other CLI terminal
output and MCP text remain related products whose hints can be
surface-native.
- **Shared MCP description copy.** Each tool's description targets a
different decision the agent is making. Copy is not reusable.
Expand Down
Loading