MCPcopy Create free account
hub / github.com/Noumena-Network/code / getPlanModeV2SubAgentInstructions

Function getPlanModeV2SubAgentInstructions

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

Source from the content-addressed store, hash-verified

3497}
3498
3499function getPlanModeV2SubAgentInstructions(attachment: {
3500 planFilePath: string
3501 planExists: boolean
3502}): UserMessage[] {
3503 const planFileInfo = attachment.planExists
3504 ? `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.`
3505 : `No plan file exists yet. You should create your plan at ${attachment.planFilePath} using the ${FileWriteTool.name} tool if you need to.`
3506
3507 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:
3508
3509## Plan File Info:
3510${planFileInfo}
3511You 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.
3512Answer 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.`
3513
3514 return wrapMessagesInSystemReminder([
3515 createUserMessage({ content, isMeta: true }),
3516 ])
3517}
3518
3519function getAutoModeInstructions(attachment: {
3520 reminderType: 'full' | 'sparse'

Callers 1

getPlanModeInstructionsFunction · 0.85

Calls 2

createUserMessageFunction · 0.70

Tested by

no test coverage detected