Open source · Self-hosted · Bring your own model开源 · 自托管 · 自带模型

A storybook courtroom for hard conversations. 一座为「难聊的话」而建的童话法庭。

VibeCourt is a bilingual relationship-mediation web app. Two people testify privately to Justice Ruby — an adaptive AI cat judge who asks one question at a time — and receive one careful, uncertainty-honest comparative ruling. The real subject of this project: how to engineer trust around an LLM.

VibeCourt 是一个双语的亲密关系调解应用:两个人分别私密地向猫法官 Justice Ruby 陈述同一件事, 她一次只问一个问题,最后给出一份谨慎、如实保留不确定性的对比裁决。 这个项目真正的主题是:如何围绕大模型做可信赖的工程

Next.js 14 TypeScript strict IndexedDB · 0 accounts MIT EN / 简体中文
VibeCourt interface collage: Justice Ruby the cat judge, a relationship project room, a private interview, and a ruling preview
Royal Storybook Cat Court — project room, private interview, and ruling preview 皇家童话猫法庭 —— 项目房间、私密访谈与裁决预览
EXHIBIT A

What it does它做什么

Instead of a long questionnaire, VibeCourt runs a conversation. The structured schema still exists — timelines, actions, impact, intentions, relevant agreements — but it lives inside the agent as internal memory, filled by adaptive questioning rather than displayed as a form.

VibeCourt 不用冗长的表单,而是用对话完成一切。结构化的信息模型仍然存在——时间线、行为、影响、意图、相关协议—— 但它作为 Agent 的内部记忆,由自适应提问逐步填充,而不是摆在用户面前的表格。

01
Create a Relationship Project创建一个关系项目
Two participants, long-term Shared Agreements they both confirm.两位参与者,加上双方共同确认的长期共享协议。
02
Open a case, choose who speaks first开庭立案,选择谁先陈述
Each participant privately acknowledges the AI processing before their own first question.每位参与者在自己的第一个问题前,私密确认一次 AI 处理告知。

Participant A — private参与者 A —— 私密

  • Adaptive interview, ≤ 8 answers自适应访谈,至多 8 轮回答
  • Provenance-tracked extraction带出处溯源的结构化抽取
  • AI-drafted statement → edit → confirmAI 代写陈述 → 修改 → 确认

Participant B — private参与者 B —— 私密

  • Same flow, fully isolated同样的流程,完全隔离
  • A's interviewer never sees B's wordsA 的访谈永远看不到 B 的话
  • Enforced by validators, not prompts由验证器强制,而非提示词约定
✦ the two accounts meet only in the final analysis ✦✦ 两份陈述只在最终分析中相遇 ✦
03
One gated call produces Justice Ruby's ruling一次门控调用产出 Justice Ruby 的裁决
Common ground · classified differences · factor-by-factor responsibility with cited evidence · a repair plan · a proposed new pact · honest uncertainty notes. 共同点 · 分歧分类 · 逐因素责任评估(附引证)· 修复计划 · 新协议提案 · 如实的不确定性说明。
EXHIBIT B

The architecture stance架构立场

The design bet of this project: the model proposes, code disposes. A deterministic control plane owns every state machine — coverage computation, question budgets, candidate selection, stop rules, safety authority, persistence and idempotency. The LLM contributes what it is actually good at (semantic extraction, natural question wording, prose statements, holistic comparative judgment), and every proposal passes typed schemas, runtime validators, and acceptance policies before it can touch application state.

这个项目的设计押注是:模型提议,代码裁决。一个确定性控制平面拥有所有状态机—— 覆盖度计算、提问预算、候选选择、停止规则、安全权威、持久化与幂等。LLM 只贡献它真正擅长的部分 (语义抽取、自然的提问措辞、成文陈述、整体性的对比判断),而每一个提议都必须通过类型化 schema、 运行时验证器和接受策略,才能触碰应用状态。

Failure is a first-class state: if a required AI step fails, the answer stays saved and the step becomes pending and retryable — the app never silently substitutes a local imitation of the model. That honesty rule shaped the whole persistence design.

失败是一等公民:必需的 AI 步骤失败时,回答保持已保存,步骤进入待处理、可重试状态—— 应用绝不悄悄用本地替身冒充模型输出。这条诚实原则塑造了整个持久化设计。

EXHIBIT C

Engineering highlights工程亮点

The interesting problems here are reliability problems — the kind that come up when an LLM product has to be trustworthy about other people's conflicts.

这里有趣的问题都是可靠性问题——当一个 LLM 产品要对他人的冲突负责时,必须解决的那一类。

Provenance

Extraction that must cite its sources必须引用出处的抽取

Every extracted item cites the exact interview turns it came from. Verbatim quotes are validated as exact substrings of the cited turn — otherwise they must be labeled paraphrase or inference. Cross-participant citation is structurally impossible.

每一条抽取结果都必须引用它来自的具体访谈轮次。逐字引用会被校验为被引轮次的精确子串——否则必须标注为转述或推断。跨参与者引用在结构上不可能发生。

Control plane

Proposal / veto question generation「提议 / 否决」式提问生成

Code computes the eligible question targets; the model only proposes wording. A seven-rule acceptance policy (pool eligibility, repetition, language, single-question form, schema leakage, tone, A/B isolation) vetoes bad proposals into a deterministic fallback — so a misbehaving model degrades wording, never correctness.

代码计算合法的提问目标,模型只提议措辞。七条接受规则(候选池合法性、重复、语言、单问形式、schema 泄漏、语气、A/B 隔离)会把不合格的提议否决为确定性回退——模型失灵最多影响措辞,永远不影响正确性。

Responsibility

Three layers, no weighted sums三层责任设计,拒绝加权求和

Rubric-guided factor findings with ordinal magnitudes → the model's holistic allocation with an uncertainty band → thin code enforcement (quote truthfulness, direction sanity, arithmetic, label lexicon, agreement scope). Percentages render only at sufficient confidence, degrade to qualitative leanings, and are withheld entirely in safety-aware reports.

量规引导的逐因素认定(序数量级)→ 模型的整体性责任分配(带不确定区间)→ 轻量代码校验(引用真实性、方向一致性、算术、标签词表、协议适用范围)。百分比只在置信度足够时呈现,不足时降级为定性倾向,安全敏感报告中则完全隐藏。

Safety

Deterministic safety authority确定性的安全权威

A tiered on-device lexicon runs on every turn. Ordinary signals route to a private suitability checkpoint (end, continue knowingly, revise, delete). A narrow, fixture-tested hard-stop tier for genuinely immediate danger is processed locally and never transmitted. Provider output can never suppress a safety signal.

分层的设备端词表在每一轮运行。普通信号路由到私密适宜性检查点(结束 / 知情继续 / 修正 / 删除)。针对真正即时危险的窄硬停层经过夹具测试,在本地处理且绝不传输。模型输出永远无法压制安全信号。

Reliability

Idempotency and honest failure幂等与诚实失败

Agent runs carry request hashes and in-flight deduplication; questions persist once at display time, so refresh never regenerates or double-bills. Failed required steps become pending/retryable states with full recovery on reload — never silent substitution.

Agent 调用携带请求哈希并做在途去重;问题在展示时一次性持久化,刷新绝不重新生成或重复计费。失败的必需步骤成为待处理/可重试状态,重新加载后完整恢复——绝无静默替代。

Privacy

Privacy as build artifacts, not promises用构建产物而非承诺保证隐私

Provider keys are server-only, verified by a canary build check that plants fake secrets and scans the client bundle. Per-call payloads are minimized; each participant sees a versioned AI-processing notice naming the actual recipient; the audit ledger stores metadata only. Limits live in a written threat model, not marketing copy.

Provider 密钥只存在于服务端,并由「金丝雀」构建检查验证:注入假密钥后扫描客户端产物。每次调用的载荷最小化;每位参与者看到指名真实接收方的版本化 AI 处理告知;审计账本只存元数据。产品边界写在威胁模型文档里,而不是营销话术里。

Testing

Network-free test discipline网络隔离的测试纪律

57 Vitest files run fully offline against fake providers, recorded fixtures, and fake-indexeddb — contracts, validators, safety tiers, migrations, deletion cascades. Live provider evaluation is a separate, explicitly gated harness with hard call caps and budget discipline.

57 个 Vitest 测试文件完全离线运行:假 provider、录制夹具、fake-indexeddb——覆盖契约、验证器、安全分层、迁移、删除级联。真实 provider 评测是独立且显式门控的评测框架,带硬性调用上限和预算纪律。

Persistence

Local-first, migration-safe storage本地优先、可迁移的存储

Dexie/IndexedDB with 13 tables behind typed repositories: append-only testimony, versioned derived extraction, compact per-session working state (no transcript resends), transactional cascade deletion with seed tombstones, refresh-safe resume mid-interview.

Dexie/IndexedDB 的 13 张表隐藏在类型化仓储层之后:只追加的证词、版本化的派生抽取、紧凑的会话工作状态(不重发全文)、带种子墓碑的事务化级联删除、访谈中途刷新也能安全恢复。

EXHIBIT D

Stack & numbers技术栈与数字

Next.js 14 · App Router TypeScript · strict Tailwind CSS Dexie / IndexedDB Vitest + fake-indexeddb OpenAI-compatible adapter i18n EN / 简中 Rive (planned character animation)(角色动画,规划中)
13
DB tables数据表
57
Offline test files离线测试文件
≤8
Answers per interview每场访谈回答数
1
Model call per answer每答一次模型调用
2
Languages种语言
0
Accounts required需要的账号

Deploy it yourself: any OpenAI-compatible endpoint works — a hosted provider, a gateway, or a fully local model. Without a configured provider the app runs honestly in a "configuration required" state; it never pretends a local heuristic is the AI.

自行部署:任何 OpenAI 兼容端点都可以——托管服务、网关、或完全本地的模型。未配置 provider 时, 应用会诚实地进入「需要配置」状态,绝不会用本地启发式冒充 AI。

EXHIBIT E

Honest limits, by design有意为之的诚实边界

This product tells you what it is not.这个产品会告诉你它不是什么。

VibeCourt is a communication-support and reflection tool — not therapy, legal advice, evidence verification, or a crisis service. Separate interviews are interview-private, not permanent secrecy: the final ruling is read by both participants, with attributed summaries. Self-hosting does not automatically mean testimony stays on the device — the app names the actual AI recipient and asks each participant before anything is sent. All of this is documented in a public threat model rather than implied away.

VibeCourt 是沟通辅助与复盘工具——不是心理治疗、法律意见、证据鉴定或危机服务。分开访谈是「访谈期间私密」, 而非永久保密:最终裁决由双方共同阅读,并带有署名的归纳。自托管也不自动等于数据不出设备—— 应用会指名真实的 AI 接收方,并在发送任何内容前征得每位参与者的确认。 这一切写在公开的威胁模型文档里,而不是被含糊带过。

Read the threat model ↗阅读威胁模型 ↗