From 070a2677a034e9007770457655311ca180355b41 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Thu, 13 Aug 2026 18:13:28 -0700 Subject: [PATCH] feat(cli): triage playbook establishes install shape, allows gated db writes Review follow-ups: the investigate section now starts by identifying how T3 Code runs (npx t3 serve, background service, desktop app) and which surface the user connects from (website, desktop local/remote, mobile). SQLite writes go from banned to allowed only when they fix the described problem, with explicit user permission. Co-Authored-By: Claude Fable 5 --- .github/triage/PLAYBOOK.md | 15 +++++++++++++-- apps/server/src/cli/triagePrompt.ts | 17 ++++++++++++++--- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/triage/PLAYBOOK.md b/.github/triage/PLAYBOOK.md index b4a38479d2..46a82a1c1c 100644 --- a/.github/triage/PLAYBOOK.md +++ b/.github/triage/PLAYBOOK.md @@ -45,12 +45,23 @@ Diagnosis grounded in source beats guessing. ## 5. Investigate -Work from evidence, not assumption. In rough order of value: +First establish the shape of the install, because the same symptom points at +different code depending on it: + +- How is T3 Code running on this machine: `npx t3 serve` in a terminal, the + background service, or the desktop app? +- Which surface is the user connecting from: the website (app.t3.codes), the + desktop app against a local server, the desktop app against a remote server, + or the mobile app? + +Then work from evidence, not assumption. In rough order of value: - The server log and the trace file (`server.trace.ndjson`) around the time of the problem. Recent failures usually leave a trail here. - The provider event log, for problems with claude/codex/cursor sessions. -- The SQLite database. Read it freely; NEVER write to it. +- The SQLite database. Read it freely, but only write when a write is necessary + to fix the problem the user described, and get their explicit permission + before any write. - Service state: is the server installed as a service (systemd, launchd, Windows)? Is it running, crash-looping, or dead? Is its port answering? - Harness health: are the user's coding-agent CLIs installed, on PATH, and logged in? diff --git a/apps/server/src/cli/triagePrompt.ts b/apps/server/src/cli/triagePrompt.ts index d6d03d47a8..7bbe0d025b 100644 --- a/apps/server/src/cli/triagePrompt.ts +++ b/apps/server/src/cli/triagePrompt.ts @@ -57,12 +57,23 @@ Diagnosis grounded in source beats guessing. ## 5. Investigate -Work from evidence, not assumption. In rough order of value: +First establish the shape of the install, because the same symptom points at +different code depending on it: + +- How is T3 Code running on this machine: \`npx t3 serve\` in a terminal, the + background service, or the desktop app? +- Which surface is the user connecting from: the website (app.t3.codes), the + desktop app against a local server, the desktop app against a remote server, + or the mobile app? + +Then work from evidence, not assumption. In rough order of value: - The server log and the trace file (\`server.trace.ndjson\`) around the time of the problem. Recent failures usually leave a trail here. - The provider event log, for problems with claude/codex/cursor sessions. -- The SQLite database. Read it freely; NEVER write to it. +- The SQLite database. Read it freely, but only write when a write is necessary + to fix the problem the user described, and get their explicit permission + before any write. - Service state: is the server installed as a service (systemd, launchd, Windows)? Is it running, crash-looping, or dead? Is its port answering? - Harness health: are the user's coding-agent CLIs installed, on PATH, and logged in? @@ -176,7 +187,7 @@ Generated by \`t3 triage\` at ${input.generatedAt}. ## Paths - State dir: ${input.paths.stateDir} -- Database (SQLite, read only, never write): ${input.paths.dbPath} +- Database (SQLite; write only with the user's explicit permission): ${input.paths.dbPath} - Settings: ${input.paths.settingsPath} - Logs dir: ${input.paths.logsDir} - Server log: ${input.paths.serverLogPath}