Skip to content

feat(plan): improve prompt messages#491

Merged
AlbumenJ merged 1 commit into
agentscope-ai:mainfrom
LearningGp:polish-plan
Jan 9, 2026
Merged

feat(plan): improve prompt messages#491
AlbumenJ merged 1 commit into
agentscope-ai:mainfrom
LearningGp:polish-plan

Conversation

@LearningGp
Copy link
Copy Markdown
Collaborator

AgentScope-Java Version

1.0.7

Description

feat(plan): improve prompt messages

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

Change-Id: Ia727a27346d32be6d576d086aab7b1d41e47ef5f
Copy link
Copy Markdown
Contributor

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 improves the prompt messages in the plan module by making the user confirmation rule more flexible and adding a language consistency rule. The changes simplify the RULE_WAIT_FOR_CONFIRMATION message to be less strict while maintaining its core functionality, and add a new rule to ensure agents respond in the same language as the plan.

Key changes:

  • Softened the RULE_WAIT_FOR_CONFIRMATION prompt by removing "CRITICAL" emphasis and adding logic to skip confirmation when user's request already implies execution intent
  • Added "Language consistency" rule to RULE_COMMON to ensure agents respond in the same language as the plan
  • Updated test assertions to match the simplified prompt text

Reviewed changes

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

File Description
agentscope-core/src/main/java/io/agentscope/core/plan/hint/DefaultPlanToHint.java Simplified RULE_WAIT_FOR_CONFIRMATION prompt text and added language consistency rule to RULE_COMMON
agentscope-core/src/test/java/io/agentscope/core/plan/hint/DefaultPlanToHintTest.java Removed assertion checking for "CRITICAL" text to align with the updated prompt

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

+ "- Do not modify plan: Do not modify or amend the plan without a clear plan"
+ " modification instruction from user\n";
+ " modification instruction from user\n"
+ "- Language consistency: Respond to users in the same language as the plan\n";
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

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

The new "Language consistency" rule has been added to RULE_COMMON but lacks test coverage. Consider adding a test case to verify this rule appears in generated hints, similar to the test on line 290 of DefaultPlanToHintTest.java that checks for "Update before processing each subtask".

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AlbumenJ AlbumenJ merged commit 80dec2c into agentscope-ai:main Jan 9, 2026
9 of 10 checks passed
yaohuitc pushed a commit to yaohuitc/agentscope-java that referenced this pull request Jan 10, 2026
## AgentScope-Java Version

1.0.7

## Description

feat(plan): improve prompt messages
## Checklist

Please check the following items before code is ready to be reviewed.

- [X]  Code has been formatted with `mvn spotless:apply`
- [X]  All tests are passing (`mvn test`)
- [X]  Javadoc comments are complete and follow project conventions
- [X] Related documentation has been updated (e.g. links, examples,
etc.)
- [X]  Code is ready for review
@LearningGp LearningGp deleted the polish-plan branch January 15, 2026 06:12
iridescentpeo pushed a commit to feelshana/agentscope-java that referenced this pull request Apr 21, 2026
## AgentScope-Java Version

1.0.7

## Description

feat(plan): improve prompt messages
## Checklist

Please check the following items before code is ready to be reviewed.

- [X]  Code has been formatted with `mvn spotless:apply`
- [X]  All tests are passing (`mvn test`)
- [X]  Javadoc comments are complete and follow project conventions
- [X] Related documentation has been updated (e.g. links, examples,
etc.)
- [X]  Code is ready for review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants