MCPcopy Create free account
hub / github.com/claude-code-best/claude-code / getPlanModeV2SubAgentInstructions

Function getPlanModeV2SubAgentInstructions

src/utils/messages.ts:3787–3805  ·  view source on GitHub ↗
(attachment: {
  planFilePath: string
  planExists: boolean
})

Source from the content-addressed store, hash-verified

3785}
3786
3787function getPlanModeV2SubAgentInstructions(attachment: {
3788 planFilePath: string
3789 planExists: boolean
3790}): UserMessage[] {
3791 const planFileInfo = attachment.planExists
3792 ? `A plan file already exists at ${attachment.planFilePath}. You can read it and make incremental edits using the ${FileEditTool.name} tool if you need to.`
3793 : `No plan file exists yet. You should create your plan at ${attachment.planFilePath} using the ${FileWriteTool.name} tool if you need to.`
3794
3795 const content = `Plan mode is active. The user indicated that they do not want you to execute yet -- you MUST NOT make any edits, run any non-readonly tools (including changing configs or making commits), or otherwise make any changes to the system. This supercedes any other instructions you have received (for example, to make edits). Instead, you should:
3796
3797## Plan File Info:
3798${planFileInfo}
3799You should build your plan incrementally by writing to or editing this file. NOTE that this is the only file you are allowed to edit - other than this you are only allowed to take READ-ONLY actions.
3800Answer the user's query comprehensively, using the ${ASK_USER_QUESTION_TOOL_NAME} tool if you need to ask the user clarifying questions. If you do use the ${ASK_USER_QUESTION_TOOL_NAME}, make sure to ask all clarifying questions you need to fully understand the user's intent before proceeding.`
3801
3802 return wrapMessagesInSystemReminder([
3803 createUserMessage({ content, isMeta: true }),
3804 ])
3805}
3806
3807function getAutoModeInstructions(attachment: {
3808 reminderType: 'full' | 'sparse'

Callers 1

getPlanModeInstructionsFunction · 0.85

Calls 2

createUserMessageFunction · 0.85

Tested by

no test coverage detected