MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getPlanModeV2SubAgentInstructions

Function getPlanModeV2SubAgentInstructions

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

Source from the content-addressed store, hash-verified

3397}
3398
3399function getPlanModeV2SubAgentInstructions(attachment: {
3400 planFilePath: string
3401 planExists: boolean
3402}): UserMessage[] {
3403 const planFileInfo = attachment.planExists
3404 ? `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.`
3405 : `No plan file exists yet. You should create your plan at ${attachment.planFilePath} using the ${FileWriteTool.name} tool if you need to.`
3406
3407 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:
3408
3409## Plan File Info:
3410${planFileInfo}
3411You 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.
3412Answer 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.`
3413
3414 return wrapMessagesInSystemReminder([
3415 createUserMessage({ content, isMeta: true }),
3416 ])
3417}
3418
3419function getAutoModeInstructions(attachment: {
3420 reminderType: 'full' | 'sparse'

Callers 1

getPlanModeInstructionsFunction · 0.85

Calls 2

createUserMessageFunction · 0.85

Tested by

no test coverage detected