尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证TBCT V2
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗An LLM-based platform for delivering Trial-Based Cognitive Therapy (TBCT) in a multicenter randomized controlled trial. Participants go through the eight TBCT sessions in a chat interface with an AI counselor, and clinicians follow their progress, review safety events and manage the trial from a separate dashboard.
Demo: https://tbct-v2.vercel.app
Note on the protocol content. TBCT and its session materials were developed by Irismar Reis de Oliveira. The manuals and session prompts are not included in this repository.
src/shared/protocol/*.generated.tsare empty stubs, so the code type-checks but the sessions have no therapy content until the generated files are rebuilt from a licensed copy.
In a clinical trial the intervention has to be delivered the same way to every participant, and it has to follow the manual. A free-form LLM conversation is the opposite of that. Most of this codebase exists to keep the model inside the protocol while still letting it talk naturally.
The approach we took is to separate what happens next from how it is said. Each session is defined as a graph of steps, and a deterministic runtime decides which step comes next, what information has to be collected from the participant, and when a step is finished. The LLM only writes the wording of each turn and helps interpret free-text answers. Its output is checked before it reaches the participant, and if it fails validation the runtime falls back to a fixed message instead of letting the conversation drift.
flowchart LR
P[Participant app] --> R[Session runtime]
C[Clinician dashboard] --> DB[(Supabase / Postgres)]
R -->|next step, required fields| A[Dialogue agent]
A -->|wording, interpretation| V[Output validator]
V --> R
R --> S[Safety orchestrator]
R --> M[Participant memory]
R --> DB
M --> DB
S --> DB
Participant side. The eight sessions (src/patient/sessions/s01 to s08), worksheets that fill in as the conversation goes, homework, mood check-ins, standardized questionnaires (DASS-21 as the primary outcome, plus PHQ-9 and GAD-7), appointments, messages from the clinician, and the ability to export or request deletion of one's own data. The UI is available in Korean and English.
Clinician side. A protocol studio for editing and validating session definitions, participant monitoring with per-session reports, a safety dashboard for flagged events, escalations and follow-ups, and trial management (randomization, visits, assessments, adverse event reporting and data lock).
Runtime (src/shared/runtime). The state machine and orchestrator, prompt compilation, input assessment, output validation, fallback and repair, language-switch detection, and a separate safety orchestrator that can interrupt a session at any point.
Memory (src/shared/memory). Participants can consent to having earlier sessions remembered. Remembered chunks keep a record of where they came from and when they stop being valid, and every retrieval is logged.
Data and access control (sql/). 44 migrations. Every table that holds participant or trial data is behind row-level security, and consent changes and data access are logged as events.
We ran all eight sessions end to end against scripted patients. With the deterministic provider, all eight completed and passed with no fallbacks or repairs. We then ran the same sessions with a live model, and also ran simulated patients that deliberately try to derail the session partway through to see whether the runtime brings the conversation back. Results are in artifacts/session-fidelity and artifacts/realistic-patient-sessions.
For Session 8 we also ported the protocol to an explicit LangGraph graph (langgraph/) to see how many clinical rules could actually be verified from the recorded turns. Across 47 checks on 45 rules, 21 were traced, 4 are guaranteed by the structure of the graph itself, 1 could not be checked against the reference implementation, and 21 could not be traced from the current records. That last group is mostly about counting and ranges (for example, too many pieces of evidence or ratings outside 0 to 100), which tells us what the runtime should be logging next. The full table is in artifacts/langgraph-verify/report.md.
The test suite has 117 test files (Vitest). Some tests assert on the protocol text itself and will fail without the licensed content.
npm install
npm run type-check
npm test
npm run dev
You will need a Supabase project with the migrations in sql/ applied, and at least NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, AI_PROVIDER and ANTHROPIC_API_KEY set.
Next.js and TypeScript, Supabase (Postgres, auth, realtime), Vercel, Sentry, Vitest, LangGraph for the verification port, Claude (Anthropic API) as the main dialogue model.
Hyeran Hwang, Ari Kim, Donghoo Kim, Hyunjung Nam. Developed between July and October 2026 at Sungkyunkwan University, in collaboration with Irismar Reis de Oliveira.