Documentation
¶
Overview ¶
Package ctxbundle stages the files a dispatched agent should read before it starts.
A dispatched agent opens a FRESH session: no conversation history, and on an ssh/pct/sandbox target none of the control plane user's Claude config either. The same task therefore runs with far less knowledge remotely than it does locally, and nothing in the timeline says so — the output is just quietly worse.
Context paths close that gap. The control plane reads the listed files off its OWN filesystem (one place to curate) and stages them into the worktree at .lectern/context/ through the Executor, so every target kind gets byte-identical context.
Caps are deliberate and LOUD: an oversized or missing file is reported in the staged index and in the prompt, never dropped silently.
Index ¶
Constants ¶
const IndexName = "INDEX.md"
IndexName is the manifest written alongside the staged files.
const Subdir = "context"
Subdir is where staged files land inside the runtime dir.
Variables ¶
var ( MaxFileBytes = 256 * 1024 MaxTotalBytes = 1024 * 1024 )
Caps on a single file and on the whole bundle.
Functions ¶
func IndexMarkdown ¶
IndexMarkdown is the manifest staged next to the files, so an agent can see where each one came from and what could not be staged.
func PromptPrefix ¶
PromptPrefix is the header prepended to the task prompt so the agent cannot miss the bundle — or the fact that part of it is absent.