Skip to main content

install_claude_md_guidance

Function install_claude_md_guidance 

Source
pub fn install_claude_md_guidance(
    project_dir: &Path,
    sqz_path: &str,
) -> Result<bool>
Expand description

Install sqz’s guidance block into CLAUDE.md at project_dir.

If CLAUDE.md doesn’t exist yet, create it with a minimal preamble and sqz’s block. If it exists, append sqz’s block (separated by a blank line so it renders as a new markdown section). If the block is already present (detected by the BEGIN sentinel), it is replaced in place when it differs from this version’s block for sqz_path, and the file is left alone otherwise, so sqz init stays idempotent.

Returns true when the file was created or modified, false when sqz’s current block was already present.