From 5c99c49a503180fb5eb6f05d212befdf63d7723a Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 2 Jun 2026 10:32:37 +0000 Subject: [PATCH] docs(bdd): add AI-routing feature (local-first, BYO fallback) Gherkin spec for the routing guardrail: local produces the summary by default; on local failure, fall back only to a user-configured BYO provider; with no BYO, queue for retry and never send content to a third-party model. Encodes the local-first/user-owned principle (VISION) as executable behavior. --- docs/use-cases/ai_routing.feature | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/use-cases/ai_routing.feature diff --git a/docs/use-cases/ai_routing.feature b/docs/use-cases/ai_routing.feature new file mode 100644 index 0000000..7ad1360 --- /dev/null +++ b/docs/use-cases/ai_routing.feature @@ -0,0 +1,35 @@ +Feature: Local-first AI with optional BYO fallback + As a user who values keeping my content on my own stack + I want summaries produced by the local AI first + So that my content only reaches a third-party model when I have explicitly opted in + + Scenario: Local AI produces the summary + Given the local AI stack is available + When a transcript is summarized + Then the local AI produces the summary + And the summary records ai_provider "local" + And the summary records fallback_used as false + + Scenario: Local AI fails and the user has a BYO provider configured + Given the local AI stack fails + And I have configured a BYO provider "anthropic" + When a transcript is summarized + Then Tapir falls back to my "anthropic" provider + And the summary records ai_provider "anthropic" + And the summary records fallback_used as true + + Scenario: Local AI fails and the user has no BYO provider + Given the local AI stack fails + And I have not configured any BYO provider + When a transcript is summarized + Then no summary is produced + And the work is queued for retry + And my content is not sent to any third-party model + + Scenario: A user without BYO never has content sent externally + Given I have not configured any BYO provider + When any transcript is summarized + Then my content is only ever sent to the local AI stack + + # "Reliably" is operationalized as: Primary returned without error within timeout. + # Quality scoring may be added later without changing these scenarios.