对话中的事实护盾:记录对话、抽取可核验事实主张,并以低打扰方式提示可能错误的陈述。
当前仓库是一个 monorepo,包含 iPhone 前端和后端核验服务 scaffold。
.
├── PRD.md
├── frontend/ # SwiftUI iPhone MVP
└── backend/ # FastAPI claim verification scaffold
The iPhone MVP lives in frontend/.
Open the Xcode project:
cd frontend
open DengKiller.xcodeprojRegenerate the Xcode project after editing frontend/project.yml:
cd frontend
tools/xcodegen/xcodegen/bin/xcodegen generateRun core tests:
cd frontend
swift testRun full iOS tests with an available simulator:
cd frontend
xcodebuild test -project DengKiller.xcodeproj -scheme DengKillerApp -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.5' -derivedDataPath .build/DerivedData CODE_SIGNING_ALLOWED=NOThe backend scaffold lives in backend/. It provides a small FastAPI service
for single-claim verification and keeps the PRD privacy boundary explicit:
GET /healthPOST /v1/claims/verify- Pydantic schemas aligned with the Swift
VerificationRequestandVerificationResultmodels. - A dual-mode verification pipeline: deterministic fixtures for local/CI and Brave Search plus OpenAI evidence judgement when deployment keys are set.
- Domain routing and source allowlists for technical, business, and civic facts.
- Optional structured source citations in verification results.
- Privacy guard that rejects full audio, full transcripts, full conversations, messages, and speaker history.
Set up the backend with uv:
cd backend
uv sync --extra devRun the API:
cd backend
uv run uvicorn app.main:app --reloadRun backend tests:
cd backend
uv run pytestLocal development loads backend/.env; production reads only injected
environment variables. Real retrieval is enabled when BRAVE_SEARCH_API_KEY
and OPENAI_API_KEY are configured with VERIFICATION_MODE=auto; Jina Reader
then converts allowlisted public pages to clean Markdown before evidence
judgement. Set VERIFICATION_MODE=fixture for deterministic offline behavior.
The backend does not include persistent storage, accounts, or full conversation
upload. See backend/README.md for configuration, architecture, and privacy
rules.
Frontend work remaining from PRD.md:
- Polish real audio capture with volume/activity handling and more robust interruption recovery.
- Evaluate an on-device Whisper-style ASR option after the Apple Speech MVP.
- Improve sentence finalization beyond punctuation and Apple Speech final signals, especially for long pauses and multi-sentence ASR revisions.
- Keep full audio, full transcripts, session review, and verification results local to the phone by default.
- Add local deletion controls for single sessions and an optional auto-delete period.
- Improve low-interruption notifications: lightweight real-time state for high confidence/high importance claims, plus richer after-conversation review.
- Add UI support for evidence summaries, uncertainty explanations, and sources once the backend returns them.
Backend work remaining from PRD.md:
- Replace the rule-based mock verifier with real claim extraction, checkworthiness scoring, and initial classification.
- Extend source allowlists and golden evaluations beyond the initial technical, business, and civic coverage, especially for more regions and languages.
- Add lightweight RAG for curated stable sources alongside search-based retrieval.
- Add streaming verification progress, such as
received,classifying,retrieving,judging_evidence, andcompleted. - Add feedback and opt-in error-example endpoints without uploading full conversations by default.
- Add model-version metadata to the existing privacy-safe operational logs.
- Add optional storage for curated public sources, public evidence cache, verification metadata, and user-authorized high-confidence error examples.
- Add high-risk domain safeguards for political, medical, legal, and investment claims: evidence and limitations only, no final decision advice.
Deng Killer must default to protecting the user's full conversation:
- Do not upload full audio by default.
- Do not upload full transcripts by default.
- Do not upload speaker history or full conversation context by default.
- Backend verification should receive only one selected claim plus minimal necessary context.
- Logs and analytics must not contain private transcript or audio content.