backnotprop / backnotprop/plannotator
Pi: make /plannotator-last message anchoring optional
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 649
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 109
Description
## Problem
In the Pi extension, `/plannotator-last` injects a large amount of redundant context when sending feedback on the most recent assistant response.
With `@plannotator/pi-extension` `0.27.3`, a small annotation produces a message shaped like:
```text
This feedback applies to the earlier assistant response excerpted below:
> [up to 1,000 characters of the original assistant response]
User feedback:
[the actual annotation feedback]
```
For the normal `/plannotator-last` workflow, the original response is already in Pi's conversation context. Repeating up to 1,000 characters wastes context and makes short feedback unnecessarily verbose.
## Reproduction
1. Use Pi with `@plannotator/pi-extension` `0.27.3`.
2. Generate a normal assistant response.
3. Run `/plannotator-last`.
4. Add one short annotation and send feedback.
5. Observe that the injected follow-up includes a long excerpt of the original response in addition to the feedback.
## Current implementation
`apps/pi-extension/index.ts`:
- `anchorMessageFeedback()` prepends the original response excerpt.
- The result is built before `getAnnotateMessageFeedbackPrompt()` applies `prompts.annotate.runtimes.pi.messageFeedback`.
Therefore, setting `messageFeedback` to `{{feedback}}` removes only the wrapper. It cannot disable the original-message excerpt.
## Expected behavior
Provide a way to disable or limit this anchoring for Pi, for example a configuration option that allows feedback to contain only the annotations. The current behavior could remain the default for stale or previously selected messages, while normal last-message feedback could avoid duplicating context.
## Related issues
- #193 requested reducing annotation message overhead.
- #431 requested context anchoring and was consolidated into #900.
- #900 tracks plan context and feedback policy controls, including omitting or summarizing feedback context.
Contributor guide
Assessment
This issue has not been assessed yet.