all-query-operations-degrade-gracefully
IN derived (depth 2)
All query operations degrade gracefully through multiple independent fallback tiers: ask cascades from LLM synthesis through bounded tool loops to raw FTS5 results on any failure, while search self-heals via index rebuilds on every save and falls back to substring matching on FTS5 unavailability — ensuring queries always return useful results regardless of LLM availability or index state.
Summary
The system's query features are designed so that no single failure — whether the LLM is down, the search index is corrupt, or a tool loop times out — can prevent users from getting results. The ask command tries progressively simpler strategies until something works, and search automatically repairs its own index or falls back to basic text matching, so the system stays useful even in degraded conditions.
Justifications
SL — Two independent graceful-degradation mechanisms combine to provide comprehensive query-path resilience at every level
Antecedents (all must be IN):
- ask-has-tiered-query-modes — The ask module supports tiered query modes with graceful degradation: full LLM synthesis with a bounded 3-iteration tool loop, no-synth mode that bypasses the LLM entirely, and automatic fallback from LLM failure to raw FTS5 search results.
- search-is-resilient-across-index-states — Search operates correctly regardless of FTS5 index availability: the index is derived (rebuilt from scratch on every save) so stale indexes are self-healing, and search falls back to substring matching when FTS tables don't exist or error
Dependents
These beliefs depend on this one:
- query-degradation-is-deterministic-across-all-access-paths — All information access paths degrade gracefully while maintaining deterministic output: interactive queries cascade through tiered modes (LLM synthesis → bounded tool loop → raw FTS5 search), structured reads self-heal missing indexes via derived FTS5 reconstruction, and all fallback paths produce deterministic sorted output.