Skip to content

Conversation

@RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Sep 7, 2025

Description

A close reading of the edit tools' descriptions warranted several updates. This PR cleans up the edit tools' descriptions

  • Unifies between CLI and extensions where possible
  • Emphasizes reading the file before usage
  • Emphasizes that old_string must be different than new_string
  • Removes nonsensical blurbs about line numbers from read file output
  • Removes tons of unnecessary new lines
  • Uses code references to the read file tool names to reduce tech debt if tool names are changed
  • Rearranges sensibly and reduces redundancy unless the redundancy is of critical reminders for proper tool usage

Also, updates read tool and edit tool reads to use fs.realpathSync to reduce false positives on the has file been read funcitonality

Note diff is a bit mangled in descriptions but generally didn't remove much, just enhanced. Most of the removed lines in this PR are just whitespace


Summary by cubic

Unifies and simplifies the Edit, MultiEdit, and SingleFindAndReplace tool prompts across core and CLI to reduce failed edits and make behavior consistent. Emphasizes “read before edit,” atomic multi-edits, exact whitespace matching, and clear replace_all guidance.

  • Refactors
    • Standardized tool descriptions with clear requirements, warnings, and examples (read before edit, exact whitespace, replace_all usage, no parallel calls).
    • Made MultiEdit descriptions reference the single-edit tool they build on (core: SingleFindAndReplace; CLI: Edit).
    • Clarified parameters and path expectations (CLI: absolute paths; core: workspace-relative).
    • Moved read tracking to readFile.ts (readFilesSet/markFileAsRead) and updated imports/tests.
    • Tightened new-file guidance and multi-edit atomicity; improved error messages.

@RomneyDa RomneyDa requested a review from a team as a code owner September 7, 2025 01:04
@RomneyDa RomneyDa requested review from tomasz-stefaniak and removed request for a team September 7, 2025 01:04
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 7, 2025
@RomneyDa RomneyDa changed the title feat: edit tools system prompt tweaks feat: edit tools descriptions improvements Sep 7, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 8 files

React with 👍 or 👎 to teach cubic. You can also tag @cubic-dev-ai to give feedback, ask questions, or re-run the review.

@github-actions
Copy link

github-actions bot commented Sep 7, 2025

⚠️ AI review completed but no review output was generated. Check the action logs for details.


💡 To request a new review, comment @continue-general-review

@RomneyDa RomneyDa changed the title feat: edit tools descriptions improvements feat: edit tools descriptions tweaks and read real path Sep 7, 2025
@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 8, 2025
@sestinj sestinj merged commit 24e7a6c into main Sep 8, 2025
96 of 101 checks passed
@sestinj sestinj deleted the dallin/read-prompt-tweaks branch September 8, 2025 17:22
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Sep 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 8, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 8, 2025
@github-actions github-actions bot added the tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys label Sep 8, 2025
@sestinj
Copy link
Contributor

sestinj commented Sep 11, 2025

🎉 This PR is included in version 1.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

lgtm This PR has been approved by a maintainer released size:L This PR changes 100-499 lines, ignoring generated files. tier 2 Important feature that adds new capabilities to the platform or improves critical user journeys

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants