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

Function getUpdatePromptTemplate

src/services/MagicDocs/prompts.ts:8–59  ·  view source on GitHub ↗

* Get the Magic Docs update prompt template

()

Source from the content-addressed store, hash-verified

6 * Get the Magic Docs update prompt template
7 */
8function getUpdatePromptTemplate(): string {
9 return `IMPORTANT: This message and these instructions are NOT part of the actual user conversation. Do NOT include any references to "documentation updates", "magic docs", or these update instructions in the document content.
10
11Based on the user conversation above (EXCLUDING this documentation update instruction message), update the Magic Doc file to incorporate any NEW learnings, insights, or information that would be valuable to preserve.
12
13The file {{docPath}} has already been read for you. Here are its current contents:
14<current_doc_content>
15{{docContents}}
16</current_doc_content>
17
18Document title: {{docTitle}}
19{{customInstructions}}
20
21Your ONLY task is to use the Edit tool to update the documentation file if there is substantial new information to add, then stop. You can make multiple edits (update multiple sections as needed) - make all Edit tool calls in parallel in a single message. If there's nothing substantial to add, simply respond with a brief explanation and do not call any tools.
22
23CRITICAL RULES FOR EDITING:
24- Preserve the Magic Doc header exactly as-is: # MAGIC DOC: {{docTitle}}
25- If there's an italicized line immediately after the header, preserve it exactly as-is
26- Keep the document CURRENT with the latest state of the codebase - this is NOT a changelog or history
27- Update information IN-PLACE to reflect the current state - do NOT append historical notes or track changes over time
28- Remove or replace outdated information rather than adding "Previously..." or "Updated to..." notes
29- Clean up or DELETE sections that are no longer relevant or don't align with the document's purpose
30- Fix obvious errors: typos, grammar mistakes, broken formatting, incorrect information, or confusing statements
31- Keep the document well organized: use clear headings, logical section order, consistent formatting, and proper nesting
32
33DOCUMENTATION PHILOSOPHY - READ CAREFULLY:
34- BE TERSE. High signal only. No filler words or unnecessary elaboration.
35- Documentation is for OVERVIEWS, ARCHITECTURE, and ENTRY POINTS - not detailed code walkthroughs
36- Do NOT duplicate information that's already obvious from reading the source code
37- Do NOT document every function, parameter, or line number reference
38- Focus on: WHY things exist, HOW components connect, WHERE to start reading, WHAT patterns are used
39- Skip: detailed implementation steps, exhaustive API docs, play-by-play narratives
40
41What TO document:
42- High-level architecture and system design
43- Non-obvious patterns, conventions, or gotchas
44- Key entry points and where to start reading code
45- Important design decisions and their rationale
46- Critical dependencies or integration points
47- References to related files, docs, or code (like a wiki) - help readers navigate to relevant context
48
49What NOT to document:
50- Anything obvious from reading the code itself
51- Exhaustive lists of files, functions, or parameters
52- Step-by-step implementation details
53- Low-level code mechanics
54- Information already in CLAUDE.md or other project docs
55
56Use the Edit tool with file_path: {{docPath}}
57
58REMEMBER: Only update if there is substantial new information. The Magic Doc header (# MAGIC DOC: {{docTitle}}) must remain unchanged.`
59}
60
61/**
62 * Load custom Magic Docs prompt from file if it exists

Callers 1

loadMagicDocsPromptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected