marker

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package marker defines HTML comment markers for parsing and generating embedded context blocks.

Index

Constants

View Source
const (
	// CommentOpen is the HTML comment opening tag.
	CommentOpen = "<!--"
	// CommentClose is the HTML comment closing tag.
	CommentClose = "-->"
)

HTML comment markers for parsing and generation.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
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:

  1. A multi-line <summary>...</summary> block containing a structured conversation summary (sections: Request/Intent, Technical Concepts, Files, Current State).
  2. 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.

View Source
const (
	// MarkTaskComplete is the unchecked task marker.
	MarkTaskComplete = "x"
)
View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL