Repository navigation
fix(harness): refresh plan guidance and refine context prompts - #3741
Merged
Merged
Conversation
4 tasks
jujn
approved these changes
Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
2.1.0-SNAPSHOT
Description
Summary
Plan mode implements a model-call refresh hook but does not register for that extension point, allowing stale SYSTEM policy after a mode change. Enable the existing hook, use the existing slim skill-catalog default, and refine summary wording to retain current user constraints while marking withdrawn decisions.
The full-metadata constructor remains available. Skill loading IDs and files-root guidance are retained. Compaction asks for exact wording only where it governs behavior.
Parent issue: #3737. This PR can target main independently.
Evidence
Real Harness/ReAct scheduling tests enter and exit Plan mode and inspect the prepared request. Skill tests check slim metadata, explicit opt-in, loadable IDs, filtering, and file roots. Summary-shape tests check the prompt contract for active constraints and superseded instructions; they do not claim that a live model always follows it.
Isolated verification on upstream
07c5f3078d682da30f29e96b6d76f68242cbc2e1: 51 tests, 0 failures/errors/skips; Spotless passed.ZCode uses recurring mode reminders, a bounded skill-discovery view, and literal compaction extraction. DeepSeek Harness separates Plan policy from transitions, lists skill summaries before loading, and quotes important wording while discarding superseded information. ASJ reuses its existing mechanisms; no reminder state machine or new catalog budget framework is added.
Merge Danger
Door: reversible code change. Blast radius: Plan policy refresh and the default skill/compaction prompt text. Callers relying on arbitrary skill frontmatter can keep the explicit full-metadata constructor. Validation proves scheduling and rendered prompt shape; real-model task-success or compression-quality A/B measurements are not available.
Checklist