Skip to content

🤖 fix: simplify plan mode instructions#2840

Merged
ammario merged 1 commit into
mainfrom
fix/plan-mode-instructions
Mar 7, 2026
Merged

🤖 fix: simplify plan mode instructions#2840
ammario merged 1 commit into
mainfrom
fix/plan-mode-instructions

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

Summary

Move the opinionated plan-mode guidance into the built-in plan agent body so custom plan agents can override it, while leaving runtime injection focused on workspace-specific plan-file constraints.

Background

Plan guidance was split between the built-in plan spec and runtime-injected modeUtils text. That made the behavior harder to override and left the instructions more repetitive than necessary.

Implementation

  • trimmed getPlanModeInstruction() down to runtime-only facts: exact plan path, plan-file lifecycle guidance, edit restrictions, and read-only bash limits
  • simplified the built-in plan agent instructions while keeping the key Explore / ask_user_question / propose_plan workflow expectations
  • synced the built-in plan docs snapshot and regenerated built-in agent content
  • tightened tests to cover prompt composition and inherited plan behavior instead of exact prompt prose

Validation

  • make static-check
  • bun test src/common/utils/ui/modeUtils.test.ts src/node/services/streamContextBuilder.test.ts src/node/services/agentDefinitions/agentDefinitionsService.test.ts

Risks

Low. This changes prompt composition for plan-like agents plus docs/tests. The main regression risk is accidentally dropping plan-mode guardrails or prompt ordering, which is covered by the updated prompt assembly and inheritance tests.


Generated with mux • Model: openai:gpt-5.4 • Thinking: xhigh • Cost: $44.79

@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3f713b43be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/common/utils/ui/modeUtils.ts
Comment thread src/node/services/agentDefinitions/builtInAgentDefinitions.test.ts Outdated
Move the detailed planning guidance into the built-in plan agent so
custom plan agents can override it, while keeping runtime injection
focused on workspace-specific plan-file constraints.

Also simplify the plan instructions and tighten tests around behavior
instead of exact prompt prose.

---

_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$44.79`_

<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=44.79 -->
@ammar-agent ammar-agent force-pushed the fix/plan-mode-instructions branch from 3f713b4 to dee3ebb Compare March 7, 2026 18:09
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

Please take another look.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ammario ammario merged commit 0567933 into main Mar 7, 2026
23 checks passed
@ammario ammario deleted the fix/plan-mode-instructions branch March 7, 2026 18:21
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.

2 participants