Files
Dotta 43212cb2b7 fix(slack): require result and review updates in conversation prompts (#15611)
## Thinking Path

> - Paperclip helps people manage AI agents and their work.
> - People can ask an agent to do work from a Slack thread.
> - The agent must return results and review requests to that
conversation.
> - The current prompts explain reply format but do not require these
updates.
> - This change adds one set of instructions to initial prompts and
later turns.
> - Users can see the result and the action needed for review in Slack.

## Linked Issues or Issue Description

**What happened?**
An agent can save results or a plan in Paperclip without telling the
user in Slack that the result is ready or that review is required.

**Expected behavior**
The agent reports results in the originating conversation. If review is
needed, it saves the required interaction and tells the user what to
review and how to act.

**Steps to reproduce**
Start work in a Slack thread. Have the agent prepare a plan that needs
approval or produce a deliverable. The prompt does not explicitly
require a result or review update in that thread.

Related: #15579 adds task links to Slack replies. This change covers
results and review requests, including later turns.

## What Changed

- Add shared instructions for result and review updates.
- Include the instructions in initial Slack guidance and per-turn
guidance.
- Keep the normal approval gates, delivery checks, and duplicate-message
rules.
- Add tests for channel and direct conversations, and for fresh and
resumed native and CLI turns.
- Update the Slack skill documentation.

## Verification

- Passed: guidance and heartbeat context tests (65 tests in two files).
- Passed: `git diff --check`.
- Workspace typecheck and build could not complete because this sandbox
has no `cargo` binary.
- The full local test run was stopped due to the sandbox memory limit.
GitHub CI runs the full checks.
- GitHub CI and automated review are pending.

## Risks

- Low risk. This change updates prompt text and tests. It does not
change transport or permissions.
- Prompt instructions guide agent behavior. They do not guarantee that
Slack delivery succeeds.

## Model Used

- OpenAI GPT-6 (Codex). Used reasoning, code editing, and command tools.
The runtime does not expose a more specific model ID or context window
size.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge
2026-10-09 20:16:24 -05:00
..