Skip to main content

Module system

Module system 

Source
Expand description

System instructions and prompt management.

Prompt variants share one canonical base contract plus thin mode deltas and compact runtime addenda. Richer behavior comes from AGENTS.md, dynamic tool guidance, skill metadata, and runtime notices.

Structs§

SystemPromptConfig
System instruction configuration

Constants§

PLAN_MODE_EXIT_INSTRUCTION_LINE
Shared Plan Mode instruction line for transitioning to implementation.
PLAN_MODE_IMPLEMENT_REMINDER
Shared reminder appended when presenting plans while still in Plan Mode.
PLAN_MODE_INTERVIEW_POLICY_LINE
Shared Plan Mode policy line requiring context-aware interview closure before final plans.
PLAN_MODE_NO_AUTO_EXIT_LINE
Shared Plan Mode guard line requiring explicit transition from planning to execution.
PLAN_MODE_NO_REQUEST_USER_INPUT_POLICY_LINE
Shared Plan Mode policy line for runtimes where request_user_input is unavailable.
PLAN_MODE_PLAN_QUALITY_LINE
Shared Plan Mode instruction line for decision-complete planning output.
PLAN_MODE_READ_ONLY_HEADER
Shared Plan Mode header used by both static and incremental prompt builders.
PLAN_MODE_READ_ONLY_NOTICE_LINE
Shared Plan Mode notice line describing strict read-only enforcement.
PLAN_MODE_TASK_TRACKER_LINE
Shared Plan Mode task-tracking line clarifying availability and aliasing.

Functions§

apply_output_style
Apply output style to a generated system instruction
compose_system_instruction_text
Compose the base system instruction plus compact tool/skill/environment addenda.
default_lightweight_prompt
default_system_prompt
generate_lightweight_instruction
Generate a lightweight system instruction for simple operations
generate_minimal_instruction
Generate a minimal system instruction (pi-inspired, <1K tokens)
generate_specialized_instruction
Generate a specialized system instruction for advanced operations
generate_system_instruction
Generate system instruction
generate_system_instruction_with_config
Generate the stable base system instruction with configuration-aware sections.
generate_system_instruction_with_guidelines
Generate the stable base system instruction without workspace configuration.
lightweight_instruction_text
minimal_instruction_text
minimal_system_prompt
openai_gpt55_contract_addendum
read_agent_guidelines
Read AGENTS.md file if present and extract agent guidelines
specialized_instruction_text
specialized_system_prompt