Documentation
¶
Overview ¶
Package marker defines HTML comment markers for parsing and generating embedded context blocks.
Index ¶
Constants ¶
const ( // CommentOpen is the HTML comment opening tag. CommentOpen = "<!--" // CommentClose is the HTML comment closing tag. CommentClose = "-->" )
HTML comment markers for parsing and generation.
const ( // TagPre is the opening tag for preformatted text blocks. TagPre = "<pre>" // TagPreClose is the closing tag for preformatted text blocks. TagPreClose = "</pre>" )
HTML element markers for preformatted content.
const ( // CtxMarkerStart marks the beginning of an embedded context block. CtxMarkerStart = "<!-- ctx:context -->" // CtxMarkerEnd marks the end of an embedded context block. CtxMarkerEnd = "<!-- ctx:end -->" )
Context block markers for embedding context in files.
const ( // PromptMarkerStart marks the beginning of the prompt block. PromptMarkerStart = "<!-- ctx:prompt -->" // PromptMarkerEnd marks the end of the prompt block. PromptMarkerEnd = "<!-- ctx:prompt:end -->" )
Prompt block markers for PROMPT.md.
const ( // CopilotMarkerStart marks the beginning of ctx-managed Copilot content. CopilotMarkerStart = "<!-- ctx:copilot -->" // CopilotMarkerEnd marks the end of ctx-managed Copilot content. CopilotMarkerEnd = "<!-- ctx:copilot:end -->" )
Copilot block markers for .github/copilot-instructions.md.
const ( // PlanMarkerStart marks the beginning of the plan block. PlanMarkerStart = "<!-- ctx:plan -->" // PlanMarkerEnd marks the end of the plan block. PlanMarkerEnd = "<!-- ctx:plan:end -->" )
Plan block markers for IMPLEMENTATION_PLAN.md.
const ( // IndexStart marks the beginning of an auto-generated index. IndexStart = "<!-- INDEX:START -->" // IndexEnd marks the end of an auto-generated index. IndexEnd = "<!-- INDEX:END -->" )
Index markers for auto-generated table of contents sections.
const ( // PrefixTaskUndone is the prefix for an unchecked task item. PrefixTaskUndone = "- [ ]" // PrefixTaskDone is the prefix for a checked (completed) task item. PrefixTaskDone = "- [x]" )
Task checkbox prefixes for Markdown task lists.
const ( // PublishMarkerStart begins the ctx-published block in MEMORY.md. PublishMarkerStart = "<!-- ctx:published -->" // PublishMarkerEnd ends the ctx-published block in MEMORY.md. PublishMarkerEnd = "<!-- ctx:end -->" )
Published block markers for MEMORY.md.
const ( // TagSystemReminderOpen is the opening tag for system reminders. TagSystemReminderOpen = "<system-reminder>" // TagSystemReminderClose is the closing tag for system reminders. TagSystemReminderClose = "</system-reminder>" )
System reminder tags injected by Claude Code into tool results.
const ( // TagCompactionSummaryOpen is a standalone <summary> on its own line. TagCompactionSummaryOpen = "<summary>" // TagCompactionSummaryClose is the closing </summary> tag. TagCompactionSummaryClose = "</summary>" // CompactionBoilerplatePrefix starts the continuation prompt after // a compaction summary. CompactionBoilerplatePrefix = "If you need specific details from before compaction" )
Context compaction artifacts injected by Claude Code when the conversation exceeds the context window. The compaction injects two blocks as a user message in the JSONL transcript:
- A multi-line <summary>...</summary> block containing a structured conversation summary (sections: Request/Intent, Technical Concepts, Files, Current State).
- A boilerplate continuation prompt ("If you need specific details from before compaction...read the full transcript at...").
INVARIANT: Claude Code's <summary> tag always appears alone on its own line (the content is inherently multi-line). Our <summary> tags are always single-line (<summary>N lines</summary>, see TplRecallDetailsOpen). This invariant makes disambiguation safe: a line that is exactly "<summary>" is a compaction artifact; a line containing "<summary>...</summary>" is ours.
const (
// MarkTaskComplete is the unchecked task marker.
MarkTaskComplete = "x"
)
const ( // PrefixSuperseded is the strikethrough prefix that marks an entry as // superseded by a newer entry. PrefixSuperseded = "~~Superseded" )
Entry status markers for knowledge files.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.