Skip to main content

Module instructions

Module instructions 

Source

Functions§

build_instructions
build_instructions_for_test
Deterministic variant for tests (no session/knowledge state).
build_instructions_with_client
build_instructions_with_client_for_compiler
Deterministic instruction builder for the Instruction Compiler. Uses shadow mode (COMPACT_SHADOW profile) to avoid duplicating BULLETS/NEVER/CRITICAL that the CLAUDE.md / dedicated rule file carries.
claude_code_instructions
Backward-compat alias kept for external callers.
claude_code_static_instructions_for_test
Deterministic STATIC Claude Code instructions for the char-budget test: the cold first-contact handshake surface (skeleton + shell hint + decoder + CLAUDE.md pointer + guidance). It pins minimal=true (the dynamic session/knowledge/gotcha payload is governed by INSTRUCTION_CAP_TOKENS, not the char budget) plus level=Off, shadow=false (the default template) and an empty persona block (the coding default), so the result is independent of the developer’s local lean-ctx config and the assertion stays deterministic (#498) for every contributor, not just clean CI.
claude_config_dir_display
Display path for the Claude config directory (respected by CLAUDE_CONFIG_DIR).