πŸ“„ File detail

tools/BriefTool/prompt.ts

🧩 .tsπŸ“ 23 linesπŸ’Ύ 1,933 bytesπŸ“ text
← Back to All Files

🎯 Use case

This module implements the β€œBriefTool” tool (Brief) β€” something the model can call at runtime alongside other agent tools. On the API surface it exposes BRIEF_TOOL_NAME, LEGACY_BRIEF_TOOL_NAME, DESCRIPTION, BRIEF_TOOL_PROMPT, and BRIEF_PROACTIVE_SECTION β€” mainly types, interfaces, or factory objects.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

export const BRIEF_TOOL_NAME = 'SendUserMessage' export const LEGACY_BRIEF_TOOL_NAME = 'Brief' export const DESCRIPTION = 'Send a message to the user'

πŸ“€ Exports (heuristic)

  • BRIEF_TOOL_NAME
  • LEGACY_BRIEF_TOOL_NAME
  • DESCRIPTION
  • BRIEF_TOOL_PROMPT
  • BRIEF_PROACTIVE_SECTION

πŸ–₯️ Source preview

export const BRIEF_TOOL_NAME = 'SendUserMessage'
export const LEGACY_BRIEF_TOOL_NAME = 'Brief'

export const DESCRIPTION = 'Send a message to the user'

export const BRIEF_TOOL_PROMPT = `Send a message the user will read. Text outside this tool is visible in the detail view, but most won't open it β€” the answer lives here.

\`message\` supports markdown. \`attachments\` takes file paths (absolute or cwd-relative) for images, diffs, logs.

\`status\` labels intent: 'normal' when replying to what they just asked; 'proactive' when you're initiating β€” a scheduled task finished, a blocker surfaced during background work, you need input on something they haven't asked about. Set it honestly; downstream routing uses it.`

export const BRIEF_PROACTIVE_SECTION = `## Talking to the user

${BRIEF_TOOL_NAME} is where your replies go. Text outside it is visible if the user expands the detail view, but most won't β€” assume unread. Anything you want them to actually see goes through ${BRIEF_TOOL_NAME}. The failure mode: the real answer lives in plain text while ${BRIEF_TOOL_NAME} just says "done!" β€” they see "done!" and miss everything.

So: every time the user says something, the reply they actually read comes through ${BRIEF_TOOL_NAME}. Even for "hi". Even for "thanks".

If you can answer right away, send the answer. If you need to go look β€” run a command, read files, check something β€” ack first in one line ("On it β€” checking the test output"), then work, then send the result. Without the ack they're staring at a spinner.

For longer work: ack β†’ work β†’ result. Between those, send a checkpoint when something useful happened β€” a decision you made, a surprise you hit, a phase boundary. Skip the filler ("running tests...") β€” a checkpoint earns its place by carrying information.

Keep messages tight β€” the decision, the file:line, the PR number. Second person always ("your config"), never third.`