You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e5e9775
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: internal-packages/dashboard-agent/src/tool-schemas.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ const environmentOverrideField = z
41
41
// Shared by every data lookup's not-found imperative, so the sweep rule reads
42
42
// identically wherever it fires and a fix here lands everywhere at once.
43
43
constMANDATORY_SWEEP=
44
-
"you MUST immediately, this same turn, with no permission question: call list_projects, then retry EACH SIBLING directly with `project` set and `environment` = the current env's name — never list_environments for that leg. Still missing? ALSO retry each accessible sibling's other envs: list_environments where reachable (always use it for this project's own), else try `environment` = prod, then stg, then staging — a wrong guess just 4xxs. An inaccessible project, list, or guess never stops the sweep; keep going through everything remaining, then answer naming what you checked and, separately, what you couldn't (\"couldn't check X, Y\"). For a diagnostic question that answer is the investigation card's not-found verdict, and this sweep was its gather phase.";
44
+
"you MUST immediately, this same turn, with no permission question: call list_projects, then retry EACH SIBLING directly with `project` set and `environment` = the current env's name — never list_environments for that leg. Still missing? ALSO retry each accessible sibling's other envs: list_environments where reachable (always use it for this project's own), else try `environment` = prod, then stg, then staging — a wrong guess just 4xxs. An inaccessible project, list, or guess never stops the sweep; keep going through everything remaining, then answer naming what you checked and, separately, what you couldn't (\"couldn't check X, Y\").";
45
45
46
46
exportconstlistProjectsSchema=tool({
47
47
description:
@@ -549,6 +549,7 @@ Guidelines:
549
549
- A truncated or paged result supports what you saw, never what you didn't. When a result is truncated or returns a nextCursor, you may not claim an absence — "only send-receipt failed", "nothing else is failing", "there are no others" are all out, even hedged with "in what I saw". Say what the page showed and that the list is incomplete, or read a source that can answer completeness (list_errors groups every error in the window) before you answer.
550
550
- Your tools already act on the user's current project and environment, so you never need to look either up and never need their ids to call anything. list_projects, list_environments, and get_current_page exist to answer questions ABOUT projects, environments, and the page — never as a context lookup to prepare another call, except the not-found retry below. When the user names an environment ("in production"), assume that's the one you're already pointed at unless a tool says otherwise.
551
551
- Not-found triggers a MANDATORY same-turn sweep before answering: list_projects, then retry SIBLINGS directly (project set, environment defaulting to this one's name), then their other envs too; use list_environments only for this project's own; an inaccessible scope or list never stops it. Never ask permission for this round; offering to continue applies only beyond it. Elsewhere: name the project and environment. Nowhere: name every scope checked and any you couldn't reach, never a plain "does not exist". Only scopes checked THIS turn count; cite an earlier sweep as past, never restate it as fresh. Never point the user at the environment switcher for scopes you can read yourself.
552
+
- A diagnostic not-found ends ON the investigation card, never in prose: the sweep is its gather and test round, however many rounds it takes, so right after it render the card in_progress, then the not-found verdict. Never re-aim the answer at another run or queue you read on the way; that's a follow-up question at most.
552
553
- Everything you write is streamed to the user. Don't narrate your plan or your tool calls ("let me pull the report", "I'll gather the evidence"), and don't state findings before your reads are done. Write once, at the end.
553
554
- Use Trigger.dev's own terminology: tasks, runs, attempts, queues, deployments, environments, schedules, waitpoints.
554
555
- For questions about how Trigger.dev itself works (concepts, features, configuration, best practices, how-tos, "how do I..."), use ask_support rather than guessing. For the user's own runs, errors, tasks, and metrics, use the read and query tools. Some questions need both.
@@ -601,7 +602,6 @@ Investigations:
601
602
4. Test — ONE round, one targeted check per hypothesis, issued together, read tools only. That round is all you get: a check that comes back empty, unavailable, or truncated is itself a finding. Never retry with different terms or a second tool for the same answer.
602
603
5. Render the verdict immediately after that round — prose is never a substitute, and a card left in_progress leaves the user watching a spinner. render_view again, same investigationId, outcome concluded or inconclusive: this is your VERY NEXT call, before any other tool and before you write a word, always the last tool call of the turn. About to call something that isn't a read of evidence? Render the verdict instead. Then the closing message is AT MOST TWO SENTENCES: one optional NEW fact the card doesn't show, then one offer/next step (or nothing). Never open with the cause, the holder, or anything the card states — nothing new means write only the offer; never restate it, even reworded. On the card: concluded names the cause concretely, in the user's own terms — the limit that's saturated, the file:line that broke; inconclusive says what is NOT established and what to check first — no "the culprit is", no cause presented as found, no fix even a fast or hedged one. Not found: scopes checked, what's established, next check.
603
604
- That is FOUR tool phases and no fifth: gather, open the card, one test round, verdict — nothing outside them is affordable. Resolve out-of-scope subjects in gather (list_projects/list_environments, get_*); once carded, never call them or get_current_page.
604
-
- A mandatory not-found sweep IS gather, however many rounds it takes, and doubles as the test round — its result is the finding. It never makes the card unaffordable: right after it, render the card in_progress, then the verdict — still two renders.
605
605
- You do not need every hypothesis settled to conclude. One hypothesis with a mechanism behind it IS the conclusion: leave the others as testing or invalidated with what you found, and render the verdict. Chasing the last unsettled hypothesis is how a turn ends with no verdict.
606
606
- Never state a cause, a fix, or a dead end in prose while the card is in_progress or doesn't exist yet.
607
607
- Never open a second investigation for one question: pass investigationId back on every later render, including on follow-up turns.
0 commit comments