MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getDefaultUpdatePrompt

Function getDefaultUpdatePrompt

src/services/SessionMemory/prompts.ts:43–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41`
42
43function getDefaultUpdatePrompt(): string {
44 return `IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "note-taking", "session notes extraction", or these update instructions in the notes content.
45
46Based on the user conversation above (EXCLUDING this note-taking instruction message as well as system prompt, claude.md entries, or any past session summaries), update the session notes file.
47
48The file {{notesPath}} has already been read for you. Here are its current contents:
49<current_notes_content>
50{{currentNotes}}
51</current_notes_content>
52
53Your ONLY task is to use the Edit tool to update the notes file, then stop. You can make multiple edits (update every section as needed) - make all Edit tool calls in parallel in a single message. Do not call any other tools.
54
55CRITICAL RULES FOR EDITING:
56- The file must maintain its exact structure with all sections, headers, and italic descriptions intact
57-- NEVER modify, delete, or add section headers (the lines starting with '#' like # Task specification)
58-- NEVER modify or delete the italic _section description_ lines (these are the lines in italics immediately following each header - they start and end with underscores)
59-- The italic _section descriptions_ are TEMPLATE INSTRUCTIONS that must be preserved exactly as-is - they guide what content belongs in each section
60-- ONLY update the actual content that appears BELOW the italic _section descriptions_ within each existing section
61-- Do NOT add any new sections, summaries, or information outside the existing structure
62- Do NOT reference this note-taking process or instructions anywhere in the notes
63- It's OK to skip updating a section if there are no substantial new insights to add. Do not add filler content like "No info yet", just leave sections blank/unedited if appropriate.
64- Write DETAILED, INFO-DENSE content for each section - include specifics like file paths, function names, error messages, exact commands, technical details, etc.
65- For "Key results", include the complete, exact output the user requested (e.g., full table, full answer, etc.)
66- Do not include information that's already in the CLAUDE.md files included in the context
67- Keep each section under ~${MAX_SECTION_LENGTH} tokens/words - if a section is approaching this limit, condense it by cycling out less important details while preserving the most critical information
68- Focus on actionable, specific information that would help someone understand or recreate the work discussed in the conversation
69- IMPORTANT: Always update "Current State" to reflect the most recent work - this is critical for continuity after compaction
70
71Use the Edit tool with file_path: {{notesPath}}
72
73STRUCTURE PRESERVATION REMINDER:
74Each section has TWO parts that must be preserved exactly as they appear in the current file:
751. The section header (line starting with #)
762. The italic description line (the _italicized text_ immediately after the header - this is a template instruction)
77
78You ONLY update the actual content that comes AFTER these two preserved lines. The italic description lines starting and ending with underscores are part of the template structure, NOT content to be edited or removed.
79
80REMEMBER: Use the Edit tool in parallel and stop. Do not continue after the edits. Only include insights from the actual user conversation, never from these note-taking instructions. Do not delete or change section headers or italic _section descriptions_.`
81}
82
83/**
84 * Load custom session memory template from file if it exists

Callers 1

loadSessionMemoryPromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected