Skip to content

Commit f114afa

Browse files
fix(chat): require proper sentence structure for reportProgress messages (#245)
## Summary The `reportProgress` tool description listed capitalized examples ("Searching docs", "Reviewing results", "Running checks") but did not state the rule, so the model sometimes emitted lowercase status text like `researching foo bar` instead of `Researching foo bar`. This PR makes the expectation explicit in both the tool surface the model sees and the delivery spec: - Updated the `reportProgress` tool `description` and `message` parameter description in `packages/junior/src/chat/tools/runtime/report-progress.ts` to require messages be written as a proper sentence fragment (capitalized first letter, present-participle verb), with a positive/negative example. - Updated `specs/slack-agent-delivery-spec.md` progress policy to match, with a changelog entry. No behavior/runtime code changed — this is guidance surfaced to the model through the tool schema. ## Review & Testing Checklist for Human - [ ] Confirm the wording in the tool description reads naturally to the model and isn't overly prescriptive to the point of producing stiff/robotic phrases. - [ ] Confirm the spec wording in `specs/slack-agent-delivery-spec.md` line 138 is consistent with how other progress-policy bullets are worded. ### Notes - No new tests: the existing `agent-tools.test.ts` covers the runtime behavior (trimming + status emission) and still passes; this change is purely to the model-facing description string. Link to Devin session: https://app.devin.ai/sessions/1b0dd6c839fe42048aa46eb31bc54471 Requested by: @dcramer --------- Co-authored-by: David Cramer <david@sentry.io> Co-authored-by: Devin <devin-ai-integration[bot]@users.noreply.github.com>
1 parent 957c740 commit f114afa

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/junior/src/chat/tools/runtime/report-progress.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import { tool } from "@/chat/tools/definition";
55
export function createReportProgressTool() {
66
return tool({
77
description:
8-
"Update the user-visible assistant loading message with a short progress phase. For every non-trivial turn, call this early with the initial major work phase, then call it again only when the major phase meaningfully changes. Use concrete labels like Searching docs, Reviewing results, or Running checks. Skip trivial direct answers, generic filler, and minor substeps.",
8+
"Update the user-visible assistant loading message with a short progress phase. For every non-trivial turn, call this early with the initial major work phase, then call it again only when the major phase meaningfully changes. Messages must be written in sentence case with a present-participle verb (e.g. 'Searching docs', 'Reviewing results', 'Running checks'). Skip trivial direct answers, generic filler, and minor substeps.",
99
inputSchema: Type.Object({
1010
message: Type.String({
1111
minLength: 1,
12-
description:
13-
"Short user-facing progress message. The UI truncates it if needed.",
12+
description: "Short user-facing progress message.",
1413
}),
1514
}),
1615
});

specs/slack-agent-delivery-spec.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- 2026-04-20: Strengthened the tool-backed progress policy to require early explicit progress for non-trivial turns and documented concrete phase-label guidance.
1919
- 2026-04-20: Clarified that only explicit `reportProgress` updates replace generic loading messages; ordinary tool calls must not synthesize progress phases.
2020
- 2026-04-22: Updated finalized reply footer metadata examples to reflect the displayed thinking-level bucket instead of the active trace ID.
21+
- 2026-04-22: Required explicit progress messages to be written as proper sentence fragments (capitalized first letter, present-participle verb).
2122

2223
## Status
2324

@@ -135,7 +136,7 @@ Design note:
135136
- Junior exposes an internal `reportProgress` tool for sparse explicit progress messages.
136137
- For every non-trivial turn, the assistant should call `reportProgress` early with the initial major work phase and again only when the major phase meaningfully changes.
137138
- Trivial turns may rely on the generic loading state and do not need explicit progress.
138-
- Explicit progress messages should use concrete phase labels such as searching, reading, reviewing, or running checks rather than generic filler.
139+
- Explicit progress messages should use concrete phase labels such as searching, reading, reviewing, or running checks rather than generic filler, and must be written as proper sentence fragments with a capitalized first letter and a present-participle verb (e.g. "Researching foo bar", not "researching foo bar").
139140
- Ordinary tool calls must not synthesize progress phases or override the generic loading-message rotation.
140141
- Footer metadata, when enabled, is a separate finalized-reply affordance and must not be treated as assistant progress.
141142

0 commit comments

Comments
 (0)