mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
fix(chat): keep every listed task linked and send long lists to a document
A chat agent asked for all 501 open tasks wrote them as compacted ranges
(RUN-76–82). The conversation links a full task identifier, so only each
range's first task got a source link: 161 of 501 tasks had none. The chat
guidance said how to write a task link but nothing about long lists.
The guidance now tells agents to write each identifier in full, explains
that a range links only its first task, and says to save a list too long
for the reply as a document on the conversation's task, linked as
/<prefix>/issues/<identifier>#document-<key>, with a summary in the reply.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit db1c1a30c2)
This commit is contained in:
1 parent
d0e0fc5764
commit
67f8fd3ae0
2 files changed
+7
No files matched your search
@@ -1050,6 +1050,11 @@ describe("chat prompt policy", () => {
|
||||
const prompt = buildPaperclipTaskMarkdown({ issue: { id: "chat", identifier: null, title: "Chat", workMode: "ask", conversationAgentId: "agent" } });
|
||||
expect(prompt).toContain("/<its prefix>/issues/<identifier>");
|
||||
});
|
||||
it("tells chat agents to keep every listed task linked, and where a long list goes", () => {
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("write each task identifier in full");
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("a range such as RUN-12–14 links only its first task");
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("/<prefix>/issues/<identifier>#document-<key>");
|
||||
});
|
||||
|
||||
it("gives chat replies a usable route for both task and approval sources", () => {
|
||||
expect(AGENT_CHAT_DIRECTIVE).toContain("/<prefix>/issues/<identifier>");
|
||||
|
||||
@@ -114,6 +114,8 @@ For task links, use the company-prefixed relative path /<prefix>/issues/<identif
|
||||
|
||||
When a reply concerns a specific agent, such as one you paused, resumed, configured, or reported on, link its profile at /<prefix>/agents/<urlKey or id> using the agent's returned urlKey or id. A profile link is not a mention: use agent:// only when you intend to notify that agent.
|
||||
|
||||
When a reply lists many tasks, write each task identifier in full, such as RUN-12, RUN-13, RUN-14. This conversation links each full identifier to its task, but a range such as RUN-12–14 links only its first task and leaves the others without a source link. When a complete list is too long to read in the reply, save it as a document on this conversation's task and link it, such as [Open work by owner](/<prefix>/issues/<identifier>#document-<key>), keeping a short summary with the counts in the reply.
|
||||
|
||||
A person's own display name and avatar belong to their account, and only they can change them in their profile settings at /<prefix>/company/settings/instance/profile. Agent credentials cannot edit a person's profile, and renaming an agent, a member record or the company does not change it. When the person asks to change their own name or avatar, link that page instead of attempting the change.
|
||||
|
||||
This conversation and your credentials belong to one company. A task identifier whose prefix differs from this conversation's prefix belongs to another company or to none, and you cannot read it here, even when the person can open it themselves: a lookup that is not found does not mean the task does not exist. Do not search for it further, guess its content or copy anything from it. Say that this chat can only work in this company, and that to use that task the person can switch to its company and open a chat there. Link the task at /<its prefix>/issues/<identifier>, taking the prefix from the identifier the person gave; this is the one link that does not use this conversation's prefix.
|
||||
|
||||
Reference in new issue
Block a user