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 d7950ac
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -177,7 +179,8 @@ function buildPromptFromMessage(input: PromptFromMessageInput): string {
177
179
constpromptSections=[
178
180
input.instruction,
179
181
input.responseShape,
180
-
"Rules:",
182
+
...(input.guidance??[]),
183
+
input.rulesLabel??"Rules:",
181
184
...input.rules.map((rule)=>`- ${rule}`),
182
185
"",
183
186
`${input.messageLabel??"User message"}:`,
@@ -234,26 +237,41 @@ export function buildThreadTitlePrompt(input: ThreadTitlePromptInput) {
234
237
constprompt=buildPromptFromMessage({
235
238
instruction: isRegeneration
236
239
? [
237
-
"You write concise thread titles for coding conversations.",
238
-
"The user requested a new title based on the contents of this thread.",
240
+
"Generate a new title that will help the user recognize this T3 Code thread weeks later.",
239
241
`The previous title was ${JSON.stringify(input.previousTitle)}.`,
240
-
"Come up with a new title that better represents the current state of the thread.",
241
242
].join("\n")
242
-
: "You write concise thread titles for coding conversations.",
243
-
responseShape: "Return a JSON object with key: title.",
243
+
: "Generate a title that will help the user recognize this T3 Code thread weeks later.",
244
+
responseShape: "Return JSON with exactly one key: title.",
245
+
guidance: [
246
+
"",
247
+
"Before answering, silently reduce the request to:",
248
+
"- Subject: What system, feature, or problem is this really about?",
249
+
"- Outcome: What does the user ultimately want to understand or change?",
250
+
"- Incidental instructions: What only describes how the agent should do the work?",
251
+
"",
252
+
"Title the subject and outcome. Discard incidental instructions.",
253
+
"",
254
+
],
255
+
rulesLabel: "Editorial rules:",
244
256
rules: [
245
-
isRegeneration
246
-
? "Title should summarize the thread's current state, not just its initial request."
247
-
: "Title should summarize the user's request, not restate it verbatim.",
257
+
"3-8 words, fewer than 40 characters.",
258
+
"Use a compact noun phrase or clear action phrase.",
259
+
"Capture the umbrella goal when the request lists several symptoms or steps.",
260
+
"Name the product change, not the mock, plan, report, branch, or PR used to produce it.",
261
+
"Models, subagents, tools, output formats, and monitoring instructions do not belong in the title unless they are themselves the topic.",
262
+
'For reviews, name what is being reviewed and the relevant concern. Avoid generic titles such as "Review PR 123" when linked or attached context reveals the subject.',
263
+
"For research, name the question domain rather than the requested research process.",
264
+
"Do not claim the work is complete.",
265
+
"Do not copy and truncate the user's message.",
266
+
"Avoid project names already visible in the UI, quotes, labels, filler, and trailing punctuation.",
267
+
"Use attached images as primary context for UI issues.",
268
+
"When a URL or attachment is the only source of the subject, use available tools to inspect it. If it cannot be resolved, remain accurate rather than guessing.",
248
269
...(isRegeneration
249
270
? [
250
-
"Capture the thread's intent, not a PR number or other superficial detail.",
271
+
"Capture the current durable subject and outcome across the whole thread, not merely its initial request or latest step.",
251
272
"Return a different title from the previous title.",
252
273
]
253
274
: []),
254
-
"Keep it short and specific (3-8 words).",
255
-
"Avoid quotes, filler, prefixes, and trailing punctuation.",
256
-
"If images are attached, use them as primary context for visual/UI issues.",
0 commit comments