Skip to main content

Module context

Module context 

Source
Expand description

Prompt context builders (extracted from server layer).

Stateless functions that construct workspace, environment, and instruction context for the agent system prompt.

Modules§

instruction
Instruction layer: loads instruction files (AGENTS.md, CLAUDE.md) from workspace.

Constants§

CORE_AGENT_DIRECTIVES
Framework-invariant agent operating directives, applied on top of whatever base prompt is in effect.
DEFAULT_BASE_PROMPT
ENV_CONTEXT_END_MARKER
ENV_CONTEXT_START_MARKER
PROJECT_CONTEXT_END_MARKER
PROJECT_CONTEXT_PREFIX
PROJECT_CONTEXT_START_MARKER
WORKSPACE_CONTEXT_END_MARKER
WORKSPACE_CONTEXT_PREFIX
WORKSPACE_CONTEXT_START_MARKER

Functions§

assemble_system_prompt
Assemble a full system prompt from base prompt, optional enhancement, and context segments.
assemble_system_prompt_with_project
build_env_prompt_context
build_project_prompt_context
Build the stable Project identity block.
build_workspace_prompt_context
build_workspace_prompt_context_with_binding
upsert_project_prompt_context
Replace every existing Project block with exactly one current block.
upsert_workspace_prompt_context
Replace every existing Workspace block with exactly one current block.
workspace_prompt_guidance
Guidance for workspace-based interactions