Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Oct 11, 2025

Remove XML-like / wrappers; process plain user input; update code/tests

Why

  • Tag-gating user input with and is antiquated and unnecessary for modern LLMs.
  • SOTA models infer task vs. follow-up without XML markers; tags add parsing brittleness and cognitive overhead.
  • Simplifies the pipeline, reduces coupling to ad hoc markers, and aligns UX with natural chat.

What

  • Stop wrapping initial task in :
    • src/core/task/Task.ts
  • Process mentions for ALL user text (no tag gating):
    • src/core/mentions/processUserContentMentions.ts
  • Remove tag emissions from runtime outputs:
    • src/core/tools/attemptCompletionTool.ts
    • src/core/tools/executeCommandTool.ts
  • Update prompt helpers to emit plain text instead of blocks:
    • src/core/prompts/responses.ts
  • Remove wrapper in built-in command content:
    • src/services/command/built-in-commands.ts
  • Adjust tests to reflect new behavior (process plain text and tool_result arrays uniformly):
    • src/core/mentions/tests/processUserContentMentions.spec.ts
    • src/core/task/tests/Task.spec.ts

Behavioral notes

  • All user content is now parsed for mentions uniformly (no special-case tags required).
  • New-task prompting: user replies are treated as feedback naturally without wrapper tags.
  • Back-compat: any existing messages containing / are treated just like regular text.

Risks & mitigations

  • Risk: over-processing regular text. Mitigated by existing parseMentions behavior and updated tests.
  • Risk: any logic relying on explicit / markers. Mitigated by moving to content-based handling and test coverage.

Testing

  • Ran full test suite: cd src && npx vitest run
  • Result: all tests passing (with existing skips). Local logs/errors unrelated to this change are unchanged.

Intent

  • Remove legacy XML-style tag dependency.
  • Align with modern model capabilities and reduce maintenance complexity.
  • Make user interactions and pipeline simpler and more robust.

Files changed (high-level):

  • src/core/task/Task.ts
  • src/core/mentions/processUserContentMentions.ts
  • src/core/tools/attemptCompletionTool.ts
  • src/core/tools/executeCommandTool.ts
  • src/core/prompts/responses.ts
  • src/services/command/built-in-commands.ts
  • tests updated accordingly

Important

Remove XML-like <task>/<feedback> tags from user input, updating code and tests to process plain text uniformly.

  • Behavior:
    • Remove <task> and <feedback> tags from user input in Task.ts and processUserContentMentions.ts.
    • Process all user text for mentions without tag gating in processUserContentMentions.ts.
    • Remove <feedback> tag emissions from outputs in attemptCompletionTool.ts and executeCommandTool.ts.
    • Update prompt helpers to emit plain text in responses.ts.
    • Remove <task> wrapper in built-in command content in built-in-commands.ts.
  • Tests:
    • Adjust tests in processUserContentMentions.spec.ts and Task.spec.ts to reflect processing of plain text and tool_result arrays uniformly.
  • Backwards Compatibility:
    • Existing messages with <task>/<feedback> are treated as regular text.
  • Risks & Mitigations:
    • Over-processing regular text mitigated by existing parseMentions behavior and updated tests.
    • Logic relying on explicit markers mitigated by content-based handling and test coverage.

This description was created by Ellipsis for b899f29. You can customize this summary. It will automatically update as commits are pushed.

Copilot AI review requested due to automatic review settings October 11, 2025 22:06
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 11, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes XML-like <task> and <feedback> wrapper tags from the codebase, simplifying user input processing by treating all text uniformly for mention parsing. The change modernizes the system to rely on natural language understanding rather than explicit XML markers.

  • Removes <task> wrapper from initial task content
  • Eliminates <feedback> tags from tool outputs and user feedback processing
  • Updates mention processing to handle all user content instead of only tag-wrapped content

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/services/command/built-in-commands.ts Removes <task> wrapper from built-in command content
src/core/tools/executeCommandTool.ts Removes <feedback> wrapper from user feedback text
src/core/tools/attemptCompletionTool.ts Removes <feedback> wrapper from completion feedback
src/core/task/tests/Task.spec.ts Updates tests to expect mention processing on all text
src/core/task/Task.ts Removes <task> wrapper from initial task text
src/core/prompts/responses.ts Removes <feedback> wrappers from response formatting functions
src/core/mentions/processUserContentMentions.ts Changes logic to process mentions in all text instead of only tagged content
src/core/mentions/tests/processUserContentMentions.spec.ts Updates tests to reflect new behavior of processing all text blocks

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@hannesrudolph hannesrudolph moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Oct 11, 2025
@hannesrudolph hannesrudolph self-assigned this Oct 11, 2025
@hannesrudolph hannesrudolph marked this pull request as draft October 11, 2025 22:09
@roomote
Copy link

roomote bot commented Nov 3, 2025

See this task on Roo Code Cloud

All previously identified issues have been resolved. The latest commit adds defensive checks to prevent rendering undefined feedback in tool responses.

Previous Reviews

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

@roomote
Copy link

roomote bot commented Nov 3, 2025

See this task on Roo Code Cloud

Removed <user_message> wrapper from resume flow in Task.ts. All tests passed.

View commit | Revert commit

@roomote
Copy link

roomote bot commented Nov 3, 2025

See this task on Roo Code Cloud

Fixed the outdated comment. All local checks passed.

View commit | Revert commit

@hannesrudolph hannesrudolph marked this pull request as ready for review November 4, 2025 00:00
@roomote
Copy link

roomote bot commented Nov 4, 2025

See this task on Roo Code Cloud

Reviewed all changes across 8 files. All previously identified issues have been resolved in commits e2d57e4 and 7171bff. The PR successfully removes XML-like <task>/<feedback> wrapper tags, processes plain user input uniformly, and updates all tests accordingly. No additional issues found.

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

refactor(mentions): always process text; remove no-op gate; update docstring
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 4, 2025
Copy link
Collaborator Author

@hannesrudolph hannesrudolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented fixes during review: prevented undefined feedback from rendering; simplified mention processing; updated docstring. All tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Draft / In Progress size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: PR [Draft / In Progress]

Development

Successfully merging this pull request may close these issues.

3 participants